Package org.orekit.time
Class ConstantOffsetTimeScale
- java.lang.Object
-
- org.orekit.time.ConstantOffsetTimeScale
-
- All Implemented Interfaces:
Serializable
,TimeScale
- Direct Known Subclasses:
BDTScale
,GalileoScale
,GPSScale
,IRNSSScale
,QZSSScale
,TAIScale
,TTScale
public class ConstantOffsetTimeScale extends Object implements TimeScale
Base class for time scales with constant offset with respect to to TAI.- Since:
- 12.1
- Author:
- Luc Maisonobe
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConstantOffsetTimeScale(String name, TimeOffset offset)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Get the name time scale.TimeOffset
offsetFromTAI(AbsoluteDate date)
Get the offset to convert locations fromTAIScale
to instance.<T extends CalculusFieldElement<T>>
ToffsetFromTAI(FieldAbsoluteDate<T> date)
Get the offset to convert locations fromTAIScale
to instance.TimeOffset
offsetToTAI(DateComponents date, TimeComponents time)
Get the offset to convert locations from instance toTAIScale
.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.orekit.time.TimeScale
getLeap, getLeap, insideLeap, insideLeap, minuteDuration, minuteDuration
-
-
-
-
Constructor Detail
-
ConstantOffsetTimeScale
public ConstantOffsetTimeScale(String name, TimeOffset offset)
Simple constructor.- Parameters:
name
- name of the time scaleoffset
- offset from TAI
-
-
Method Detail
-
offsetFromTAI
public TimeOffset offsetFromTAI(AbsoluteDate date)
Get the offset to convert locations fromTAIScale
to instance.- Specified by:
offsetFromTAI
in interfaceTimeScale
- 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)
-
offsetFromTAI
public <T extends CalculusFieldElement<T>> T offsetFromTAI(FieldAbsoluteDate<T> date)
Get the offset to convert locations fromTAIScale
to instance.- Specified by:
offsetFromTAI
in interfaceTimeScale
- Type Parameters:
T
- type of the filed elements- 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 TimeOffset offsetToTAI(DateComponents date, TimeComponents time)
Get the offset to convert locations from instance toTAIScale
.- Specified by:
offsetToTAI
in interfaceTimeScale
- Parameters:
date
- date location in the time scaletime
- 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.
-
-