program to read NBS time

Brent Chapman capmkt!brent at uunet.uu.net
Thu Apr 27 17:25:59 AEST 1989


# This might be harder than you think, unless you have a special number for
# NBS.  If you call (303) 499-7111, you'll get the audio that is broadcast
# from WWV, in Fort Collins, Colorado....The length of the tone
# represents either a zero or a one, and the first forty five ticks are used
# to encode the current time of day and day of the year, plus any correction
# for UTC and tenths of leap seconds applied to the time.

This is what the person in Sun-Spots was asking about, I believe.  It's a
normal dialup service, not some wierd audio signal.

-Brent
--
Brent Chapman					Capital Market Technology, Inc.
Computer Operations Manager			1995 University Ave., Suite 390
brent at capmkt.com				Berkeley, CA  94704
{cogsci,lll-tis,uunet}!capmkt!brent		Phone:  415/540-6400

------- Forwarded Message

cook at trane.UUCP (Eric Cook):

	Your tax dollars at work......
	I found this in Sky & Telescope. If you are doing projects requiring
your computer syncing with UTC, this is for you. The phone number is
(303) 494-4774, they are to add a 900 number in the future.

                             DESCRIPTION OF THE
                 AUTOMATED COMPUTER TELEPHONE SERVICE (ACTS)


The following is transmitted (at 1200 baud) following completion of the
telephone connection.

             ? = HELP
             National Bureau of Standards
             Telephone Time Service

                                     D  L D
              MJD  YR MO DA H  M  S  ST S UT1 msADV         OTM
             47222 88-03-02 21:39:15 83 0 +.3 045.0 UTC(NBS) *
             47222 88-03-02 21:39:16 83 0 +.3 045.0 UTC(NBS) *
             47222 88-03-02 21:39:17 83 0 +.3 045.0 UTC(NBS) *
             47222 88-03-02 21:39:18 83 0 +.3 045.0 UTC(NBS) *
             47222 88-03-02 21:39:19 83 0 +.3 037.6 UTC(NBS) #
             47222 88-03-02 21:39:20 83 0 +.3 037.6 UTC(NBS) #
             etc..etc...etc.......


UTC = Universal Time Coordinated, the official world time referred to the
zero meridian.
_________________________________________________________________________

DST = Daylight savings time characters, valid for the continental U.S., are
set as follows:                                                             
  00 = We are on standard time (ST).    50 = We are on DST.
  99 to 51 = Now on ST, go to DST when your local time is 2:00 am and the
    count is 51.  The count is decremented daily at 00 (UTC).
  49 to 01 = Now on DST, go to ST when your local time is 2:00 am and the
    count is 01.  The count is decremented daily at 00 (UTC).
The two DST characters provide up to 48 days advance notice of a change in
time.  The count remains at 00 or 50 at other times.
_________________________________________________________________________

LS = Leap second flag is set to "1" to indicate that a leap second is to be
added as 23:59:60 (UTC) on the last day of the current UTC month.  The LS
flag will be reset to "0" starting with 23:59:60 (UTC).  The flag will
remain on for the entire month before the second is added.  Leap seconds
are added as needed at the end of any month.  Usually June and/or December
are chosen.

 The leap second flag will be set to a "2" to indicate that a leap second
is to be deleted at 23:59:58--00:00:00 on the last day of the current
month. (This latter provision is included per international recommendation
however it is not likely to be required in the near future.)
__________________________________________________________________________

DUT1 = Approximate difference between earth rotation time (UT1) and UTC, in
steps of 0.1 second.         DUT1 = UT1 - UTC
___________________________________________________________________________

MJD = Modified Julian Date, often used to tag certain scientific data.
___________________________________________________________________________

The full time format is sent at 1200 baud, 8 bit, 1 stop, no parity.
The HH:MM:SS msADV time format at 300 baud is also 8 bit, 1 stop, no parity. 
___________________________________________________________________________

Maximum on line time will be 55 seconds.  If all lines are busy at any time,
the oldest call will be terminated if it has been on line more than 15
seconds, otherwise, the call that first reaches 15 seconds will be
terminated. 
___________________________________________________________________________

Current time is valid at the "on-time" marker (OTM), either "*" or "#".
The nominal on-time marker (*) will be transmitted 45 ms early to account
for the 8 ms required to send 1 character at 1200 baud, plus an additional
7 ms for delay from NBS to the user, and approximately 30 ms "scrambler"
delay inherent in 1200 baud modems.  If the caller echoes all characters,
NBS will measure the round trip delay and advance the on-time marker so
that the midpoint of the stop bit arrives at the user on time.  The amount
of msADV will reflect the actual required advance in milliseconds and the
OTM will be a "#".  The NBS system requires 4 consecutive delay
measurements which are consistent before switching from "*" to "#".  If
the user has a 1200 baud modem with the same internal delay as that used
by NBS, then the "#" OTM should arrive at the user within +-2 ms of the
correct time.  However, NBS has studied different brands of 1200 baud
modems and found internal delays from 24 ms to 40 ms and offsets of the
"#" OTM of +-10 ms.  For many computer users, +-10 ms accuracy should be
more than adequate since many computer internal clocks can only be set
with granularity of 20 to 50 ms.  In any case, the repeatability of the
offset for the "#" OTM should be within +-2 ms, if the dial-up path is
reciprocal and the user doesn't change the brand or model of modem used.
This should be true even if the dial-up path on one day is a land-line of
less than 40 ms (one way) and on the next day is a satellite link of 260
to 300 ms.  In the rare event that the path is one way by satellite and
the other way by land line with a round trip measurement in the range of
90 to 260 ms, the OTM will remain a "*" indicating 45 ms advance.  For the
user who wants the best possible accuracy at the OTM, NBS offers an
alternate 300 baud service with only HH:MM:SS MSADV and OTM. To use the
alternate service, simply call at 300 baud.  Because of the simple FSK
modulation scheme used at 300 baud, all modems tested had the same delay
within about 1 ms.
___________________________________________________________________________

The full time format will be sent at 1200 baud, 8 bit, 1 stop, no parity.
The HH:MM:SS MSADV time format at 300 baud will also be 8b, 1s, np.

For user comments write:
NBS-ACTS
Time and Frequency Division
Mail Stop 524
325 Broadway
Boulder, CO  80303

Software for setting DOS compatable machines is available on a
360-kbyte diskette for $35.00 from:
NBS Office of Standard Reference Materials
B311-Chemistry Bldg, NBS, Gaithersburg, MD, 20899, (301) 975-6776
------- End of Forwarded Message



More information about the Comp.sys.sun mailing list