xref: /freebsd/contrib/ntp/html/drivers/driver4.html (revision 416ba5c74546f32a993436a99516d35008e9f384)
19c2daa00SOllivier Robert<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
29c2daa00SOllivier Robert<html>
39c2daa00SOllivier Robert<head>
4ea906c41SOllivier Robert<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
5*2b15cb3dSCy Schubert<title>Spectracom WWVB/GPS Receivers</title>
6ea906c41SOllivier Robert<link href="scripts/style.css" type="text/css" rel="stylesheet">
7*2b15cb3dSCy Schubert<style type="text/css">
8*2b15cb3dSCy Schubert<!--
9*2b15cb3dSCy Schubert.style1 {
10*2b15cb3dSCy Schubert	font-family: Symbol
11*2b15cb3dSCy Schubert}
12*2b15cb3dSCy Schubert-->
13*2b15cb3dSCy Schubert</style>
149c2daa00SOllivier Robert</head>
159c2daa00SOllivier Robert<body>
16*2b15cb3dSCy Schubert<h3>Spectracom WWVB/GPS Receivers</h3>
17*2b15cb3dSCy Schubert<p>Author: David L. Mills (mills@udel.edu)<br>
18*2b15cb3dSCy Schubert  Last update:
19*2b15cb3dSCy Schubert  <!-- #BeginDate format:En2m -->11-Sep-2010  05:56<!-- #EndDate -->
20*2b15cb3dSCy Schubert  UTC</p>
219c2daa00SOllivier Robert<hr>
229c2daa00SOllivier Robert<h4>Synopsis</h4>
23*2b15cb3dSCy Schubert<p>Address: 127.127.4.<i>u</i><br>
249c2daa00SOllivier Robert  Reference ID: <tt>WWVB</tt><br>
259c2daa00SOllivier Robert  Driver ID: <tt>WWVB_SPEC</tt><br>
269c2daa00SOllivier Robert  Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
27*2b15cb3dSCy Schubert  Features: Optional PPS signal processing, <tt>tty_clk</tt><br>
28*2b15cb3dSCy Schubert  Requires: Optional PPS signal processing requires the PPSAPI signal interface.</p>
299c2daa00SOllivier Robert<h4>Description</h4>
30*2b15cb3dSCy Schubert<p>This driver supports all known Spectracom radio and satellite clocks, including the Model 8170 and Netclock/2 WWVB Synchronized Clocks and the Netclock/GPS GPS Master Clock. The claimed accuracy of the WWVB clocks is 100 <span class="style1">m</span>s relative to the broadcast signal. These clocks have proven a reliable source of time, except in some parts of the country with high levels of conducted RF interference. WIth the GPS clock the claimed accuracy is 130 ns. However, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system.</p>
319c2daa00SOllivier Robert<p>The DIPswitches on these clocks should be set to 24-hour display, AUTO DST off, data format 0 or 2 (see below) and baud rate 9600. If this clock is used as the source for the IRIG Audio Decoder (<tt>refclock_irig.c</tt> in this distribution), set the DIPswitches for AM IRIG output and IRIG format 1 (IRIG B with signature control).</p>
329c2daa00SOllivier Robert<p>There are two timecode formats used by these clocks. Format 0, which is available with all clocks, and format 2, which is available with all clocks except the original (unmodified) Model 8170.</p>
339c2daa00SOllivier Robert<p>Format 0 (22 ASCII printing characters):<br>
349c2daa00SOllivier Robert  &lt;cr&gt;&lt;lf&gt;i ddd hh:mm:ss TZ=zz&lt;cr&gt;&lt;lf&gt;</p>
359c2daa00SOllivier Robert<p>on-time = first &lt;cr&gt;<br>
369c2daa00SOllivier Robert  i = synchronization flag (' ' = in synch, '?' = out synch)<br>
379c2daa00SOllivier Robert  hh:mm:ss = hours, minutes, seconds</p>
389c2daa00SOllivier Robert<p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours.</p>
399c2daa00SOllivier Robert<p>Format 2 (24 ASCII printing characters):<br>
409c2daa00SOllivier Robert  lt;cr&gt;lf&gt;iqyy ddd hh:mm:ss.fff ld</p>
419c2daa00SOllivier Robert<p>on-time = &lt;cr&gt;<br>
429c2daa00SOllivier Robert  i = synchronization flag (' ' = in synch, '?' = out synch)<br>
439c2daa00SOllivier Robert  q = quality indicator (' ' = locked, 'A'...'D' = unlocked)<br>
449c2daa00SOllivier Robert  yy = year (as broadcast)<br>
459c2daa00SOllivier Robert  ddd = day of year<br>
469c2daa00SOllivier Robert  hh:mm:ss.fff = hours, minutes, seconds, milliseconds</p>
479c2daa00SOllivier Robert<p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours. The unlock condition is indicated by other than ' ' at <tt>q</tt>.</p>
489c2daa00SOllivier Robert<p>The <tt>q</tt> is normally ' ' when the time error is less than 1 ms and a character in the set <tt>A...D</tt> when the time error is less than 10, 100, 500 and greater than 500 ms respectively. The <tt>l</tt> is normally ' ', but is set to <tt>L</tt> early in the month of an upcoming UTC leap second and reset to ' ' on the first day of the following month. The <tt>d</tt> is set to <tt>S</tt> for standard time <tt>S</tt>, <tt>I</tt> on the day preceding a switch to daylight time, <tt>D</tt> for daylight time and <tt>O</tt> on the day preceding a switch to standard time. The start bit of the first &lt;cr&gt; is synchronized to the indicated time as returned.</p>
499c2daa00SOllivier Robert<p>This driver does not need to be told which format is in use - it figures out which one from the length of the message. A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself, which is a known problem with the older radios.</p>
50*2b15cb3dSCy Schubert<h4>PPS Signal Processing</h4>
51*2b15cb3dSCy Schubert<p>When PPS signal processing is enabled, and when the system clock has been set by this or another driver and the PPS signal offset is within 0.4 s of the system clock offset, the PPS signal replaces the timecode for as long as the PPS signal is active. If for some reason the PPS signal fails for one or more poll intervals, the driver reverts to the timecode. If the timecode fails for one or more poll intervals, the PPS signal is disconnected.</p>
529c2daa00SOllivier Robert<h4>Monitor Data</h4>
539c2daa00SOllivier Robert<p>The driver writes each timecode as received to the <tt>clockstats</tt> file. When enabled by the <tt>flag4</tt> fudge flag, a table of quality data maintained internally by the Netclock/2 is retrieved and written to the <tt>clockstats</tt> file when the first timecode message of a new day is received.</p>
549c2daa00SOllivier Robert<h4>Fudge Factors</h4>
559c2daa00SOllivier Robert<dl>
56*2b15cb3dSCy Schubert  <dt><tt>time1 <i>time</i></tt></dt>
57*2b15cb3dSCy Schubert  <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
58*2b15cb3dSCy Schubert  <dt><tt>time2 <i>time</i></tt></dt>
59*2b15cb3dSCy Schubert  <dd>Specifies the serial time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
60*2b15cb3dSCy Schubert  <dt><tt>stratum <i>number</i></tt></dt>
61*2b15cb3dSCy Schubert  <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
62*2b15cb3dSCy Schubert  <dt><tt>refid <i>string</i></tt></dt>
63*2b15cb3dSCy Schubert  <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWVB</tt>.</dd>
64*2b15cb3dSCy Schubert  <dt><tt>flag1 0 | 1</tt></dt>
65*2b15cb3dSCy Schubert  <dd>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.</dd>
66*2b15cb3dSCy Schubert  <dt><tt>flag2 0 | 1</tt></dt>
67*2b15cb3dSCy Schubert  <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the falling edge if 1.</dd>
68*2b15cb3dSCy Schubert  <dt><tt>flag3 0 | 1</tt></dt>
69*2b15cb3dSCy Schubert  <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel discipline if 1.</dd>
70*2b15cb3dSCy Schubert  <dt><tt>flag4 0 | 1</tt></dt>
71*2b15cb3dSCy Schubert  <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
729c2daa00SOllivier Robert</dl>
739c2daa00SOllivier Robert<hr>
74ea906c41SOllivier Robert<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
759c2daa00SOllivier Robert</body>
769c2daa00SOllivier Robert</html>
77