|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jeospace.physics.orbit.Epoch
An immutable object, an epoch is a representation of an instant in time that is used as a point of reference - typically in astronomical calculations. This class provides utility methods for converting between various forms of date and time representations.
Calendar| Field Summary | |
static Epoch |
B1900
The epoch B1900 |
static Epoch |
B1950
The epoch B1950 |
static double |
HOURS_PER_DAY
The number of hours per day |
static Epoch |
J2000
The epoch J2000 |
static Epoch |
J2050
The epoch J2050 |
static double |
JULIAN_CENTURY
The double value representing the number of Julian days in a Julian century |
static double |
JULIAN_DAY_AT_THE_SYSTEM_EPOCH
Constant - the Julian Day at Jan 1 1970, 12:00 PM |
static double |
JULIAN_MILLENIUM
The double value representing the number of Julian days in a Julian millenium |
static double |
MILLIS_PER_DAY
The number of milliseconds per day |
static double |
MINUTES_PER_DAY
The number of minutes per day |
static Epoch |
MJD
The epoch of the Modified Julian day |
static double |
SECONDS_PER_DAY
The number of seconds per day |
| Constructor Summary | |
Epoch()
Construct an Epoch object initialized to the value of the
current system time. |
|
Epoch(java.util.Calendar cal)
Construct an Epoch object initialized to the
value of the argument Calendar. |
|
Epoch(double julianDay)
Construct an Epoch object initialized from the argument Julian day. |
|
Epoch(Epoch epoch)
Construct an Epoch object initialized to the value of the
argument. |
|
| Method Summary | |
int |
compareTo(Epoch that)
Compare this object with the argument for order. |
int |
compareTo(java.lang.Object obj)
Compare this object with the argument for order. |
boolean |
equals(java.lang.Object obj)
Compare two Epochs for equality. |
java.util.Calendar |
getCalendar()
Return the Calendar representation of this Epoch |
static java.util.Calendar |
getCalendar(double julianDay)
Return the Gregorian calendar that cooresponds to the specified Julian Day. |
static void |
getCalendar(double julianDay,
java.util.Calendar calendar)
Initialize the argument Calendar object to coorespond
to the specified Julian Day. |
static double |
getCurrentJulianDay()
Return the Julian Day equivalent to the value of the current system time. |
static double |
getFractionOfDay(java.util.Calendar cal)
Return the value of a fraction portion of a day represented by the Calendar fields that are less significant than
the Calendar.DAY field. |
static double |
getJulianCenturiesJ2K(double julianDay)
Get the double representation of the Julian Centuries referenced to the epoch J.2000 for the specified Julian Day. |
double |
getJulianDay()
Return the Julian Day representation of this Epoch |
static double |
getJulianDay(java.util.Calendar calendar)
Get the double representation of the Julian Day for the specified Calendar. |
static double |
getJulianMillenniaJ2K(double julianDay)
Get the double representation of the Julian Millennia referenced to the epoch J.2000 for the specified Julian Day. |
int |
hashcode()
Return the hash code |
java.lang.String |
toString()
Return a String representation of this Epoch object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Epoch B1900
public static final Epoch B1950
public static final Epoch J2000
public static final Epoch J2050
public static final Epoch MJD
public static final double JULIAN_CENTURY
public static final double JULIAN_MILLENIUM
public static final double JULIAN_DAY_AT_THE_SYSTEM_EPOCH
public static final double HOURS_PER_DAY
public static final double MINUTES_PER_DAY
public static final double SECONDS_PER_DAY
public static final double MILLIS_PER_DAY
| Constructor Detail |
public Epoch()
Epoch object initialized to the value of the
current system time.
public Epoch(Epoch epoch)
Epoch object initialized to the value of the
argument.
epoch - the Epoch object to duplicatepublic Epoch(double julianDay)
Epoch object initialized from the argument Julian day.
julianDay - the double value of the epoch Julian day.public Epoch(java.util.Calendar cal)
Epoch object initialized to the
value of the argument Calendar.
cal - the argument Calendar.| Method Detail |
public static double getCurrentJulianDay()
public double getJulianDay()
Epoch
Epochpublic java.util.Calendar getCalendar()
Epoch
Epochpublic static double getJulianDay(java.util.Calendar calendar)
Calendar.
This method is only valid for the astronomical year -4712 (Gregorian year -4713) and later.
Note: The Gregorian calendar does not have the concept of the year 0 or negative dates. The Gregorian calendar transitions from the year 1 BC to the year 1 AD.
calendar - the Calendar to convert
public static double getJulianCenturiesJ2K(double julianDay)
julianDay - the Julian Day
public static double getJulianMillenniaJ2K(double julianDay)
julianDay - the Julian Day
public static java.util.Calendar getCalendar(double julianDay)
Calendar is set to Universal time.
julianDay - the Julian Day
Calendar
public static void getCalendar(double julianDay,
java.util.Calendar calendar)
Calendar object to coorespond
to the specified Julian Day. Note that the TimeZone of
the argument Calendar object is preserved.
julianDay - the Julian Daycalendar - the Calendar object to initializepublic static final double getFractionOfDay(java.util.Calendar cal)
Calendar fields that are less significant than
the Calendar.DAY field.
cal - the Calendar
double representing the fraction of a daypublic int hashcode()
public boolean equals(java.lang.Object obj)
Epochs for equality. The result is true
if and only if the argument object is not null, is an Epoch object
and represents the same Julian Day as this Epoch.
obj - the object to compare with
true if the Epochs are equivalent;
false otherwise.public int compareTo(Epoch that)
that - The Epoch to compare
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - The Object to compare
ClassCastException - if the argument is not an
Epoch.public java.lang.String toString()
Epoch object.
Epoch object
|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||