Interface TimeScale
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BDTScale
,GalileoScale
,GLONASSScale
,GMSTScale
,GPSScale
,IRNSSScale
,QZSSScale
,SatelliteClockScale
,TAIScale
,TCBScale
,TCGScale
,TDBScale
,TTScale
,UT1Scale
,UTCScale
public interface TimeScale extends Serializable
Interface for time scales.This is the interface representing all time scales. Time scales are related to each other by some offsets that may be discontinuous (for example the
UTC scale
with respect to theTAI scale
).- Author:
- Luc Maisonobe
- See Also:
AbsoluteDate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default double
getLeap(AbsoluteDate date)
Get the value of the previous leap.default <T extends CalculusFieldElement<T>>
TgetLeap(FieldAbsoluteDate<T> date)
Get the value of the previous leap.String
getName()
Get the name time scale.default boolean
insideLeap(AbsoluteDate date)
Check if date is within a leap second introduction in this time scale.default <T extends CalculusFieldElement<T>>
booleaninsideLeap(FieldAbsoluteDate<T> date)
Check if date is within a leap second introduction in this time scale.default int
minuteDuration(AbsoluteDate date)
Check length of the current minute in this time scale.default <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.default double
offsetToTAI(DateComponents date, TimeComponents time)
Get the offset to convert locations from instance toTAIScale
.
-
-
-
Method Detail
-
offsetFromTAI
double offsetFromTAI(AbsoluteDate date)
Get the offset to convert locations fromTAIScale
to instance.- 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:
offsetToTAI(DateComponents, TimeComponents)
-
offsetFromTAI
<T extends CalculusFieldElement<T>> T offsetFromTAI(FieldAbsoluteDate<T> date)
Get the offset to convert locations fromTAIScale
to instance.- 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 - Since:
- 9.0
- See Also:
offsetToTAI(DateComponents, TimeComponents)
-
offsetToTAI
default double offsetToTAI(DateComponents date, TimeComponents time)
Get the offset to convert locations from instance toTAIScale
.- 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:
offsetFromTAI(AbsoluteDate)
-
insideLeap
default 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
.- Parameters:
date
- date to check- Returns:
- true if time is within a leap second introduction
-
insideLeap
default <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
.- Type Parameters:
T
- type of the filed elements- Parameters:
date
- date to check- Returns:
- true if time is within a leap second introduction
- Since:
- 9.0
-
minuteDuration
default 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.- Parameters:
date
- date to check- Returns:
- 60 or 61 depending on leap seconds introduction
-
minuteDuration
default <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.- Type Parameters:
T
- type of the filed elements- Parameters:
date
- date to check- Returns:
- 60 or 61 depending on leap seconds introduction
- Since:
- 9.0
-
getLeap
default 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.
- Parameters:
date
- date to check- Returns:
- value of the previous leap
-
getLeap
default <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.
- Type Parameters:
T
- type of the filed elements- Parameters:
date
- date to check- Returns:
- value of the previous leap
- Since:
- 9.0
-
getName
String getName()
Get the name time scale.- Returns:
- name of the time scale
-
-