Class SatelliteClockScale

    • Constructor Detail

      • 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) and dateAtCount(double) and perhaps offsetFromTAI(AbsoluteDate) are still useful, whereas offsetToTAI(DateComponents, TimeComponents) is probably not really meaningful.

        name - of the scale
        epoch - reference epoch
        epochScale - time scale in which the epoch was defined
        countAtEpoch - clock count at epoch
        drift - clock drift rate (i.e. clock count change per SI second minus 1.0)