During this season of giving, you can show your support for the NTP Project by making a donation to Network Time Foundation.

Configuring WWV Refclocks

These notes concern getting the WWV refclock driver working on Linux.

Redhat linux 9.0 did not work with ntp-4.2.0 due to some unsupported ioctls.

Redhat Fedora Core 2.0 works with ntp-4.2.0, but with the current ntp-4.2.0 release it will be necessary to apply the a patch (shown below, courtesy of Tim Shoppa who discovered the correct ioctl call) otherwise you will end up with very poor (i.e. hundreds of msecs) offset and jitter. This patch is just for the ntp-4.2.0-7 fedora core RPM version, but you could hand-apply it to the non-redhat version.

With the $50 ramsey HFRC1 WWV receiver kit and some wire tacked to the ceiling serving as an antenna, I am currently getting performance which is on-par with various Internet stratum-1 servers

     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*scrappy.margrav .WV15.           1 u  127  128  377     2.06    3.248    0.95
+time-nw.nist.go .ACTS.           1 u    6  128  377    80.86    8.965    0.93
+time-a.nist.gov .ACTS.           1 u   28  128  377   118.10    4.062    1.25

the relevant section of my ntp.conf is as follows

server  127.127.36.0
fudge 127.127.36.0 time1 0.005200 time2 0.014657 flag2 1 flag3 1 flag4 1
statistics clockstats loopstats peerstats
statsdir /var/log/ntp/
filegen clockstats file clockstats type day enable
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable

Edit time1 and time2 for the propagation time for WWV and WWVH for your own location, using the locations of WWV and WWVH which can be found on the web, along with a great circle calculator (also found on the web). I simply divided by the speed of light (3.0e8 m/sec) but if you want you can use various propagation calculation programs to account for other factors like ionosphering bouncing, etc.

The following patch has been applied to ntp-dev as of September 7, 2004.

--- ntp-4.2.0/libntp/audio.c.ioctl      2004-06-27 20:41:31.600401280 -0700
+++ ntp-4.2.0/libntp/audio.c    2004-06-27 20:41:35.704747259 -0700
@@ -284,6 +284,8 @@
            printf("audio_init: set:  play_size %d, rec_size %d\n",
                s_size.play_size, s_size.rec_size);
 # endif /* HAVE_STRUCT_SND_SIZE */
+  int tmp = (16<<16)+6; /* 16 fragments, each fragment is 2^6 bytes */
+  ioctl(fd,SNDCTL_DSP_SETFRAGMENT, &tmp);
  
 # ifdef AIOGFMT
        if (ioctl(fd, AIOGFMT, &s_c_p) == -1)

Related Topics: WWVRefclockUsers

-- DavidMargrave - 28 Jun 2004

I've put up a couple of pages with summary statistics from my WWV refclock implementation.

Clockstats data
Loopstats data

-- DavidAndersen - 28 Oct 2009
Topic revision: r8 - 28 Oct 2009, DavidAndersen
Copyright © by the contributing authors.Use of this website indicates your agreement with, and acceptance of, the PrivacyPolicy, the WikiDisclaimer, and the PrivateWebPolicy.