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 127.127.28.0  minpoll 4 maxpoll 4 prefer
fudge 127.127.28.0 time1 +0.380 flag1 1 refid GPS stratum 1

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

# pool.ntp.org 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: <http://www.pool.ntp.org/join.html>
server de.pool.ntp.org minpoll 10 iburst prefer
server fritz.box 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
==============================================================================
 127.127.28.0    .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
 192.168.178.255 .BCST.          16 B    -   64    0    0.000    0.000   0.002
+192.168.178.1   131.188.3.221    2 u   44   64   77    0.515    0.967   0.038
*131.188.3.221   .DCFp.           1 u  359 1024    1   34.215    0.470   0.172
+2003:63:2737:e7 131.188.3.221    2 u   30   32  377    0.547    0.910   0.114

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

Mission accomplished.

 

References:

http://www.satsignal.eu/ntp/Raspberry-Pi-quickstart.html

http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html

http://www.catb.org/gpsd/gpsd-time-service-howto.html

http://serverfault.com/questions/329596/how-to-override-the-ntp-information-sent-by-dhcp-in-debian

http://www.catb.org/gpsd/troubleshooting.html

https://www.adafruit.com/product/746

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