[ntp:questions] Standalone NTP PPS Configuration

Danny Mayer mayer at gis.net
Sun Dec 4 03:01:27 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    127.127.20.0 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    127.127.22.0
> fudge    127.127.22.0 flag2 0 flag3 1
> 
> # Undisciplined local clock
> server    127.127.1.0
> fudge    127.127.1.0 stratum 12
> -----------------------------------------------------------------------
> 
> Should I instead make the local clock driver (127.127.1.0) the
> "preferred" peer so that the PPS reference will be used while subsea?
> 
> Very Best,
>     ryan eustice

If the PC is a standalone system and nothing else depends on it, then
you shouldn't set up a local clock as it doesn't need to serve time to
anyone else. When the PC becomes "disconnected" from both the network
and GPS it will continue along happily by itself almost without further
need to correct itself since it has been discaplined as long as it's had
enough time while connected to stabilize the corrections that need to be
applied. The main thing that would cause clock to deviate would be
temperature changes of the system. In this particular case it may well
be more of an issue for you since it's underwater when it's not
connected to an outside source and the water will be warmer or colder
than when it's connected. It's much harder to gauge how temperature
changes will affect it. Dave has experience with interplanetary systems
and may be able to say more. If you can record the temperature
variations while it's underwater you could take it to a lab and
reproduce the temperature changes while connected to the GPS and
network. That would give you an idea of how far off it might be. How
important is accurate time to what you're doing?

Danny




More information about the questions mailing list