Package net.e175.klaus.solarpositioning
Record Class JulianDate
java.lang.Object
java.lang.Record
net.e175.klaus.solarpositioning.JulianDate
Calculate Julian date for a given point in time. This follows the algorithm described in Reda,
I.; Andreas, A. (2003): Solar Position Algorithm for Solar Radiation Applications. NREL Report
No. TP-560-34302, Revised January 2008.
- Author:
- Klaus Brunner
-
Constructor Summary
ConstructorsConstructorDescriptionJulianDate(double julianDate, double deltaT) Creates an instance of aJulianDaterecord class.JulianDate(ZonedDateTime date) Construct a Julian date, assuming deltaT to be 0.JulianDate(ZonedDateTime date, double deltaT) Construct a Julian date, observing deltaT. -
Method Summary
Modifier and TypeMethodDescriptiondoubledeltaT()Returns the value of thedeltaTrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubledoubleReturns the value of thejulianDaterecord component.doubledoubledoublefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JulianDate
Construct a Julian date, assuming deltaT to be 0.- Parameters:
date- date and time
-
JulianDate
Construct a Julian date, observing deltaT.- Parameters:
date- date and timedeltaT- Difference between earth rotation time and terrestrial time (or Universal Time and Terrestrial Time), in seconds. See https://maia.usno.navy.mil/products/deltaT. For the years 2023–2028, a reasonably accurate default would be 69.
-
JulianDate
public JulianDate(double julianDate, double deltaT) Creates an instance of aJulianDaterecord class.- Parameters:
julianDate- the value for thejulianDaterecord componentdeltaT- the value for thedeltaTrecord component
-
-
Method Details
-
julianEphemerisDay
public double julianEphemerisDay() -
julianCentury
public double julianCentury() -
julianEphemerisCentury
public double julianEphemerisCentury() -
julianEphemerisMillennium
public double julianEphemerisMillennium() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
julianDate
public double julianDate()Returns the value of thejulianDaterecord component.- Returns:
- the value of the
julianDaterecord component
-
deltaT
public double deltaT()Returns the value of thedeltaTrecord component.- Returns:
- the value of the
deltaTrecord component
-