public static interface SolarTime.Calculator
An SPI-interface representing a facade for the calculation engine regarding sunrise or sunset.
ServiceLoader| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NOAA
Deprecated.
|
static java.lang.String |
SIMPLE
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
double |
declination(double jde)
Determines the declination of sun.
|
double |
equationOfTime(double jde)
Calculates the difference between true and mean solar time.
|
double |
getFeature(double jde,
java.lang.String nameOfFeature)
Calculates a value suitable for given time and feature.
|
double |
getGeodeticAngle(double latitude,
int altitude)
Calculates the additional geodetic angle due to the extra altitude of the observer.
|
double |
getZenithAngle(double latitude,
int altitude)
Calculates the angle of the sun relative to the zenith at sunrise or sunset.
|
java.lang.String |
name()
Obtains the name of the calculation method.
|
Moment |
sunrise(CalendarDate date,
double latitude,
double longitude,
double zenith)
Calculates the moment of sunrise.
|
Moment |
sunset(CalendarDate date,
double latitude,
double longitude,
double zenith)
Calculates the moment of sunset.
|
@Deprecated static final java.lang.String NOAA
@Deprecated static final java.lang.String SIMPLE
java.lang.String name()
Obtains the name of the calculation method.
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 degreesnull (polar day or night)java.lang.IllegalArgumentException - if any parameter is out of rangeMoment 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 degreesnull (polar day or night)java.lang.IllegalArgumentException - if any parameter is out of rangedouble equationOfTime(double jde)
Calculates the difference between true and mean solar time.
jde - julian day in ephemeris timedouble declination(double jde)
Determines the declination of sun.
jde - julian day in ephemeris timedouble getFeature(double jde,
java.lang.String nameOfFeature)
Calculates a value suitable for given time and feature.
Subclasses overriding this method document which features are supported. At least the feature "declination" must be supported by subclasses.
jde - julian day in ephemeris timenameOfFeature - describes what kind of value shall be calculatedDouble.NaN if the feature is not supporteddeclination(double)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 metersdouble 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 meters