pub struct Pps {
pub device: String,
pub real_sec: f32,
pub real_nsec: f32,
pub clock_sec: f32,
pub clock_nsec: f32,
pub precision: f32,
}
Expand description
This message is emitted each time the daemon sees a valid PPS (Pulse Per Second) strobe from a device.
This message exactly mirrors the TOFF message except for two details.
PPS emits the NTP precision. See the NTP documentation for their definition of precision.
The TOFF message reports the GPS time as derived from the GPS serial data stream. The PPS message reports the GPS time as derived from the GPS PPS pulse.
There are various sources of error in the reported clock times. The speed of the serial connection between the GPS and the system adds a delay to start of cycle detection. An even bigger error is added by the variable computation time inside the GPS. Taken together the time derived from the start of the GPS cycle can have offsets of 10 millisecond to 700 milliseconds and combined jitter and wander of 100 to 300 millisecond.
This message is emitted once per second to watchers of a device emitting PPS, and reports the time of the start of the GPS second (when the 1PPS arrives) and seconds as reported by the system clock (which may be NTP-corrected) at that moment.
The message contains two second/nanosecond pairs: real_sec and real_nsec contain the time the GPS thinks it was at the PPS edge; clock_sec and clock_nsec contain the time the system clock thinks it was at the PPS edge. real_nsec is always to nanosecond precision. clock_nsec is nanosecond precision on most systems.
There are various sources of error in the reported clock times. For PPS delivered via a real serial-line strobe, serial-interrupt latency plus processing time to the timer call should be bounded above by about 10 microseconds; that can be reduced to less than 1 microsecond if your kernel supports RFC 2783. USB1.1-to-serial control-line emulation is limited to about 1 millisecond.
Fields§
§device: String
Name of originating device.
real_sec: f32
Seconds from the PPS source.
real_nsec: f32
Nanoseconds from the PPS source.
clock_sec: f32
Seconds from the system clock.
clock_nsec: f32
Nanoseconds from the system clock.
precision: f32
NTP style estimate of PPS precision.