public class UTCScale extends Object implements TimeScale
UTC is related to TAI using step adjustments from time to time according to IERS (International Earth Rotation Service) rules. Before 1972, these adjustments were piecewise linear offsets. Since 1972, these adjustments are piecewise constant offsets, which require introduction of leap seconds.
Leap seconds are always inserted as additional seconds at the last minute of the day, pushing the next day forward. Such minutes are therefore more than 60 seconds long. In theory, there may be seconds removal instead of seconds insertion, but up to now (2010) it has never been used. As an example, when a one second leap was introduced at the end of 2005, the UTC time sequence was 2005-12-31T23:59:59 UTC, followed by 2005-12-31T23:59:60 UTC, followed by 2006-01-01T00:00:00 UTC.
The OREKIT library retrieves the post-1972 constant time steps data thanks to the
DataProvidersManager
class. The linear models used between
1961 and 1972 are built-in in the class itself.
This is intended to be accessed thanks to the TimeScalesFactory
class, so there is no public constructor.
Every call to TimeScalesFactory.getUTC()
will create a new UTCScale
instance, sharing the UTC-TAI
offset table between all instances.
AbsoluteDate
Modifier and Type | Method and Description |
---|---|
AbsoluteDate |
getFirstKnownLeapSecond()
Get the date of the first known leap second.
|
AbsoluteDate |
getLastKnownLeapSecond()
Get the date of the last known leap second.
|
double |
getLeap(AbsoluteDate date)
Get the value of the previous leap.
|
String |
getName()
Get the name time scale.
|
boolean |
insideLeap(AbsoluteDate date)
Check if date is within a leap second introduction.
|
double |
offsetFromTAI(AbsoluteDate date)
Get the offset to convert locations from
TAIScale to instance. |
double |
offsetToTAI(DateComponents date,
TimeComponents time)
Get the offset to convert locations from instance to
TAIScale . |
String |
toString() |
public double offsetFromTAI(AbsoluteDate date)
TAIScale
to instance.offsetFromTAI
in interface TimeScale
date
- conversion dateTAIScale
time scale to get a location in instance time scaleTimeScale.offsetToTAI(DateComponents, TimeComponents)
public double offsetToTAI(DateComponents date, TimeComponents time)
TAIScale
.offsetToTAI
in interface TimeScale
date
- date location in the time scaletime
- time location in the time scaleTAIScale
time scaleTimeScale.offsetFromTAI(AbsoluteDate)
public String getName()
public AbsoluteDate getFirstKnownLeapSecond()
public AbsoluteDate getLastKnownLeapSecond()
public boolean insideLeap(AbsoluteDate date)
date
- date to checkpublic double getLeap(AbsoluteDate date)
date
- date to checkCopyright © 2018 CNES. All Rights Reserved.