diff --git a/README.md b/README.md index 0d2bd11..2e3fd63 100644 --- a/README.md +++ b/README.md @@ -35,27 +35,19 @@ The API is intentionally "flat", comprising a handful of static methods and simp To get refraction-corrected topocentric coordinates: ```java -import net.e175.klaus.solarpositioning.*; - -import java.time.ZonedDateTime; - -public class App { - public static void main(String[] args) { - var dateTime = new ZonedDateTime.now(); - - // replace SPA with Grena3 as needed - var position = SPA.calculateSolarPosition( - dateTime, - 48.21, // latitude (degrees) - 16.37, // longitude (degrees) - 190, // elevation (m) - DeltaT.estimate(dateTime.toLocalDate()), // delta T (s) - 1010, // avg. air pressure (hPa) - 11); // avg. air temperature (°C) - - System.out.println(position); - } -} +var dateTime = new ZonedDateTime.now(); + +// replace SPA with Grena3 as needed +var position = SPA.calculateSolarPosition( + dateTime, + 48.21, // latitude (degrees) + 16.37, // longitude (degrees) + 190, // elevation (m) + DeltaT.estimate(dateTime.toLocalDate()), // delta T (s) + 1010, // avg. air pressure (hPa) + 11); // avg. air temperature (°C) + +System.out.println(position); ``` The SPA class includes methods to calculate the times of sunrise, sun transit, and sunset in one fell swoop. The actual