Most of this code is originally from refclock_wwvb.c with thanks. Any mistakes are mine. Any improvements are welcome.
The Model 320 timecode format is:SQRYYYYDDD+HH:MM:SS.mmLT where: S = 'S' -- sync'd in last hour, '0'-'9' - hours x 10 since last update, else '?' Q = Number of correlating time-frames, from 0 to 5 R = 'R' -- reception in progress, 'N' -- Noisy reception, ' ' -- standby mode YYYY = year from 1990 to 2089 DDD = current day from 1 to 366 + = '+' if current year is a leap year, else ' ' HH = UTC hour 0 to 23 MM = Minutes of current hour from 0 to 59 SS = Seconds of current minute from 0 to 59 mm = 10's milliseconds of the current second from 00 to 99 L = Leap second pending at end of month -- 'I' = inset, 'D'=delete T = DST <-> STD transition indicators Note that this driver does not do anything with the T flag. The M320 also has a 'U' command which returns UT1 correction information. It is not used in this driver.
The Model 33x timecode format is: S9+D 00 YYYY+DDDUTCS HH:MM:SSl+5 Where: S = sync indicator S insync N not in sync the sync flag is WWVB decoder sync nothing to do with time being correct 9+ = signal level 0 thru 9+ If over 9 indicated as 9+ D = data bit ( fun to watch but useless ;-) space 00 = hours since last GOOD WWVB frame sync space YYYY = current year + = leap year indicator DDD = day of year UTC = timezone (always UTC) S = daylight savings indicator space HH = hours : = This is the REAL in sync indicator (: = insync) MM = minutes : = : = in sync ? = NOT in sync SS = seconds L = leap second flag +5 = UT1 correction (sign + digit )) This driver ignores UT1 correction,DST indicator,Leap year and signal level.
Fudge factors flag1 polling enable (1=poll 0=no poll)