LeapSecond.com
WWVB Subcode Test Generator - wwvb2.exe

07-Feb-2005

Introduction

NIST LF radio station WWVB transmits the official US time with a 1 Hz AM subcode on a 60 kHz carrier. This is the signal received by self-setting atomic time radio controlled clocks and watches you may have seen in recent years.

The data rate is one bit per second, or 1 baud. The signal format is well documented and both consumer electronics companies and home experimenters have built LF receivers and subcode processors to extract the bits from the signal and convert them to standard date and time formats. 

However, the reverse is also possible. Given a particular date and time it is simple to predict what the bits did, or will, look like. Below is a Windows command line tool which calculates and displays the subcode for any given date and time.

Results

Based on the current time of your PC, or any user-specified time, the program calculates the WWVB subcode and displays it in the typical WWVB capture format of 0's, 1's, and 2's.

Here is a sample output:

Output Format

The columns on the left are the year ('05, short for 2005), the day of year (today is the 38th day of 2005), the UTC hour and minute. The string of 60± digits on the right are the subcode that WWVB will send in the next minute. By default ten minutes of subcode is displayed. A '0' represents a binary zero, which is transmitted by a 200 ms pulse of reduced power. A '1' represents a binary one,  which is transmitted by a 500 ms pulse of reduced power. Finally, a '2' represents a position marker, which is transmitted by an 800 ms pulse of reduced power. There is one pulse per second.

Below is 5 minutes of subcode when the date is changed to tomorrow. Same time, different day.

As with most command line utilities, the output may be redirected to a file.

Interesting Dates

Below are WWVB subcode recreations for interesting dates in the past:

New Years 2000, the big Y2K scare
C:\tvb>wwvb2 /year:1999 /days:365 /hour:23 /min:55 10
** Truncating 4-digit year to 2-digits

NIST WWVB subcode test generator

WWVB timecode: year=99 days=365 hour=23 min=55 dst=0 ut1=0 ly=0 ls=0
'99+365 23:55 210100101200100001120011001102010100101200000100121001000002
'99+365 23:56 210100110200100001120011001102010100101200000100121001000002
'99+365 23:57 210100111200100001120011001102010100101200000100121001000002
'99+365 23:58 210101000200100001120011001102010100101200000100121001000002
'99+365 23:59 210101001200100001120011001102010100101200000100121001000002
'00+001 00:00 200000000200000000020000000002000100101200000000020000010002
'00+001 00:01 200000001200000000020000000002000100101200000000020000010002
'00+001 00:02 200000010200000000020000000002000100101200000000020000010002
'00+001 00:03 200000011200000000020000000002000100101200000000020000010002
'00+001 00:04 200000100200000000020000000002000100101200000000020000010002
 
New Years 2001, the 21st century, the big yawn
C:\tvb>wwvb2 /year:00 /days:365 /hour:23 /min:57 6

NIST WWVB subcode test generator

WWVB timecode: year=00 days=365 hour=23 min=57 dst=0 ut1=0 ly=0 ls=0
'00+365 23:57  210100111200100001120011001102010100101200000000020000000002
'00+365 23:58  210101000200100001120011001102010100101200000000020000000002
'00+365 23:59  210101001200100001120011001102010100101200000000020000000002
'01+001 00:00  200000000200000000020000000002000100101200000000020001000002
'01+001 00:01  200000001200000000020000000002000100101200000000020001000002
'01+001 00:02  200000010200000000020000000002000100101200000000020001000002
 
The December 1998 Leap Second
C:\tvb>wwvb2 /year:98 /days:365 /hour:23 /min:56 /ut1:-300 /ls:1 7

NIST WWVB subcode test generator

WWVB timecode: year=98 days=365 hour=23 min=56 dst=0 ut1=-300 ly=0 ls=1
'98+365 23:56  210100110200100001120011001102010100010200110100121000001002
'98+365 23:57  210100111200100001120011001102010100010200110100121000001002
'98+365 23:58  210101000200100001120011001102010100010200110100121000001002
'98+365 23:59  2101010012001000011200110011020101000102001101001210000010022
'99+001 00:00  200000000200000000020000000002000100101201110100121001000002
'99+001 00:01  200000001200000000020000000002000100101201110100121001000002
'99+001 00:02  200000010200000000020000000002000100101201110100121001000002
 
The end of time_t for 32-bit UNIX (Tue Jan 19 03:14:07 2038)
C:\tvb>wwvb2 /year:38 /days:19 /hour:3 /min:14 2

NIST WWVB subcode test generator

WWVB timecode: year=38 days=019 hour=03 min=14 dst=0 ut1=0 ly=0 ls=0
'38+019 03:14  200100100200000001120000000012100100101200000001121000000002
'38+019 03:15  200100101200000001120000000012100100101200000001121000000002
 
If a positive leap second were to occur tonight
C:\tvb>wwvb2 /hour:23 /min:57 /ut1:-500 /ls:1 5

NIST WWVB subcode test generator

WWVB timecode: year=05 days=038 hour=23 min=57 dst=0 ut1=-500 ly=0 ls=1
'05+038 23:57  210100111200100001120000000112100000010201010000020101001002
'05+038 23:58  210101000200100001120000000112100000010201010000020101001002
'05+038 23:59  2101010012001000011200000001121000000102010100000201010010022
'05+039 00:00  200000000200000000020000000112100100101201010000020101000002
'05+039 00:01  200000001200000000020000000112100100101201010000020101000002
 
If a negative leap second were to occur tonight !
C:\tvb>wwvb2 /hour:23 /min:57 /ut1:+500 /ls:1 5

NIST WWVB subcode test generator

WWVB timecode: year=05 days=038 hour=23 min=57 dst=0 ut1=500 ly=0 ls=1
'05+038 23:57  210100111200100001120000000112100000101201010000020101001002
'05+038 23:58  210101000200100001120000000112100000101201010000020101001002
'05+038 23:59  21010100120010000112000000011210000010120101000002010100100
'05+039 00:00  200000000200000000020000000112100100010201010000020101000002
'05+039 00:01  200000001200000000020000000112100100010201010000020101000002

Input Format

Any field in the subcode may be modified. A full list of options is shown here:

C:\tvb>wwvb2
Usage: wwvb2 [options] [max minutes]

Options:
    /year:#  - set year (0 to 99)
    /days:#  - set day of year (1 to 365/366)
    /hour:#  - set hour (0 to 23)
    /min:#   - set minute (0 to 59)
    /ut1:#   - set ut1 offset (-900 to +900)
    /dst:#   - set both dst bits (0 to 3)
    /ly:#    - set leap year bit (0/1)
    /ls:#    - set leap second warning bit (0/1)

Examples:
    - what WWVB will look like for the next half hour:
    wwvb2 30

    - what WWVB looked like during the great Y2K event:
    wwvb2 /year:1999 /days:365 /hour:23 /min:55 10

    - WWVB looked like this today at UTC midnight:
    wwvb2 /hour:0 /min:0 15

    - watch what the December 1998 leap second looked like:
    wwvb2 /year:98 /days:365 /hour:23 /min:56 /ut1:-300 /ls:1 7

Questions or comments:
    See www.LeapSecond.com for contact info

Download

You can find the Win32 binary and source code in my tools directory:

See also


Return to LeapSecond.com home page.
Comments/questions to tvb.