diff --git a/src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java b/src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java index 9bc9a06..32e6f87 100644 --- a/src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java +++ b/src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java @@ -8,6 +8,11 @@ import java.time.LocalDate; import static java.lang.Math.*; +/** + * Calculates approximate sunrise and sunset times + * Usually off by a few minutes, except the Poles which, during polar days, are up to few hours inaccurate + * Adapted from: https://gml.noaa.gov/grad/solcalc/solareqns.PDF + */ public class SimpleTwilightTimeProvider extends TwilightTimeProvider { @Override public Twilight calculateTwilightTime(LocalDate date, Coordinates coordinates) { diff --git a/src/test/java/eu/m724/wtapi/twilight/ApproximateTwilightTimeTest.java b/src/test/java/eu/m724/wtapi/twilight/SimpleTwilightTimeTest.java similarity index 98% rename from src/test/java/eu/m724/wtapi/twilight/ApproximateTwilightTimeTest.java rename to src/test/java/eu/m724/wtapi/twilight/SimpleTwilightTimeTest.java index 341e25b..b1c633f 100644 --- a/src/test/java/eu/m724/wtapi/twilight/ApproximateTwilightTimeTest.java +++ b/src/test/java/eu/m724/wtapi/twilight/SimpleTwilightTimeTest.java @@ -8,7 +8,7 @@ import org.junit.Test; import java.time.LocalDate; -public class ApproximateTwilightTimeTest { +public class SimpleTwilightTimeTest { /** * Acceptable discrepancy in minutes */