public class ERFALib
extends java.lang.Object
ERFALib is a Java JNI wrapper around Time transformations in the ERFA (Essential Routines for Fundamental Astronomy) C library. Specifically:
TIA to TT
TAI to UTC
TT to TAI
UTC to TAI
where
TAI - International Atomic Time
TT - Terrestrial Time
UTC - Coordinated Universal Time
| Constructor and Description |
|---|
ERFALib() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
tai2tt(double tai1,
double tai2)
Time scale transformation: International Atomic Time, TAI, to Terrestrial Time, TT.
|
static double[] |
tai2utc(double tai1,
double tai2)
Time scale transformation: International Atomic Time, TAI, to Coordinated Universal Time, UTC.
|
static double[] |
tt2tai(double tt1,
double tt2)
Time scale transformation: Terrestrial Time, TT, to International Atomic Time, TAI.
|
static double[] |
tt2utc(double tt1,
double tt2)
Convenience method to transform TT to UTC by calling TT to TAI and TAI to UTC.
|
static double[] |
utc2tai(double utc1,
double utc2)
Time scale transformation: Coordinated Universal Time, UTC, to International Atomic Time, TAI.
|
static double[] |
utc2tt(double utc1,
double utc2)
Convenience method to transform UTC to TT by calling UTC to TAI and TAI to TT.
|
public static double[] tt2utc(double tt1,
double tt2)
throws ERFALibException,
DubiousYearException,
UnacceptableDateException
Convenience method to transform TT to UTC by calling TT to TAI and TAI to UTC.
tt1+tt2 is a two part Julian Date, apportioned in any convenient way between the two arguments, for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The returned utc1+utc2 form an analogous pair, except that a special convention is used, to deal with the problem of leap seconds.
JD cannot unambiguously represent UTC during a leap second unless special measures are taken. The convention in the present function is that the returned quasi-JD UTC1+UTC2 represents UTC days whether the length is 86399, 86400 or 86401 SI seconds.
tt1 - TT as a 2-part Julian Date.tt2 - TT as a 2-part Julian Date.ERFALibException - if an error occurs doing the transformation.DubiousYearException - if a date predates the introduction of the UTC timescale
or are too far in the future to be trusted.UnacceptableDateException - if a date is so early that a Julian Date
could not be computed.public static double[] utc2tt(double utc1,
double utc2)
throws DubiousYearException,
UnacceptableDateException,
ERFALibException
Convenience method to transform UTC to TT by calling UTC to TAI and TAI to TT.
utc1+utc2 is a 2-part Julian Date, apportioned in any convenient way between the two arguments, for example where tai1 is the Julian Day Number and tai2 is the fraction of a day. The returned tt1+tt2 follow suit.
JD cannot unambiguously represent UTC during a leap second unless special measures are taken. The convention in the present function is that the JD day represents UTC days whether the length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era there were smaller jumps (in either direction) each time the linear UTC(TAI) expression was changed, and these "mini-leaps" are also included in the ERFA convention.
utc1 - UTC as a 2-part quasi Julian Date.utc2 - UTC as a 2-part quasi Julian Date.ERFALibException - if an error occurs doing the transformation.DubiousYearException - if a date predates the introduction of the UTC timescale
or are too far in the future to be trusted.UnacceptableDateException - if a date is so early that a Julian Date
could not be computed.public static double[] tai2tt(double tai1,
double tai2)
throws ERFALibException
Time scale transformation: International Atomic Time, TAI, to Terrestrial Time, TT.
tai1+tai2 is a two part Julian Date, apportioned in any convenient way between the two arguments, for example where tai1 is the Julian Day Number and tai2 is the fraction of a day. The returned tt1,tt2 follow suit.
tai1 - TAI as a 2-part Julian Datetai2 - TAI as a 2-part Julian DateERFALibException - if an error occurs doing the conversion.public static double[] tai2utc(double tai1,
double tai2)
throws ERFALibException,
DubiousYearException,
UnacceptableDateException
Time scale transformation: International Atomic Time, TAI, to Coordinated Universal Time, UTC.
tai1+tai2 is a 2-part Julian Date, apportioned in any convenient way between the two arguments, for example where tai1 is the Julian Day Number and tai2 is the fraction of a day. The returned utc1+utc2 form an analogous pair, except that a special convention is used, to deal with the problem of leap seconds.
JD cannot unambiguously represent UTC during a leap second unless special measures are taken. The convention in the present function is that the JD day represents UTC days whether the length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era there were smaller jumps (in either direction) each time the linear UTC(TAI) expression was changed, and these "mini-leaps" are also included in the ERFA convention.
tai1 - TAI as a 2-part Julian Date.tai2 - TAI as a 2-part Julian Date.ERFALibException - if an error occurs doing the transformation.DubiousYearException - if a date predates the introduction of the UTC timescale
or are too far in the future to be trusted.UnacceptableDateException - if a date is so early that a Julian Date
could not be computed.public static double[] tt2tai(double tt1,
double tt2)
throws ERFALibException
Time scale transformation: Terrestrial Time, TT, to International Atomic Time, TAI.
tt1+tt2 is a two part Julian Date, apportioned in any convenient way between the two arguments, for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The returned tai1+tai2 follow suit.
tt1 - TT as a 2-part Julian Datett2 - TT as a 2-part Julian DateERFALibException - if an error occurs doing the conversion.public static double[] utc2tai(double utc1,
double utc2)
throws ERFALibException,
DubiousYearException,
UnacceptableDateException
Time scale transformation: Coordinated Universal Time, UTC, to International Atomic Time, TAI.
utc1+utc2 is a 2-part Julian Date, apportioned in any convenient way between the two arguments, for example where tai1 is the Julian Day Number and tai2 is the fraction of a day. The returned tai1+tai2 follow suit.
JD cannot unambiguously represent UTC during a leap second unless special measures are taken. The convention in the present function is that the JD day represents UTC days whether the length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era there were smaller jumps (in either direction) each time the linear UTC(TAI) expression was changed, and these "mini-leaps" are also included in the ERFA convention.
utc1 - UTC as a 2-part quasi Julian Date.utc2 - UTC as a 2-part quasi Julian Date.ERFALibException - if an error occurs doing the transformation.DubiousYearException - if a date predates the introduction of the UTC timescale
or are too far in the future to be trusted.UnacceptableDateException - if a date is so early that a Julian Date
could not be computed.