org.orekit.time
Class UTCScale

java.lang.Object
  extended by org.orekit.time.UTCScale
All Implemented Interfaces:
TimeScale

public class UTCScale
extends Object
implements TimeScale

Coordinated Universal Time.

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.

Author:
Luc Maisonobe
See Also:
AbsoluteDate

Method Summary
 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()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

offsetFromTAI

public double offsetFromTAI(AbsoluteDate date)
Get the offset to convert locations from TAIScale to instance.

Specified by:
offsetFromTAI in interface TimeScale
Parameters:
date - conversion date
Returns:
offset in seconds to add to a location in TAIScale time scale to get a location in instance time scale
See Also:
TimeScale.offsetToTAI(DateComponents, TimeComponents)

offsetToTAI

public double offsetToTAI(DateComponents date,
                          TimeComponents time)
Get the offset to convert locations from instance to TAIScale.

Specified by:
offsetToTAI in interface TimeScale
Parameters:
date - date location in the time scale
time - time location in the time scale
Returns:
offset in seconds to add to a location in instance time scale to get a location in TAIScale time scale
See Also:
TimeScale.offsetFromTAI(AbsoluteDate)

getName

public String getName()
Get the name time scale.

Specified by:
getName in interface TimeScale
Returns:
name of the time scale

toString

public String toString()

Overrides:
toString in class Object

getFirstKnownLeapSecond

public AbsoluteDate getFirstKnownLeapSecond()
Get the date of the first known leap second.

Returns:
date of the first known leap second

getLastKnownLeapSecond

public AbsoluteDate getLastKnownLeapSecond()
Get the date of the last known leap second.

Returns:
date of the last known leap second

insideLeap

public boolean insideLeap(AbsoluteDate date)
Check if date is within a leap second introduction.

Parameters:
date - date to check
Returns:
true if time is within a leap second introduction

getLeap

public double getLeap(AbsoluteDate date)
Get the value of the previous leap.

Parameters:
date - date to check
Returns:
value of the previous leap


Copyright © 2017 CNES. All Rights Reserved.