My ADSB Receiver Box – GPS Precision Time – Upgrade 1

No we can edit the ntp service configuration to use PPS and GPS inputs for precision time. My configuration in /etc/ntp.conf

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# coarse time ref-clock, not really needed here as we have LAN & WAN servers
server minpoll 4 maxpoll 4 iburst true prefer
fudge flag1 1 refid SHM2 stratum 1

# Kernel-mode PPS ref-clock for the precise seconds
server minpoll 4 maxpoll 4
fudge refid PPS

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <>
server minpoll 10 iburst prefer
server minpoll 10 iburst
server minpoll 10 iburst prefer
server minpoll 10 iburst
server minpoll 5 maxpoll 5 iburst

Note that when using a PPS source you must have one other server marked “prefer”.  In the example above I have added prefer to the shared memory driver (type 28) so that the combination of PPS and GPSD would provide the correct time even with no Internet servers. The ntp service needs a restart then.

$ sudo service ntp force-reload

Now the ntp service should use PPS and GPS input for precision time keeping.
$ ntpq -crv -pn

associd=0 status=0115 leap_none, sync_pps, 1 event, clock_sync,
version="ntpd 4.2.8p9@1.3265-o Tue Dec 20 15:33:14 UTC 2016 (1)",
processor="armv7l", system="Linux/4.4.38-v7+", leap=00, stratum=1,
precision=-19, rootdelay=0.000, rootdisp=1.075, refid=PPS,
reftime=dc042552.9b78088d  Tue, Dec 20 2016 21:46:58.607,
clock=dc042558.9751bae5  Tue, Dec 20 2016 21:47:04.591, peer=44360, tc=4,
mintc=3, offset=0.011402, frequency=-8.472, sys_jitter=0.001907,
clk_jitter=0.107, clk_wander=0.011
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================    .GPS.            1 l    7   16  377    0.000    4.899   5.445
o127.127.22.0    .PPS.            0 l    6   16  377    0.000    0.011   0.002 .BCST.          16 B    -   64    0    0.000    0.000   0.002
+    2 u   44   64   77    0.515    0.967   0.038
*   .DCFp.           1 u  359 1024    1   34.215    0.470   0.172
+2003:63:2737:e7    2 u   30   32  377    0.547    0.910   0.114

The PPS and GPS drivers are present and connected (reach = 377).

Mission accomplished.



See also:

My ADSB Receiver Box

One thought on “My ADSB Receiver Box – GPS Precision Time – Upgrade 1

  1. The author has an excellent writing skill to present the theme of the article in an extremely well manner. I have thoroughly enjoyed the article and
    I will recommend all my friends to go through it at least once.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments will be moderated! Spam deleted immediately!
Before you submit form:
Human test by Not Captcha