Class SatelliteClockScale
- All Implemented Interfaces:
TimeScale
- Since:
- 11.0
- Author:
- Luc Maisonobe
-
Constructor Summary
ConstructorsConstructorDescriptionSatelliteClockScale(String name, AbsoluteDate epoch, TimeScale epochScale, double countAtEpoch, double drift) Create a linear model for satellite clock. -
Method Summary
Modifier and TypeMethodDescriptiondoublecountAtDate(AbsoluteDate date) Compute clock count corresponding to some date.dateAtCount(double count) Compute date corresponding to some clock count.getName()Get the name time scale.offsetFromTAI(AbsoluteDate date) Get the offset to convert locations fromTAIScaleto instance.<T extends CalculusFieldElement<T>>
ToffsetFromTAI(FieldAbsoluteDate<T> date) Get the offset to convert locations fromTAIScaleto instance.offsetToTAI(DateComponents date, TimeComponents time) Get the offset to convert locations from instance toTAIScale.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.orekit.time.TimeScale
getLeap, getLeap, insideLeap, insideLeap, minuteDuration, minuteDuration
-
Constructor Details
-
SatelliteClockScale
public SatelliteClockScale(String name, AbsoluteDate epoch, TimeScale epochScale, double countAtEpoch, double drift) Create a linear model for satellite clock.Beware that we specify the model using its drift with respect to flow of time. For a perfect clock without any drift, the clock count would be one tick every SI second. A clock that is fast, say for example it generates 1000001 ticks every 1000000 SI second, would have a rate of 1.000001 tick per SI second and hence a drift of 1.0e-6 tick per SI second. In this constructor we use the drift (1.0e-6 in the previous example) rather than the rate (1.000001 in the previous example) to specify the clock. The rationale is that for clocks that are intended to be used for representing absolute time, the drift is expected to be small (much smaller that 1.0e-6 for a good clock), so using drift is numerically more stable than using rate and risking catastrophic cancellation when subtracting 1.0 in the internal computation.
Despite what is explained in the previous paragraph, this class can handle spacecraft clocks that are not intended to be synchronized with SI seconds, for example clocks that ticks at 10 Hz. In such cases the drift would need to be set at 10.0 - 1.0 = 9.0, which is not intuitive. For these clocks, the methods
countAtDate(AbsoluteDate)anddateAtCount(double)and perhapsoffsetFromTAI(AbsoluteDate)are still useful, whereasoffsetToTAI(DateComponents, TimeComponents)is probably not really meaningful.- Parameters:
name- of the scaleepoch- reference epochepochScale- time scale in which theepochwas definedcountAtEpoch- clock count atepochdrift- clock drift rate (i.e. clock count change per SI second minus 1.0)
-
-
Method Details
-
offsetFromTAI
Get the offset to convert locations fromTAIScaleto instance.- Specified by:
offsetFromTAIin interfaceTimeScale- Parameters:
date- conversion date- Returns:
- offset in seconds to add to a location in
TAIScaletime scale to get a location in instance time scale - See Also:
-
offsetToTAI
Get the offset to convert locations from instance toTAIScale.- Specified by:
offsetToTAIin 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
TAIScaletime scale - See Also:
-
dateAtCount
Compute date corresponding to some clock count.- Parameters:
count- clock count- Returns:
- date at
count
-
countAtDate
Compute clock count corresponding to some date.- Parameters:
date- date- Returns:
- clock count at
date
-
offsetFromTAI
Get the offset to convert locations fromTAIScaleto instance.- Specified by:
offsetFromTAIin interfaceTimeScale- Type Parameters:
T- type of the filed elements- Parameters:
date- conversion date- Returns:
- offset in seconds to add to a location in
TAIScaletime scale to get a location in instance time scale - See Also:
-
getName
Get the name time scale. -
toString
-