6
<meta name="generator" content="HTML Tidy, see www.w3.org">
7
<title>NTP PARSE clock data formats</title>
8
<link href="scripts/style.css" type="text/css" rel="stylesheet">
6
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
7
<meta name="generator" content="HTML Tidy, see www.w3.org">
8
<title>NTP PARSE clock data formats</title>
9
<link href="scripts/style.css" type="text/css" rel="stylesheet">
12
<h3>NTP PARSE clock data formats</h3>
13
<p>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).</p>
15
<h4>Meinberg clocks</h4>
13
<h3>NTP PARSE clock data formats</h3>
14
<p>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).</p>
16
<h4>Meinberg clocks</h4>
17
18
Meinberg: start=<STX>, end=<ETX>, sync on start
18
19
pattern="\2D: . . ;T: ;U: . . ; \3"
19
20
pattern="\2 . . ; ; : : ; \3"
20
21
pattern="\2 . . ; ; : : ; : ; ; . . "
22
<p>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 <a href="http://www.meinberg.de/">Meinberg</a> via the Web. Information can also be ordered via eMail from <a href="mailto:%20info@meinberg.de">info@meinberg.de</a></p>
23
<p>General characteristics:<br>
24
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. The DCF77 variants have a pretty good relationship between RS232 time code and the PPS signal while the GPS receiver has no fixed timeing between the datagram and the pulse (you need to use PPS with GPS!) on DCF77 you might get away without the PPS signal.</p>
25
<p>The preferred tty setting for Meinberg is:</p>
23
<p>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 <a href="http://www.meinberg.de/">Meinberg</a> via the Web. Information can also be ordered via eMail from <a href="mailto:%20info@meinberg.de">info@meinberg.de</a></p>
24
<p>General characteristics:<br>
25
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.</p>
26
<p>The preferred tty setting for Meinberg DCF77 receivers is 9600/7E2:</p>
27
28
CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
28
29
IFLAG (IGNBRK|IGNPAR|ISTRIP)
32
<p>The tty setting for Meinberg GPS 166/167 receivers is:</p>
33
<p>The tty setting for Meinberg GPS16x/17x receivers is 19200/8N1:</p>
34
35
CFLAG (B19200|CS8|PARENB|CREAD|HUPCL)
35
36
IFLAG (IGNBRK|IGNPAR|ISTRIP)
39
<p>The clock is run at datagram once per second. Stock dataformat is:</p>
41
<STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
42
pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
43
1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
45
<STX> = '\002' ASCII start of text
46
<ETX> = '\003' ASCII end of text
47
<dd>,<mm>,<yy> = day, month, year(2 digits!!)
48
<w> = day of week (sunday= 0)
49
<hh>,<mm>,<ss> = hour, minute, second
50
<S> = '#' if never synced since powerup else ' ' for DCF U/A 31
51
'#' if not PZF sychronisation available else ' ' for PZF 535
52
<F> = '*' if time comes from internal quartz else ' '
53
<D> = 'S' if daylight saving time is active else ' '
54
<D> = 'U' if UTC time code is deliverd else ' '
55
<A> = '!' during the hour preceeding an daylight saving time
57
<A> = 'A' if a leap second is announced
60
<STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <U><S><F><D><A><L><R><ETX>
61
pos: 0 00 0 00 0 00 11 1 11 11 1 11 2 22 22 2 2 2 2 2 3 3 3
62
1 23 4 56 7 89 01 2 34 56 7 89 0 12 34 5 6 7 8 9 0 1 2
63
<STX> = '\002' ASCII start of text
64
<ETX> = '\003' ASCII end of text
65
<dd>,<mm>,<yy> = day, month, year(2 digits!!)
66
<w> = day of week (sunday= 0)
67
<hh>,<mm>,<ss> = hour, minute, second
68
<U> = 'U' UTC time display
69
<S> = '#' if never synced since powerup else ' ' for DCF U/A 31
70
'#' if not PZF sychronisation available else ' ' for PZF 535
71
<F> = '*' if time comes from internal quartz else ' '
72
<D> = 'S' if daylight saving time is active else ' '
73
<A> = '!' during the hour preceeding an daylight saving time
75
<L> = 'A' LEAP second announcement
76
<R> = 'R' alternate antenna
78
<p>Meinberg GPS166 receiver<br>
79
You must get the Uni-Erlangen firmware for the GPS receiver support to work to full satisfaction !</p>
81
<STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <+/-><00:00>; <U><S><F><D><A><L><R><L>; <position...><ETX>
83
000000000111111111122222222223333333333444444444455555555556666666
84
123456789012345678901234567890123456789012345678901234567890123456
85
\x0209.07.93; 5; 08:48:26; +00:00; ; 49.5736N 11.0280E 373m\x03
88
<STX> = '\002' ASCII start of text
89
<ETX> = '\003' ASCII end of text
90
<dd>,<mm>,<yy> = day, month, year(2 digits!!)
91
<w> = day of week (sunday= 0)
92
<hh>,<mm>,<ss> = hour, minute, second
93
<+/->,<00:00> = offset to UTC
94
<S> = '#' if never synced since powerup else ' ' for DCF U/A 31
95
'#' if not PZF sychronisation available else ' ' for PZF 535
96
<U> = 'U' UTC time display
97
<F> = '*' if time comes from internal quartz else ' '
98
<D> = 'S' if daylight saving time is active else ' '
99
<A> = '!' during the hour preceeding an daylight saving time
101
<L> = 'A' LEAP second announcement
102
<R> = 'R' alternate antenna (reminiscent of PZF535) usually ' '
103
<L> = 'L' on 23:59:60
105
<p>For the Meinberg parse look into clock_meinberg.c</p>
106
<h4>Raw DCF77 Data via serial line</h4>
107
<p>RAWDCF: end=TIMEOUT>1.5s, sync each char (any char),generate psuedo time codes, fixed format</p>
108
<p>direct DCF77 code input</p>
109
<p>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.</p>
40
<p>All clocks should be run at datagram once per second.<br><br></p>
41
<p>Format of the Meinberg standard time string:</p>
43
<b><i><STX></i>D:<i>dd.mm.yy</i>;T:<i>w</i>;U:<i>hh.mm.ss</i>;<i>uvxy</i><i><ETX></i></b>
44
pos: 0 000000001111111111222222222233 3
45
1 234567890123456789012345678901 2
47
<i><STX></i> = start-of-text, ASCII code 0x02
48
<i>dd.mm.yy</i> = day of month, month, year of the century, separated by dots
49
<i>w</i> = day of week (1..7, Monday = 1)
50
<i>hh:mm:ss</i> = hour, minute, second, separated by dots
51
<i>u</i> = '#' for GPS receivers: time is <b>not</b> synchronized
52
'#' for older PZF5xx receivers: no correlation, not synchronized
53
'#' for other devices: never sync'ed since powerup
54
' ' if nothing of the above applies
55
<i>v</i> = '*' for GPS receivers: position has <b>not</b> been verified
56
'*' for other devices: freewheeling based on internal quartz
57
' ' if nothing of the above applies
58
<i>x</i> = 'U' if UTC time is transmitted
59
'S' if daylight saving time is active
60
' ' if nothing of the above applies
61
<i>y</i> = '!' during the hour preceding start or end of daylight saving time
62
'A' during the hour preceding a leap second
63
' ' if nothing of the above applies
64
<i><ETX></i> = end-of-text, ASCII code 0x03
66
<p>Format of the Uni Erlangen time string for PZF5xx receivers:</p>
68
<b><i><STX></i><i>dd.mm.yy</i>; <i>w</i>; <i>hh:mm:ss</i>; <i>tuvxyza</i><i><ETX></i></b>
69
pos: 0 000000001111111111222222222233 3
70
1 234567890123456789012345678901 2
72
<i><STX></i> = start-of-text, ASCII code 0x02
73
<i>dd.mm.yy</i> = day of month, month, year of the century, separated by dots
74
<i>w</i> = day of week (1..7, Monday = 1)
75
<i>hh:mm:ss</i> = hour, minute, second, separated by colons
77
<i>t</i> = 'U' if UTC time is transmitted, else ' '
78
<i>u</i> = '#' for older PZF5xx receivers: no correlation, not synchronized
79
'#' for PZF511 and newer: never sync'ed since powerup
80
' ' if nothing of the above applies
81
<i>v</i> = '*' if freewheeling based on internal quartz, else ' '
82
<i>x</i> = 'S' if daylight saving time is active, else ' '
83
<i>y</i> = '!' during the hour preceding start or end of daylight saving time, else ' '
84
<i>z</i> = 'A' during the hour preceding a leap second, else ' '
85
<i>a</i> = 'R' alternate antenna (reminiscent of PZF5xx), usually ' ' for GPS receivers
86
<i><ETX></i> = end-of-text, ASCII code 0x03
88
<p>Format of the Uni Erlangen time string for GPS16x/GPS17x receivers:</p>
90
<b><i><STX></i><i>dd.mm.yy</i>; <i>w</i>; <i>hh:mm:ss</i>; <i>+uu:uu</i>; <i>uvxyzab</i>; <i>ll.lllln</i> <i>lll.lllle</i> <i>hhhh</i>m<i><ETX></i></b>
91
pos: 0 0000000011111111112222222222333333333344444444445555555555666666 6
92
1 2345678901234567890123456789012345678901234567890123456789012345 6
94
<i><STX></i> = start-of-text, ASCII code 0x02
95
<i>dd.mm.yy</i> = day of month, month, year of the century, separated by dots
96
<i>w</i> = day of week (1..7, Monday = 1)
97
<i>hh:mm:ss</i> = hour, minute, second, separated by colons
98
<i>+uu:uu</i> = offset to UTC in hours and minutes, preceded by + or -
99
<i>u</i> = '#' if time is <b>not</b> synchronized, else ' '
100
<i>v</i> = '*' if position has <b>not</b> been verified, else ' '
101
<i>x</i> = 'S' if daylight saving time is active, else ' '
102
<i>y</i> = '!' during the hour preceding start or end of daylight saving time, else ' '
103
<i>z</i> = 'A' during the hour preceding a leap second, else ' '
104
<i>a</i> = 'R' alternate antenna (reminiscent of PZF5xx), usually ' ' for GPS receivers
105
<i>b</i> = 'L' during a leap second, i.e. if the seconds field is 60, else ' '
106
<i>ll.lllln</i> = position latitude in degrees, 'n' can actually be 'N' or 'S', i.e. North or South
107
<i>lll.lllle</i> = position longitude in degrees, 'e' can actually be 'E' or 'W', i.e. East or West
108
<i>hhhh</i> = position altitude in meters, always followed by 'm'
109
<i><ETX></i> = end-of-text, ASCII code 0x03
111
<p>Examples for Uni Erlangen strings from GPS receivers:</p>
113
\x02 09.07.93; 5; 08:48:26; +00:00; ; 49.5736N 11.0280E 373m \x03
114
\x02 08.11.06; 3; 14:39:39; +00:00; ; 51.9828N 9.2258E 176m \x03
116
<p>The Uni Erlangen formats should be used preferably. Newer Meinberg GPS receivers can be configured to transmit that format, for older devices there may be a special firmware version available.</p>
117
<p>For the Meinberg parse look into clk_meinberg.c<br><br></p>
119
<h4>Raw DCF77 Data via serial line</h4>
120
<p>RAWDCF: end=TIMEOUT>1.5s, sync each char (any char),generate psuedo time codes, fixed format</p>
121
<p>direct DCF77 code input</p>
122
<p>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.</p>
111
124
The preferred tty setting is:
112
125
CFLAG (B50|CS8|CREAD|CLOCAL)
117
<h4>DCF77 raw time code</h4>
118
<p>From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig und Berlin, M„rz 1989<br>
120
<p>Timecode transmission:</p>
130
<h4>DCF77 raw time code</h4>
131
<p>From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig und Berlin, März 1989<br>
133
<p>Timecode transmission:</p>
124
137
time marks are send every second except for the second before the