RPI + Adafruit GPS sanity check

Patrick 201905-ntpsec at jslf.app
Fri May 17 02:21:24 UTC 2019

On 2019-05-16 11:42, Gary E. Miller wrote:
> No matter how good your skyview, the NMEA based time will be aweful.

This is because although the GPS chip knows where and when it is, there
is much jitter in conveying that time info to any userland process --
i.e. encoding into NMEA + transmission over 9600 baud serial line +
kernel to user land + decoding.

The instability in the offset is due to what? It's not the
online-average of the lag since NTP started.

> > Since the PPS is /dev/pps0, gpsd can be dropped.
> Not really.  PPS just tells you the top of the second, but not which
> second.

Won't refclock 20/nmea provide resolution at the second? It can be set
with a large offset to de-preference it.

Alternatively, set the 20/nmea refclock to be stratum 10?

> > Is there anything that should be done to prevent mishaps like the USNO
> > has had over time?
> Care to be more specific?



It seems that one fix is to have an iptables rule that drops NTP clients'
packets unless some notion of goodness is obtained -- say 5 peers with
reachability of 377 and all in agreement?

Or is there a way to have NTP stop serving time when the GPS and other
peers aren't in agreement at the resolution of 1 second?

> > ####### /etc/ntp.conf #######
> >
> > refclock pps         refid PPS ppspath /dev/pps0 minpoll 4 maxpoll 4
> Play with other poll times.

How to tell whether there is an improvement?

> > prefer refclock nmea        refid GPS path /dev/ttyAMA0 baud 9600
> absolutely NOT.

Because of the 'prefer'? That looks like a line-wrap issue:

> > # local servers
> > server     iburst minpoll 4 maxpoll 4
> > server      iburst minpoll 4 maxpoll 4
> Maybe too short a poll interval on the net.

Because of the load on the remote server?

These are all machines that I admin.

> > server jp.pool.ntp.org iburst
> > server kr.pool.ntp.org iburst
> Those pools are too far from each other.  Try to pick good and nearby
> chimers.

Will do. Thanks again for the feedback and clarifications!


More information about the users mailing list