ntpstats.gnsslab¶
GNSS/PPS timing on a Linux host and in the lab: gpsd and the TAPR TICC.
gpsd (gpspipe -w output, or a live connection; gpsd_json(5)). Two
messages carry timing:
PPS
each PPS edge: real_sec/real_nsec is the GNSS time of the edge,
clock_sec/clock_nsec the system clock's time stamp of it. The
offset real - clock is the GNSS reference minus the local clock, the
ntpstats convention. precision (NTP style, log2 s) and, from
receivers that report it, qErr (ps) are kept.
TOFF
the same for the time in the serial data stream (start of the reporting
cycle), with the much larger serial and processing latency.
One series per device and message. qErr lets ntpstats sawtooth correct
a gpsd PPS series without a separate receiver log.
TAPR TICC (timestamping counter; output as in its firmware print.cpp
and manual): lines 1.897999794440 chA in Timestamp, Period and
3-Corner-Hat modes, bare numbers in Time Interval mode, comment lines starting
with #. Timestamps are seconds since the counter started; with the
WRAP setting only the last digits of the seconds are printed, which is
undone here. For each channel the series is the phase against an ideal grid
of the nominal period (the time interval error of the input); with two
channels the difference chA - chB of events paired within half a period
is added. Times are counter seconds, not POSIX time, unless epoch is given.
parse_gpsd(lines, name='gpsd')
¶
PPS and TOFF series per device from gpsd JSON lines (gpspipe -w).
sample_gpsd(cmd=('localhost:2947',), timeout=3.0)
¶
One PPS (or, without PPS, TOFF) offset from a running gpsd (host:port).
parse_ticc(lines, name='ticc', period=None, epoch=0.0)
¶
Series from TAPR TICC output: phase per channel, chA - chB, or the intervals of Time Interval mode.