How does NetDAS GPS timing work?

NetDAS “timing” refers to how NetDAS time stamps GRF packets. Note that time-stamping data is more involved than just reading the system clock and using that as the time stamp. This simplistic approach would not work for two reasons. Firstly, the system clock would not have the required resolution, down to the microsecond level and secondly, the analog-digital data stream is asynchronous to the ADC sampling.

GRFd does however use the system clock as a reference to the second. The GPS thread maintains the UTC delta relative to the system clock (along with the GPS lock state). The time stamp is the system time + the UTC delta. Note that this time only resolves the time to the UTC second. The PPS signal (to the ADC board) resolves the time to the microsecond level and these are used together to generate the time stamp.

Assuming that the GPS was locked at some point, the delta was known and the quality was 'good'. When the GPS loses lock, or (perhaps) stops outputting NMEA RMC sentences, the system is free running using the last GPS delta. This will cause time drift so the time quality will be 'poor'. When the GPS regains lock, the UTC delta begins to update again and results in a time tear in the data when the quality goes back to 'good'.