Contents
In concert with the controller's NTP client, the controller has the ability to record the time at which certain events occur.
Mechanism
The clocking engine includes an instruction that, when executed, results in an interrupt. At the top of the interrupt handler, the current time is recorded and stored. By inserting this instruction at the relevant points in the clocking engine instruction stream, significant events in the clocking engine's operation can be timestamped.
Application
The controller's timestamping ability was originally created to accurately record the timing of video frames. To that end, the following events are recorded for each frame of video:
- The beginning of the frame's integration period.
- The end of the integration period.
- The beginning of the video data readout.
- The end of the readout.
Each of the timestamps recorded is stored in the FITS header of each frame in the keywords VINTSTRT, VINTEND, VRDSTRT and VRDEND respectively. if the NTP client is synchronised with an NTP server, then these timestamps will reflect unix time as reported by the server, otherwise the timestamps will be based on the controller's uptime.
Accuracy
The dominant factor in the timestamps' accuracy is in the time derived from NTP. Each timestamp will be subject to a latency of a few microseconds (< 10 usec) due to the latency of the interrupt handler and the software executed to retrieve system time, which is then converted to real-world time from the information available to the NTP client. This effect is small when compared with the likely best-case accuracy of the NTP client of about 100 usec.