diff --git a/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java b/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java index ead0be3..c8ee7ad 100644 --- a/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java +++ b/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java @@ -27,13 +27,13 @@ public class ApproximateTwilightTimeProvider extends CacheableTwilightTimeProvid double n2 = tan(latRad) * tan(declination); double hourAngle = acos(n1 - n2); - double hourAngleDeg = 4 * toDegrees(hourAngle); + double longitudeEffect = 4 * toDegrees(hourAngle); // sunrise = 720 - 4 * (coordinates.longitude + hourAngleDeg) - equationOfTime // sunset = 720 - 4 * (coordinates.longitude - hourAngleDeg) - equationOfTime double solarNoon = 720 - 4 * coordinates.longitude - equationOfTime; - double sunrise = solarNoon - hourAngleDeg; - double sunset = solarNoon + hourAngleDeg; + double sunrise = solarNoon - longitudeEffect; + double sunset = solarNoon + longitudeEffect; return new Twilight( cache.date(),