Compare commits

..

2 commits

2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@
<groupId>eu.m724</groupId> <groupId>eu.m724</groupId>
<artifactId>wtapi</artifactId> <artifactId>wtapi</artifactId>
<version>0.8.0-SNAPSHOT</version> <version>0.8.0</version>
<properties> <properties>
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
@ -69,7 +69,7 @@
<scm> <scm>
<developerConnection>scm:git:git@git.m724.eu:Minecon724/wtapi.git</developerConnection> <developerConnection>scm:git:git@git.m724.eu:Minecon724/wtapi.git</developerConnection>
<tag>wtapi-0.5</tag> <tag>wtapi-0.8.0</tag>
</scm> </scm>
</project> </project>

View file

@ -27,13 +27,13 @@ public class ApproximateTwilightTimeProvider extends CacheableTwilightTimeProvid
double n2 = tan(latRad) * tan(declination); double n2 = tan(latRad) * tan(declination);
double hourAngle = acos(n1 - n2); double hourAngle = acos(n1 - n2);
double hourAngleDeg = 4 * toDegrees(hourAngle); double longitudeEffect = 4 * toDegrees(hourAngle);
// sunrise = 720 - 4 * (coordinates.longitude + hourAngleDeg) - equationOfTime // sunrise = 720 - 4 * (coordinates.longitude + hourAngleDeg) - equationOfTime
// sunset = 720 - 4 * (coordinates.longitude - hourAngleDeg) - equationOfTime // sunset = 720 - 4 * (coordinates.longitude - hourAngleDeg) - equationOfTime
double solarNoon = 720 - 4 * coordinates.longitude - equationOfTime; double solarNoon = 720 - 4 * coordinates.longitude - equationOfTime;
double sunrise = solarNoon - hourAngleDeg; double sunrise = solarNoon - longitudeEffect;
double sunset = solarNoon + hourAngleDeg; double sunset = solarNoon + longitudeEffect;
return new Twilight( return new Twilight(
cache.date(), cache.date(),