org.das2.datum.LeapSecondsConverter
TT2000 converter that takes leap seconds into account from us2000.
LeapSecondsConverter( boolean us2000ToTT2000 )
T1972_LEAP
convert
convert( double value ) → double
Parameters
value - a double
Returns:
double
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getInverse
getInverse( ) → org.das2.datum.UnitsConverter
Returns:
org.das2.datum.UnitsConverter
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getLeapSecondCountForTT2000
getLeapSecondCountForTT2000( long tt2000 ) → int
calculate the number of leap seconds in the tt2000 time. For example,
print getLeapSecondCountForTT2000( Units.cdfTT2000.parse('1972-01-01T00:00Z').doubleValue(Units.cdfTT2000) ) # results in 10
print getLeapSecondCountForTT2000( 0 ) # results in 32
print getLeapSecondCountForTT2000( Units.cdfTT2000.parse('2017-01-01T00:00Z').doubleValue(Units.cdfTT2000) ) # results in 37
This is intended to replicate the table https://cdf.gsfc.nasa.gov/html/CDFLeapSeconds.txt
Parameters
tt2000 - the time in tt2000, which include the leap seconds.
Returns:
the number of leap seconds for the time.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getLeapSecondCountForUs2000
getLeapSecondCountForUs2000( double us2000 ) → int
calculate the number of leap seconds in the us2000 time. For example,
print getLeapSecondCountForUs2000( Units.us2000.parse('1972-01-01T00:00Z').doubleValue(Units.us2000) ) # results in 10
print getLeapSecondCountForUs2000( Units.us2000.parse('2017-01-01T00:00Z').doubleValue(Units.us2000) ) # results in 37
This is intended to replicate the table https://cdf.gsfc.nasa.gov/html/CDFLeapSeconds.txt
Parameters
us2000 - the time in us2000, which include the leap seconds.
Returns:
the number of leap seconds for the time.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]