[ntp:questions] Re: Standalone NTP PPS Configuration

Richard B. Gilbert rgilbert88 at comcast.net
Sat Dec 3 20:05:09 UTC 2005

ryan eustice wrote:

> Hello,
> I have a question about configuring NTP for standalone PPS support.  I 
> would like to use a local free-running PPS source to disciple the 
> local clock on an embedded PC.  This PC resides in a Unmanned 
> Underwater Vehicle (UUV).
> When on deck of the research vessel, the UUV can be connected via the 
> local LAN to a Meinberg LANTIME/GPS time server box.  Additionally, 
> when at the surface, the UUV can receive GPS fixes from a Garmin 
> receiver; note that GPS signals do not penetrate subsea, however.  In 
> addition to the above time sources, the UUV also has a free-running 
> TXCO that outputs a stable PPS signal.  I would like to use this PPS 
> reference to discipline the PC clock while subsea.
> My question is, what is the best way to configure NTP to take 
> advantage of this?  Specifically, I'm uncertain of how to use the 
> "prefer" keyword modifier in this context as both the network and GPS 
> time sources will be unavailable subsea (they are available at the 
> surface, though, for initial NTP synchronization).
> I have patched a 2.4.29 kernel with PPSkit and have installed ntp-4.2.0.
> Right now my ntp.conf file looks like:
> -----------------------------------------------------------------------
> # ntp.conf for use with PPSBOARD
> #
> # Date        Who        What
> # --------    ------------    ----------------------------
> # 20051201    Ryan Eustice    Created and written.
> enable auth stats monitor pps
> statsdir  /var/log/
> statistics loopstats
> logfile   /var/log/ntp.log
> driftfile /etc/ntp.drift
> # Network time servers
> server meinberg.lantime.edu     iburst  prefer # network LANTIME/GPS
> # Generic NMEA GPS receiver (4800 baud)
> # The driver expects a $GPRMC msg every second (others silently ignored).
> server mode 1
> # PPS clock discipline (requires PPSAPI interface)
> # flag2 sets PPS on-time edge: 0 assert, 1 clear
> # flag3 enables kernel PPSAPI: 0 disable, 1 enable
> server
> fudge flag2 0 flag3 1
> # Undisciplined local clock
> server
> fudge stratum 12
> -----------------------------------------------------------------------
> Should I instead make the local clock driver ( the 
> "preferred" peer so that the PPS reference will be used while subsea?
> Very Best,
>     ryan eustice

How accurate must the local clock be?  How long must the UUV operate and 
keep time without the GPS signal?   If it is only for short periods, an 
hour or two, the local clock should remain close to the correct time.

The statements: "
# Undisciplined local clock
fudge stratum 12 "
wont do a thing for you!!  They would allow  ntpd to use the local clock 
as a reference while serving time to other systems but as I understand 
you, it is not required to server time to any other system.  When the 
GPS reference is lost, ntpd will continue to operate the local clock 
using the last frequency correction.  Assuming a more or less constant 
temperature, the clock should remain close to the correct time for 
several hours at least.

To put it another way, have you measured the clock error after the UUV 
returns to the surface?

More information about the questions mailing list