[time-nuts] Dual PPS ntpd

John Pettitt jpp at cloudview.com
Wed May 31 19:24:26 EDT 2006


Glenn Powers wrote:
> The question of using Dual PPS inputs with ntpd/FreeBSD came up a  
> long time ago on the ntp:questions list, but it doesn't look like it  
> was ever resolved.
>
> Has anyone here used ntpd with two PPS inputs?
>
> What I want to do is to connect an Oncore GPS / 1 PPS  to serial0 and  
> connect an undisciplined Rb. Osc. 1 PPS to serial1. (Even better  
> would be to use the RTS line on serial0 for the 2nd PPS, but that  
> would require some driver work.)
>
> I'd like to use ntp to find the offset between the two PPS's and then  
> apply that offset in ntpd to the second PPS. Then, if I lose GPS  
> coverage, the second PPS should kick in with the offset applied.
>
> I know the accuracy won't be as good as a directly disciplined Osc.,  
> but I think it would good enough for ntp.
>
> I think this design would qualify for the "Cheapest GPS Disciplined  
> True Atomic Clock with NTP Server."
>
> thoughts?
> glenn
>
>   

If you want to use the Rb as a "Backup PPS" I'd suggest not using
noselect but instead  fudging it's stratum to 1 rather than 0 - you'll
still need a "prefer" clock for it to diciplin (it seems you can have
several prefer clocks)

ntp.conf would look something like this:

#GPS Clock - adjust mode to taste
server 127.127.20.1  mode 2 version 4 prefer 

#atom driver for Rb PPS
server 127.127.22.0
fudge 127.127.22.0 time1 <whatever your offset is>
fudge 127.127.22.0 stratum 1
fudge 127.127.22.0 refid ATOM

#other servers follow with at least one set "prefer"
server x.x.x.x prefer

what should happen is that if the GPS is valid the system will use it
but if it's not the system will use the Rb - don't set flag3 to use the
kernel PPS because it does not  understand multiple PPS devices and more
importantly does not understand that if the NMEA message say the invalid
fix the GPS PPS is not to be trusted.

If you use noselect the system will happily see and ignore the Rb PPS
which works for finding the offset but doesn't help if you want it to
work as a backup to the GPS.

I've not actually tested this (however I'm going to go try it since I
have three GPS/PPS sources here I can unplug the antenna on one and see
if it actually fails over)

John








More information about the time-nuts mailing list