Class GLONASSScale
- java.lang.Object
-
- org.orekit.time.GLONASSScale
-
- All Implemented Interfaces:
Serializable
,TimeScale
public class GLONASSScale extends Object implements TimeScale
GLONASS time scale.By convention, TGLONASS = UTC + 3 hours.
The time scale is defined in Global Navigation Sattelite System GLONASS - Interface Control document, version 5.1 2008 (the typo in the title is in the original document title).
This is intended to be accessed thanks to
TimeScales
, so there is no public constructor.- Author:
- Luc Maisonobe
- See Also:
AbsoluteDate
, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getLeap(AbsoluteDate date)
Get the value of the previous leap.<T extends CalculusFieldElement<T>>
TgetLeap(FieldAbsoluteDate<T> 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 in this time scale.<T extends CalculusFieldElement<T>>
booleaninsideLeap(FieldAbsoluteDate<T> date)
Check if date is within a leap second introduction in this time scale.int
minuteDuration(AbsoluteDate date)
Check length of the current minute in this time scale.<T extends CalculusFieldElement<T>>
intminuteDuration(FieldAbsoluteDate<T> date)
Check length of the current minute in this time scale.double
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.double
offsetToTAI(DateComponents date, TimeComponents time)
Get the offset to convert locations from instance toTAIScale
.String
toString()
-
-
-
Method Detail
-
offsetFromTAI
public double 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 double 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)
-
insideLeap
public boolean insideLeap(AbsoluteDate date)
Check if date is within a leap second introduction in this time scale.This method will return false for all time scales that do not implement leap seconds, even if the date corresponds to a leap second in
UTC scale
.- Specified by:
insideLeap
in interfaceTimeScale
- Parameters:
date
- date to check- Returns:
- true if time is within a leap second introduction
-
insideLeap
public <T extends CalculusFieldElement<T>> boolean insideLeap(FieldAbsoluteDate<T> date)
Check if date is within a leap second introduction in this time scale.This method will return false for all time scales that do not implement leap seconds, even if the date corresponds to a leap second in
UTC scale
.- Specified by:
insideLeap
in interfaceTimeScale
- Type Parameters:
T
- type of the filed elements- Parameters:
date
- date to check- Returns:
- true if time is within a leap second introduction
-
minuteDuration
public int minuteDuration(AbsoluteDate date)
Check length of the current minute in this time scale.This method will return 60 for all time scales that do not implement leap seconds, even if the date corresponds to a leap second in
UTC scale
, and 61 for time scales that do implement leap second when the current date is within the last minute before the leap, or during the leap itself.- Specified by:
minuteDuration
in interfaceTimeScale
- Parameters:
date
- date to check- Returns:
- 60 or 61 depending on leap seconds introduction
-
minuteDuration
public <T extends CalculusFieldElement<T>> int minuteDuration(FieldAbsoluteDate<T> date)
Check length of the current minute in this time scale.This method will return 60 for all time scales that do not implement leap seconds, even if the date corresponds to a leap second in
UTC scale
, and 61 for time scales that do implement leap second when the current date is within the last minute before the leap, or during the leap itself.- Specified by:
minuteDuration
in interfaceTimeScale
- Type Parameters:
T
- type of the filed elements- Parameters:
date
- date to check- Returns:
- 60 or 61 depending on leap seconds introduction
-
getLeap
public double getLeap(AbsoluteDate date)
Get the value of the previous leap.This method will return 0.0 for all time scales that do not implement leap seconds.
-
getLeap
public <T extends CalculusFieldElement<T>> T getLeap(FieldAbsoluteDate<T> date)
Get the value of the previous leap.This method will return 0.0 for all time scales that do not implement leap seconds.
-
getName
public String getName()
Get the name time scale.
-
-