next up previous contents
Next: Year 2000 compliance and Up: System Overview Previous: Range Calculation   Contents


Time System

The ZY implements a 1PPS interrupt driven Modified Julian Date (MJD) clock based on the Bancomm bc630AT Real Time Clock card. When the ZY first starts up (or also under software command) the ZY starts this clock by reading the date from an NTP server, and setting the bc630AT to lock on the site IRIG-B time signal. Using the year obtained by NTP, the day of the year and the time (to the second), obtained from IRIG, the MJD clock is set. Thereafter, the seconds portion of the clock is incremented by the 1PPS Interrupt Service Routine (ISR). When the seconds reach 86400, this ISR clears the seconds and increments the day portion of the clock. When a time stamp is required, all that is needed from the bc630AT is the sub-second portion of the time (down to a millisecond). The format of the time stamp was chosen to encode the most information with the least amount of storage space and to facilitate time comparisons and other time operations. In addition, the time stamp needed to encode time with granularity of less than a millisecond. The best fit for these requirements was to encode the time and date in a 64-bit floating point number. This data type satisfies all the requirements above in a compact space and further, uses arithmetic operators already in existence. With 15 decimal digits of precision, this data type can give granularities well below 1 mS even while simultaneously storing the MJD. The ZY thus uses the following format for time stamps:
\begin{picture}(5.75, 0.5)
\put(1.25, 0.125){\large$DDDDD.FFFFFFFF$}\\
\end{picture}
where:

\begin{eqnarray*}
DDDDD & = & {\rm The\;modified\;julian\;day\;count}\\
FFFFFFFF & = & {\rm The\;fractional\;part\;of\;the\;current\;day}
\end{eqnarray*}



Currently, all ZY commands return a time stamp formatted with the fractional portion set to 8 digits. This yields a granularity of 0.864 mS to the time measurement (there are 86,400,000 mS to a day, therefore $86,000,000 \times 0.00000001 = 0.864$). The 64 bit floating point data type is actually capable of 2 more digits of precision, which, if the MJD remains at 5 digits, could bring the granularity to 8.64 $\mu$S. The ZY currently does not take advantage of this, however, as this calls for making time base corrections on board the bc630AT clock module[17], something that would make the acquisition of a time stamp a somewhat more involved matter. Should this extra precision be required in the future, the capability is there. The MJD clock and the bc630AT are controlled by software in the C++ class bc630AT.

Subsections
next up previous contents
Next: Year 2000 compliance and Up: System Overview Previous: Range Calculation   Contents
Ramon E. Creager 2002-03-11