1ms or better accuracy on a USB-connected GPS.
Filter now measures the difference between the moving average offset and the sampled offsets for the past 192 seconds, and selects a filter that discards 20% of the samples before selecting the offset to send to NTP. The micro's PLL now uses 2mhz as its intermediate frequency instead of 1mhz, to evaluate its effect on jitter
Loopstats graph - local clock error (PPM, green) and USB/GPS offset (µs, red)
Comparison of run9 and run10 jitter:
percentile | Run 9 | Run 10 |
---|---|---|
50% | 2 µs | 1 µs |
90.0% | 6 µs | 2 µs |
99.0% | 12 µs | 3 µs |
99.9% | 19 µs | 8 µs |
This is a close-up view of 2 minutes worth of data. The red is the raw samples (in µs), the green is the offset sent to NTP (in µs), and the blue and and purple lines are the min/max filters
You can see the filter reacting to a variety of sample conditions, while still rejecting the majority of noise
Changing the PLL's intermediate frequency from 1mhz to 2mhz did not change the microcontroller's clock wander or jitter significantly
The filter made a huge difference in ntp's measured jitter