public class TimeStandard extends Object implements IIndexedFormat
ArithmeticSafeStandard (get) in order to correctly compare times.
In many cases, it may be more efficient to work directly in the corresponding ArithmeticSafeStandard (get).| Constructor and Description |
|---|
TimeStandard(String name,
String abbreviation,
TimeStandard arithmeticSafeStandard)
Initializes a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAbbreviation()
Gets an abbreviation for this time standard.
|
TimeStandard |
getArithmeticSafeStandard()
Gets a time standard that is equivalent to this time standard but is safe for arithmetic.
|
static TimeStandard |
getBarycentricDynamicalTime()
Gets the Barycentric Dynamical Time (TDB) time standard.
|
static TimeStandard |
getCoordinatedUniversalTime()
Gets the Coordinated Universal Time (UTC) time standard.
|
static TimeStandard |
getGlobalPositioningSystemTime()
Gets the Global Positioning System (GPS) time standard.
|
int |
getIndex()
Gets the index corresponding to this time standard.
|
static TimeStandard |
getInternationalAtomicTime()
Gets the International Atomic Time (TAI) time standard.
|
String |
getName()
Gets the name of this time standard.
|
static TimeStandard |
getTerrestrialTime()
Gets the Terrestrial Time (TT) time standard.
|
static TimeStandard |
getUniversalTime1()
Gets the Universal Time 1 (UT1) time standard.
|
String |
toString()
Converts this time standard to a string representation.
|
public TimeStandard(@Nonnull String name, @Nonnull String abbreviation, @Nullable TimeStandard arithmeticSafeStandard)
name - The name of the time standard.abbreviation - An abbreviation for the time standard.arithmeticSafeStandard - Another time standard that is closely related to this one but is safe for arithmetic,
or null if this standard is itself safe for arithmetic.ArgumentNullException - Thrown when name or abbreviation is null.@Nonnull public static TimeStandard getInternationalAtomicTime()
TAI is the principal time standard to which the other time standards are related.
@Nonnull public static TimeStandard getTerrestrialTime()
TT is related to TAI according to the relationship
TT = TAI + 32.184 seconds.
@Nonnull public static TimeStandard getBarycentricDynamicalTime()
TDB is related to TT according to the relationship
TDB = TT + deltaT,
where deltaT is the difference due to time dilation and
is determined according to equation (2.222-1) on page 42 of Seidelmann, P. Kenneth, ed.
"Explanatory Supplement to the Astronomical Almanac". Mill Valley, CA: University Science Books, 1992.
@Nonnull public static TimeStandard getCoordinatedUniversalTime()
UTC is related to TAI according to the relationship
UTC = TAI - deltaT,
where deltaT is the number of leap seconds which have been introduced as of the time in TAI.
@Nonnull public static TimeStandard getGlobalPositioningSystemTime()
GPS is related to TAI according to the relationship
GPS = TAI - 19.0 seconds.
@Nonnull public static TimeStandard getUniversalTime1()
UT1 is related to UTC according to the relationship
UT1 = UTC + deltaT,
where deltaT is a correction interpolated at the time in UTC
from the Earth orientation parameters.
@Nonnull public final String getAbbreviation()
@Nullable public final TimeStandard getArithmeticSafeStandard()
CoordinatedUniversalTime (get) is not safe for arithmetic
(and thus returns InternationalAtomicTime (get))
but UniversalTime1 (get) is safe for arithmetic.
If a time standard is safe for arithmetic, returns null.public final int getIndex()
getIndex in interface IIndexedFormat