public static interface SolarTime.Calculator
An SPI-interface representing a facade for the calculation engine regarding sunrise or sunset.
ServiceLoader| Modifier and Type | Method and Description |
|---|---|
double |
equationOfTime(double jde)
Calculates the difference between true and mean solar time.
|
default double |
getFeature(double jde,
String nameOfFeature)
Calculates a value suitable for given time and feature.
|
default double |
getGeodeticAngle(double latitude,
int altitude)
Calculates the additional geodetic angle due to the extra altitude of the observer.
|
default double |
getZenithAngle(double latitude,
int altitude)
Calculates the angle of the sun relative to the zenith at sunrise or sunset.
|
String |
name()
Obtains the name of the calculation method.
|
Optional<Moment> |
sunrise(CalendarDate date,
double latitude,
double longitude,
double zenith)
Calculates the moment of sunrise.
|
Optional<Moment> |
sunset(CalendarDate date,
double latitude,
double longitude,
double zenith)
Calculates the moment of sunset.
|
String name()
Obtains the name of the calculation method.
Optional<Moment> sunrise(CalendarDate date, double latitude, double longitude, double zenith)
Calculates the moment of sunrise.
date - the local calendar datelatitude - geographical latitude in degrees, positive for North, negative for Southlongitude - geographical longitude in degrees, positive for East, negative for Westzenith - the distance of the center of the sun from geographical local zenith in degreesIllegalArgumentException - if any parameter is out of rangeOptional<Moment> sunset(CalendarDate date, double latitude, double longitude, double zenith)
Calculates the moment of sunset.
date - the local calendar datelatitude - geographical latitude in degrees, positive for North, negative for Southlongitude - geographical longitude in degrees, positive for East, negative for Westzenith - the distance of the center of the sun from geographical local zenith in degreesIllegalArgumentException - if any parameter is out of rangedouble equationOfTime(double jde)
Calculates the difference between true and mean solar time.
jde - julian day in ephemeris timedefault double getFeature(double jde,
String nameOfFeature)
Calculates a value suitable for given time and feature.
Subclasses overriding this method document which features are supported. At least the feature of "declination" should be supported.
jde - julian day in ephemeris timenameOfFeature - describes what kind of value shall be calculatedDouble.NaN if the feature is not supporteddefault double getGeodeticAngle(double latitude,
int altitude)
Calculates the additional geodetic angle due to the extra altitude of the observer.
The default implementation just returns 0.0.
latitude - the geographical latitude in degreesaltitude - the altitude of the observer in metersdefault double getZenithAngle(double latitude,
int altitude)
Calculates the angle of the sun relative to the zenith at sunrise or sunset.
The default implementation just uses the standard refraction angle of 34 arc minutes,
adds to it 90° and the geodetic angle correction.
latitude - the geographical latitude in degreesaltitude - the altitude of the observer in metersCopyright © 2014–2021. All rights reserved.