NTP PARSE clock data formats

The parse driver currently supports several clocks with different query mechanisms. In order for you to find a sample that might be similar to a clock you might want to integrate into parse I'll sum up the major features of the clocks (this information is distributed in the parse/clk_*.c and ntpd/refclock_parse.c files).

Meinberg clocks

Meinberg is a German manufacturer of time code receivers. Those clocks have a pretty common output format in the stock version. In order to support NTP Meinberg was so kind to produce some special versions of the firmware for the use with NTP. So, if you are going to use a Meinberg clock please ask whether there is a special Uni Erlangen version. You can reach Meinberg via the Web. Information can also be ordered via eMail from info@meinberg.de

General characteristics:
Meinberg clocks primarily output pulse per second and a describing ASCII string. This string can be produced in two modes: either upon the reception of a question mark or every second. NTP uses the latter mechanism. DCF77 AM clocks have a limited accuracy of a few milliseconds. The DCF77 PZF5xx variants provide higher accuracy and have a pretty good relationship between RS232 time code and the PPS signal. Except for early versions of the old GPS166 receiver type, Meinberg GPS receivers have a very good timing relationship between the datagram and the pulse. The beginning of the start bit of the first character has basically the same accuracy as the PPS signal, plus a jitter of up to 1 bit time depending on the selected baud rate, i.e. 52 μs @ 19200. PPS support should always be used, if possible, in order to yield the highest possible accuracy.

<STX>D:dd.mm.yy;T:w;U:hh.mm.ss;uvxy<ETX>
pos: 0 000000001111111111222222222233 3
1 234567890123456789012345678901 2
<STX> = start-of-text, ASCII code 0x02
dd.mm.yy = day of month, month, year of the century, separated by dots
w = day of week (1..7, Monday = 1)
hh:mm:ss = hour, minute, second, separated by dots
u = '#' for GPS receivers: time is not synchronized
'#' for older PZF5xx receivers: no correlation, not synchronized
'#' for other devices: never sync'ed since powerup
' ' if nothing of the above applies
v = '*' for GPS receivers: position has not been verified
'*' for other devices: freewheeling based on internal quartz
' ' if nothing of the above applies
x = 'U' if UTC time is transmitted
'S' if daylight saving time is active
' ' if nothing of the above applies
y = '!' during the hour preceding start or end of daylight saving time
'A' during the hour preceding a leap second
' ' if nothing of the above applies
<ETX> = end-of-text, ASCII code 0x03

Raw DCF77 Data via serial line

In Europe it is relatively easy/cheap the receive the german time code transmitter DCF77. The simplest version to process its signal is to feed the 100/200ms pulse of the demodulated AM signal via a level converter to an RS232 port at 50Baud. parse/clk_rawdcf.c holds all necessary decoding logic for the time code which is transmitted each minute for one minute. A bit of the time code is sent once a second.

DCF77 raw time code

AM:
time marks are send every second except for the second before the
next minute mark
time marks consist of a reduction of transmitter power to 25%
of the nominal level
the falling edge is the time indication (on time)
time marks of a 100ms duration constitute a logical 0
time marks of a 200ms duration constitute a logical 1

Schmid clock

Schmid clock: needs poll, binary input, end='\xFC', sync start

The Schmid clock is a DCF77 receiver that sends a binary time code at the reception of a flag byte. The contents if the flag byte determined the time code format. The binary time code is delimited by the byte 0xFC.

TTY setup is:
CFLAG (B1200|CS8|CREAD|CLOCAL)
IFLAG 0
OFLAG 0
LFLAG 0

The command to Schmid's DCF77 clock is a single byte; each bit allows the user to select some part of the time string, as follows (the output for the lsb is sent first).

PARSE_F_PPSPPS - use CIOGETEV for PPS time stamping
PARSE_F_PPSONSECOND - the time code is not related to
the PPS pulse (so use the time code
only for the second epoch)
Timecode
0000000000111111111122222222223333333 / char
0123456789012345678901234567890123456 \ posn
>RTMhhmmssdddDDMMYYYYoodnnvrrrrr;*xx< Actual
----33445566600112222BB7__-_____--99- Parse
>RTM 1 ;* < Check

ELV DCF7000

ELV DCF7000: end='\r', pattern=" - - - - - - - \r"

The ELV DCF7000 is a cheap DCF77 receiver sending each second a time code (though not very precise!) delimited by '`r'

WHARTON 400A Series Clock with a 404.2 Serial interface

The WHARTON 400A Series clock is able to send date/time serial messages in 7 output formats. We use format 1 here because it is the shortest. We set up the clock to send a datagram every second. For use with this driver, the WHARTON 400A Series clock must be set-up as follows :