1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> |
---|
5 | <title>Radio CHU Audio Demodulator/Decoder</title> |
---|
6 | </head> |
---|
7 | <body> |
---|
8 | <h3>Radio CHU Audio Demodulator/Decoder</h3> |
---|
9 | |
---|
10 | <hr> |
---|
11 | <h4>Synopsis</h4> |
---|
12 | |
---|
13 | Address: 127.127.7.<i>u</i> <br> |
---|
14 | Reference ID: <tt>CHU</tt> <br> |
---|
15 | Driver ID: <tt>CHU</tt> <br> |
---|
16 | Modem Port: <tt>/dev/chu<i>u</i></tt>; 300 baud, 8-bits, no parity |
---|
17 | <br> |
---|
18 | Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no |
---|
19 | parity <br> |
---|
20 | Audio Device: <tt>/dev/chu_audio</tt> and <tt>/dev/audioctl</tt> |
---|
21 | |
---|
22 | <h4>Description</h4> |
---|
23 | |
---|
24 | <p>This driver synchronizes the computer time using data encoded in |
---|
25 | radio transmissions from Canadian time/frequency station CHU in |
---|
26 | Ottawa, Ontario. It replaces an earlier one, built by Dennis |
---|
27 | Ferguson in 1988, which required a special line discipline to |
---|
28 | preprocessed the signal. The new driver includes more powerful |
---|
29 | algorithms implemented directly in the driver and requires no |
---|
30 | preprocessing.</p> |
---|
31 | |
---|
32 | <p>CHU transmissions are made continuously on 3330 kHz, 7335 kHz |
---|
33 | and 14670 kHz in upper sideband, compatible AM mode. An ordinary |
---|
34 | shortwave receiver can be tuned manually to one of these |
---|
35 | frequencies or, in the case of ICOM receivers, the receiver can be |
---|
36 | tuned automatically as propagation conditions change throughout the |
---|
37 | day and night. The performance of this driver when tracking the |
---|
38 | station is ordinarily better than 1 ms in time with frequency drift |
---|
39 | less than 0.5 PPM when not tracking the station.</p> |
---|
40 | |
---|
41 | <p>While there are currently no known commercial CHU receivers, a |
---|
42 | simple but effective receiver/demodulator can be constructed from |
---|
43 | an ordinary shortwave receiver and Bell 103 compatible, 300-b/s |
---|
44 | modem or modem chip, as described in the <a href="gadget.htm"> |
---|
45 | Gadget Box PPS Level Converter and CHU Modem</a> page. The driver |
---|
46 | can use the modem to receive the radio signal and demodulate the |
---|
47 | data or, if available, the driver can use the audio codec of the |
---|
48 | Sun workstation or another with compatible audio interface. In the |
---|
49 | latter case, the driver implements the modem using DSP routines, so |
---|
50 | the radio can be connected directly to either the microphone on |
---|
51 | line input port.</p> |
---|
52 | |
---|
53 | <p>This driver incorporates several features in common with other |
---|
54 | audio drivers such as described in the <a href="driver36.htm">Radio |
---|
55 | WWV/H Audio Demodulator/Decoder</a> and the <a href="driver6.htm"> |
---|
56 | IRIG Audio Decoder</a> pages. They include automatic gain control |
---|
57 | (AGC), selectable audio codec port and signal monitoring |
---|
58 | capabilities. For a discussion of these common features, as well as |
---|
59 | a guide to hookup, debugging and monitoring, see the <a href= |
---|
60 | "audio.htm">Reference Clock Audio Drivers</a> page.</p> |
---|
61 | |
---|
62 | <p>Ordinarily, the driver poll interval is set to 14 (about 4.5 h), |
---|
63 | although this can be changed with configuration commands. As long |
---|
64 | as the clock is set or verified at least once during this interval, |
---|
65 | the NTP algorithms will consider the source reachable and |
---|
66 | selectable to discipline the system clock. However, if this does |
---|
67 | not happen for eight poll intervals, the algorithms will consider |
---|
68 | the source unreachable and some other source will be chosen (if |
---|
69 | available) to discipline the system clock.</p> |
---|
70 | |
---|
71 | <p>The decoding algorithms process the data using |
---|
72 | maximum-likelihood techniques which exploit the considerable degree |
---|
73 | of redundancy available in each broadcast message or burst. As |
---|
74 | described below, every character is sent twice and, in the case of |
---|
75 | format A bursts, the burst is sent eight times every minute. In the |
---|
76 | case of format B bursts, which are sent once each minute, the burst |
---|
77 | is considered correct only if every character matches its |
---|
78 | repetition in the burst. In the case of format A messages, a |
---|
79 | majority decoder requires at least six repetitions for each digit |
---|
80 | in the timecode and more than half of the repetitions decode to the |
---|
81 | same digit. Every character in every burst provides an independent |
---|
82 | timestamp upon arrival with a potential total of over 60 timestamps |
---|
83 | for each minute.</p> |
---|
84 | |
---|
85 | <p>A timecode in the format described below is assembled when all |
---|
86 | bursts have been received in the minute. The timecode is considered |
---|
87 | valid and the clock set when at least one valid format B burst has |
---|
88 | been decoded and the above requirements are met. The <tt>yyyy</tt> |
---|
89 | year field in the timecode indicates whether a valid format B burst |
---|
90 | has been received. Upon startup, this field is initialized at zero; |
---|
91 | when a valid format B burst is received, it is set to the current |
---|
92 | Gregorian year. The <tt>q</tt> quality character field in the |
---|
93 | timecode indicates whether a valid timecode has been determined. If |
---|
94 | any of the high order three bits of this character are set, the |
---|
95 | timecode is invalid.</p> |
---|
96 | |
---|
97 | <p>Once the clock has been set for the first time, it will appear |
---|
98 | reachable and selectable to discipline the system clock, even if |
---|
99 | the broadcast signal is lost. Since the signals are almost always |
---|
100 | available during some period of the day and the NTP clock |
---|
101 | discipline algorithms are designed to work well even in this case, |
---|
102 | it is unlikely that the system clock could drift more than a few |
---|
103 | tens of milliseconds during periods of signal loss. To protect |
---|
104 | against this most unlikely situation, if after four days with no |
---|
105 | signals, the clock is considered unset and resumes the |
---|
106 | synchronization procedure from the beginning.</p> |
---|
107 | |
---|
108 | <p>The last three fields in the timecode are useful in assessing |
---|
109 | the quality of the radio channel during the most recent minute |
---|
110 | bursts were received. The <tt>bcnt</tt> field shows the number of |
---|
111 | format A bursts in the range 1-8. The <tt>dist</tt> field shows the |
---|
112 | majority decoder distance, or the minimum number of sample |
---|
113 | repetitions for each digit of the timecode in the range 0-16. The |
---|
114 | <tt>tsmp</tt> field shows the number of timestamps determined in |
---|
115 | the range 0-60. For a valid timecode, <tt>bcnt</tt> must be at |
---|
116 | least 3, <tt>dist</tt> must be greater than <tt>bcnt</tt> and <tt> |
---|
117 | tsmp</tt> must be at least 20.</p> |
---|
118 | |
---|
119 | <h4>Program Operation</h4> |
---|
120 | |
---|
121 | <p>The program consists of four major parts: the DSP modem, maximum |
---|
122 | likelihood UART, burst assembler and majority decoder. The DSP |
---|
123 | modem demodulates Bell 103 modem answer-frequency signals; that is, |
---|
124 | frequency-shift keyed (FSK) tones of 2225 Hz (mark) and 2025 Hz |
---|
125 | (space). This is done using a 4th-order IIR filter and |
---|
126 | limiter/discriminator with 500-Hz bandpass centered on 2125 Hz and |
---|
127 | followed by a FIR raised-cosine lowpass filter optimized for the |
---|
128 | 300-b/s data rate. Alternately, the driver can be compiled to |
---|
129 | delete the modem and input 300 b/s data directly from an external |
---|
130 | modem via a serial port.</p> |
---|
131 | |
---|
132 | <p>The maximum likelihood UART is implemented using a set of eight |
---|
133 | 11-stage shift registers, one for each of eight phases of the |
---|
134 | 300-b/s bit clock. At each phase a new baseband signal value from |
---|
135 | the DSP modem is shifted into the corresponding register and the |
---|
136 | maximum and minimum over all 11 samples computed. This establishes |
---|
137 | a slice level midway between the maximum and minimum over all |
---|
138 | stages. For each stage, a signal level above this level is a mark |
---|
139 | (1) and below is a space (0). A quality metric is calculated for |
---|
140 | each register with respect to the slice level and the a-priori |
---|
141 | signal consisting of a mark bit (previous stop bit), space (start) |
---|
142 | bit, eight arbitrary information bits and the first of the two mark |
---|
143 | (stop) bits.</p> |
---|
144 | |
---|
145 | <p>The shift registers are processed in round-robin order as each |
---|
146 | modem value arrives until one of them shows a valid framing pattern |
---|
147 | consisting of a mark bit, space bit, eight arbitrary data bits and |
---|
148 | a mark bit. When found, the data bits from the register with the |
---|
149 | best metric is chosen as the maximum likelihood character and the |
---|
150 | UART begins to process the next character.</p> |
---|
151 | |
---|
152 | <p>The burst assembler processes characters either from the maximum |
---|
153 | likelihood UART or directly from the serial port as configured. A |
---|
154 | burst begins when a character is received and is processed after a |
---|
155 | timeout interval when no characters are received. If the interval |
---|
156 | between characters is greater than two characters, but less than |
---|
157 | the timeout interval, the burst is rejected as a runt and a new |
---|
158 | burst begun. As each character is received, a timestamp is captured |
---|
159 | and saved for later processing.</p> |
---|
160 | |
---|
161 | <p>A valid burst consists of ten characters in two replicated |
---|
162 | five-character blocks. A format B block contains the year and other |
---|
163 | information in ten hexadecimal digits. A format A block contains |
---|
164 | the timecode in ten decimal digits, the first of which is a framing |
---|
165 | code (6). The burst assembler must deal with cases where the first |
---|
166 | character of a format A burst is lost or is noise. This is done |
---|
167 | using the framing code to correct the phase, either one character |
---|
168 | early or one character late.</p> |
---|
169 | |
---|
170 | <p>The burst distance is incremented by one for each bit in the |
---|
171 | first block that matches the corresponding bit in the second block |
---|
172 | and decremented by one otherwise. In a format B burst the second |
---|
173 | block is bit-inverted relative to the first, so a perfect burst of |
---|
174 | five 8-bit characters has distance -40. In a format A block the two |
---|
175 | blocks are identical, so a perfect burst has distance +40. Format B |
---|
176 | bursts must be perfect to be acceptable; however, format A bursts, |
---|
177 | which are further processed by the majority decoder, are acceptable |
---|
178 | if the distance is at least 28.</p> |
---|
179 | |
---|
180 | <p>Each minute of transmission includes eight format A bursts |
---|
181 | containing two timecodes for each second from 31 through 39. The |
---|
182 | majority decoder uses a decoding matrix of ten rows, one for each |
---|
183 | digit position in the timecode, and 16 columns, one for each 4-bit |
---|
184 | code combination that might be decoded at that position. In order |
---|
185 | to use the character timestamps, it is necessary to reliably |
---|
186 | determine the second number of each burst. In a valid burst, the |
---|
187 | last digit of the two timecodes in the block must match and the |
---|
188 | value must be in the range 2-9 and greater than in the previous |
---|
189 | burst.</p> |
---|
190 | |
---|
191 | <p>As each hex digit of a valid burst is processed, the value at |
---|
192 | the row corresponding to the digit position in the timecode and |
---|
193 | column corresponding to the code found at that position is |
---|
194 | incremented. At the end of each minute of transmission, each row of |
---|
195 | the decoding matrix encodes the number of occurrences of each code |
---|
196 | found at the corresponding position of the timecode. However, the |
---|
197 | first digit (framing code) is always 6, the ninth (second tens) is |
---|
198 | always 3 and the last (second units) changes for each burst, so are |
---|
199 | not used.</p> |
---|
200 | |
---|
201 | <p>The maximum over all occurrences at each timecode digit position |
---|
202 | is the distance for that position and the corresponding code is the |
---|
203 | maximum likelihood candidate. If the distance is zero, the decoder |
---|
204 | assumes a miss; if the distance is not more than half the total |
---|
205 | number of occurrences, the decoder assumes a soft error; if two |
---|
206 | different codes with the same distance are found, the decoder |
---|
207 | assumes a hard error. In all these cases the decoder encodes a |
---|
208 | non-decimal character which will later cause a format error when |
---|
209 | the timecode is reformatted. The decoding distance is defined as |
---|
210 | the minimum distance over the first nine digits; the tenth digit |
---|
211 | varies over the seconds and is uncounted.</p> |
---|
212 | |
---|
213 | <p>The result of the majority decoder is a nine-digit timecode |
---|
214 | representing the maximum likelihood candidate for the transmitted |
---|
215 | timecode in that minute. Note that the second and fraction within |
---|
216 | the minute are always zero and that the actual reference point to |
---|
217 | calculate timestamp offsets is backdated to the first second of the |
---|
218 | minute. At this point the timecode block is reformatted and the |
---|
219 | year, days, hours and minutes extracted along with other |
---|
220 | information from the format B burst, including DST state, DUT1 |
---|
221 | correction and leap warning. The reformatting operation checks the |
---|
222 | timecode for invalid code combinations that might have been left by |
---|
223 | the majority decoder and rejects the entire timecode if found.</p> |
---|
224 | |
---|
225 | <p>If the timecode is valid, it is passed to the reference clock |
---|
226 | interface along with the backdated timestamp offsets accumulated |
---|
227 | over the minute. A perfect set of nine bursts could generate as |
---|
228 | many as 90 timestamps, but the maximum the interface can handle is |
---|
229 | 60. These are processed by the interface using a median filter and |
---|
230 | trimmed-mean average, so the resulting system clock correction is |
---|
231 | usually much better than would otherwise be the case with radio |
---|
232 | noise, UART jitter and occasional burst errors.</p> |
---|
233 | |
---|
234 | <h4>Autotune</h4> |
---|
235 | |
---|
236 | <p>The driver includes provisions to automatically tune the radio |
---|
237 | in response to changing radio propagation conditions throughout the |
---|
238 | day and night. The radio interface is compatible with the ICOM CI-V |
---|
239 | standard, which is a bidirectional serial bus operating at TTL |
---|
240 | levels. The bus can be connected to a standard serial port using a |
---|
241 | level converter such as the CT-17. The serial port speed is |
---|
242 | presently compiled in the program, but can be changed in the <tt> |
---|
243 | icom.h</tt> header file.</p> |
---|
244 | |
---|
245 | <p>Each ICOM radio is assigned a unique 8-bit ID select code, |
---|
246 | usually expressed in hex format. To activate the CI-V interface, |
---|
247 | the <tt>mode</tt> keyword of the <tt>server</tt> configuration |
---|
248 | command specifies a nonzero select code in decimal format. A table |
---|
249 | of ID select codes for the known ICOM radios is given below. Since |
---|
250 | all ICOM select codes are less than 128, the high order bit of the |
---|
251 | code is used by the driver to specify the baud rate. If this bit is |
---|
252 | not set, the rate is 9600 bps for the newer radios; if set, the |
---|
253 | rate is 1200 bps for the older radios. A missing <tt>mode</tt> |
---|
254 | keyword or a zero argument leaves the interface disabled.</p> |
---|
255 | |
---|
256 | <p>If specified, the driver will attempt to open the device <tt> |
---|
257 | /dev/icom</tt> and, if successful will tune the radio to 3.330 MHz. |
---|
258 | If after five minutes at this frequency not more than two format A |
---|
259 | bursts have been received for any minute, the driver will tune to |
---|
260 | 7.335 MHz, then to 14.670 MHz, then return to 3.330 MHz and |
---|
261 | continue in this cycle. However, the driver is liberal in what it |
---|
262 | assumes of the configuration. If the <tt>/dev/icom</tt> link is not |
---|
263 | present or the open fails or the CI-V bus or radio is inoperative, |
---|
264 | the driver quietly gives up with no harm done.</p> |
---|
265 | |
---|
266 | <h4>Radio Broadcast Format</h4> |
---|
267 | |
---|
268 | <p>The CHU time broadcast includes an audio signal compatible with |
---|
269 | the Bell 103 modem standard (mark = 2225 Hz, space = 2025 Hz). It |
---|
270 | consist of nine, ten-character bursts transmitted at 300 b/s and |
---|
271 | beginning each second from second 31 to second 39 of the minute. |
---|
272 | Each character consists of eight data bits plus one start bit and |
---|
273 | two stop bits to encode two hex digits. The burst data consist of |
---|
274 | five characters (ten hex digits) followed by a repeat of these |
---|
275 | characters. In format A, the characters are repeated in the same |
---|
276 | polarity; in format B, the characters are repeated in the opposite |
---|
277 | polarity.</p> |
---|
278 | |
---|
279 | <p>Format A bursts are sent at seconds 32 through 39 of the minute |
---|
280 | in hex digits</p> |
---|
281 | |
---|
282 | <p><tt>6dddhhmmss6dddhhmmss</tt></p> |
---|
283 | |
---|
284 | <p>The first ten digits encode a frame marker (<tt>6</tt>) followed |
---|
285 | by the day (<tt>ddd</tt>), hour (<tt>hh</tt>), minute (<tt>mm</tt>) |
---|
286 | and second (<tt>ss</tt>). Since format A bursts are sent during the |
---|
287 | third decade of seconds the tens digit of <tt>ss</tt> is always 3. |
---|
288 | The driver uses this to determine correct burst synchronization. |
---|
289 | These digits are then repeated with the same polarity.</p> |
---|
290 | |
---|
291 | <p>Format B bursts are sent at second 31 of the minute in hex |
---|
292 | digits</p> |
---|
293 | |
---|
294 | <p><tt>xdyyyyttaaxdyyyyttaa</tt></p> |
---|
295 | |
---|
296 | <p>The first ten digits encode a code (<tt>x</tt> described below) |
---|
297 | followed by the DUT1 (<tt>d</tt> in deciseconds), Gregorian year |
---|
298 | (<tt>yyyy</tt>), difference TAI - UTC (<tt>tt</tt>) and daylight |
---|
299 | time indicator (<tt>aa</tt>) peculiar to Canada. These digits are |
---|
300 | then repeated with inverted polarity.</p> |
---|
301 | |
---|
302 | <p>The <tt>x</tt> is coded</p> |
---|
303 | |
---|
304 | <dl> |
---|
305 | <dt><tt>1</tt></dt> |
---|
306 | |
---|
307 | <dd>Sign of DUT (0 = +)/dd></dd> |
---|
308 | |
---|
309 | <dt><tt>2</tt></dt> |
---|
310 | |
---|
311 | <dd>Leap second warning. One second will be added.</dd> |
---|
312 | |
---|
313 | <dt><tt>4</tt></dt> |
---|
314 | |
---|
315 | <dd>Leap second warning. One second will be subtracted. This is not |
---|
316 | likely to happen in our universe.</dd> |
---|
317 | |
---|
318 | <dt><tt>8</tt></dt> |
---|
319 | |
---|
320 | <dd>Even parity bit for this nibble.</dd> |
---|
321 | </dl> |
---|
322 | |
---|
323 | <p>By design, the last stop bit of the last character in the burst |
---|
324 | coincides with 0.5 second. Since characters have 11 bits and are |
---|
325 | transmitted at 300 b/s, the last stop bit of the first character |
---|
326 | coincides with 0.5 - 10 * 11/300 = 0.133 second. Depending on the |
---|
327 | UART, character interrupts can vary somewhere between the beginning |
---|
328 | of bit 9 and end of bit 11. These eccentricities can be corrected |
---|
329 | along with the radio propagation delay using the <tt>fudge |
---|
330 | time1</tt> variable.</p> |
---|
331 | |
---|
332 | <h4>Debugging Aids</h4> |
---|
333 | |
---|
334 | <p>The most convenient way to track the program status is using the |
---|
335 | <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This |
---|
336 | displays the last determined timecode and related status and error |
---|
337 | counters, even when the program is not discipline the system clock. |
---|
338 | If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> |
---|
339 | command line)is enabled, the program produces detailed status |
---|
340 | messages as it operates. If the <tt>fudge flag 4</tt> is set, these |
---|
341 | messages are written to the <tt>clockstats</tt> file. All messages |
---|
342 | produced by this driver have the prefix <tt>chu</tt> for convenient |
---|
343 | filtering with the Unix <tt>grep</tt> command.</p> |
---|
344 | |
---|
345 | <p>With debugging enabled the driver produces messages in the |
---|
346 | following formats:</p> |
---|
347 | |
---|
348 | <p>A format <tt>chuA</tt> message is produced for each format A |
---|
349 | burst received in seconds 32 through 39 of the minute:</p> |
---|
350 | |
---|
351 | <p><tt>chuA n b s code</tt></p> |
---|
352 | |
---|
353 | <p>where <tt>n</tt> is the number of characters in the burst |
---|
354 | (0-11), <tt>b</tt> the burst distance (0-40), <tt>s</tt> the |
---|
355 | synchronization distance (0-40) and <tt>code</tt> the burst |
---|
356 | characters as received. Note that the hex digits in each character |
---|
357 | are reversed and the last ten digits inverted, so the burst</p> |
---|
358 | |
---|
359 | <p><tt>11 40 1091891300ef6e76ecff</tt></p> |
---|
360 | |
---|
361 | <p>is interpreted as containing 11 characters with burst distance |
---|
362 | 40. The nibble-swapped timecode shows DUT1 +0.1 second, year 1998 |
---|
363 | and TAI -UTC 31 seconds.</p> |
---|
364 | |
---|
365 | <p>A format <tt>chuB</tt> message is produced for each format B |
---|
366 | burst received in second 31 of the minute:</p> |
---|
367 | |
---|
368 | <p><tt>chuB n b f s m code</tt></p> |
---|
369 | |
---|
370 | <p>where <tt>n</tt> is the number of characters in the burst |
---|
371 | (0-11), <tt>b</tt> the burst distance (0-40), <tt>f</tt> the field |
---|
372 | alignment (-1, 0, 1), <tt>s</tt>the synchronization distance |
---|
373 | (0-16), <tt>m</tt>the burst number (2-9) and <tt>code</tt> the |
---|
374 | burst characters as received. Note that the hex digits in each |
---|
375 | character are reversed, so the burst</p> |
---|
376 | |
---|
377 | <p><tt>10 38 0 16 9 06851292930685129293</tt></p> |
---|
378 | |
---|
379 | <p>is interpreted as containing 11 characters with burst distance |
---|
380 | 38, field alignment 0, synchronization distance 16 and burst number |
---|
381 | 9. The nibble-swapped timecode shows day 58, hour 21, minute 29 and |
---|
382 | second 39.</p> |
---|
383 | |
---|
384 | <p>If the CI-V interface for ICOM radios is active, a debug level |
---|
385 | greater than 1 will produce a trace of the CI-V command and |
---|
386 | response messages. Interpretation of these messages requires |
---|
387 | knowledge of the CI-V protocol, which is beyond the scope of this |
---|
388 | document.</p> |
---|
389 | |
---|
390 | <h4>Monitor Data</h4> |
---|
391 | |
---|
392 | When enabled by the <tt>filegen</tt> facility, every received |
---|
393 | timecode is written to the <tt>clockstats</tt> file in the |
---|
394 | following format: |
---|
395 | |
---|
396 | <pre> |
---|
397 | sq yy ddd hh:mm:ss.fff ld dut lset agc rfrq bcnt dist tsmp |
---|
398 | |
---|
399 | s sync indicator |
---|
400 | q quality character |
---|
401 | yyyy Gregorian year |
---|
402 | ddd day of year |
---|
403 | hh hour of day |
---|
404 | mm minute of hour |
---|
405 | ss second of minute |
---|
406 | fff millisecond of second |
---|
407 | l leap second warning |
---|
408 | d DST state |
---|
409 | dut DUT sign and magnitude in deciseconds |
---|
410 | lset minutes since last set |
---|
411 | agc audio gain (0-255) |
---|
412 | rfrq radio frequency |
---|
413 | bcnt burst count |
---|
414 | dist decoding distance |
---|
415 | tsmp timestamps captured |
---|
416 | </pre> |
---|
417 | |
---|
418 | The fields beginning with <tt>year</tt> and extending through <tt> |
---|
419 | dut</tt> are decoded from the received data and are in fixed-length |
---|
420 | format. The <tt>agc</tt> and <tt>lset</tt> fields, as well as the |
---|
421 | following driver-dependent fields, are in variable-length format. |
---|
422 | |
---|
423 | <dl> |
---|
424 | <dt><tt>s</tt></dt> |
---|
425 | |
---|
426 | <dd>The sync indicator is initially <tt>?</tt> before the clock is |
---|
427 | set, but turns to space when the clock is correctly set.</dd> |
---|
428 | |
---|
429 | <dt><tt>q</tt></dt> |
---|
430 | |
---|
431 | <dd>The quality character is a four-bit hexadecimal code showing |
---|
432 | which alarms have been raised during the most recent minute. Each |
---|
433 | bit is associated with a specific alarm condition according to the |
---|
434 | following: |
---|
435 | |
---|
436 | <dl> |
---|
437 | <dt><tt>8</tt></dt> |
---|
438 | |
---|
439 | <dd>Decoder alarm. A majority of repetitions for at least one digit |
---|
440 | of the timecode fails to agree.</dd> |
---|
441 | |
---|
442 | <dt><tt>4</tt></dt> |
---|
443 | |
---|
444 | <dd>Timestamp alarm. Fewer than 20 timestamps have been |
---|
445 | determined.</dd> |
---|
446 | |
---|
447 | <dt><tt>2</tt></dt> |
---|
448 | |
---|
449 | <dd>Format alarm. The majority timecode contains invalid bit |
---|
450 | combinations.</dd> |
---|
451 | |
---|
452 | <dt><tt>1</tt></dt> |
---|
453 | |
---|
454 | <dd>Frame alarm. A framing or format error occurred on at least one |
---|
455 | burst during the minute.</dd> |
---|
456 | </dl> |
---|
457 | |
---|
458 | It is important to note that one or more of the above alarms does |
---|
459 | not necessarily indicate a clock error, but only that the decoder |
---|
460 | has detected a condition that may in future result in an |
---|
461 | error.</dd> |
---|
462 | |
---|
463 | <dt><tt>yyyy ddd hh:mm:ss.fff</tt></dt> |
---|
464 | |
---|
465 | <dd>The timecode format itself is self explanatory. Note that the |
---|
466 | Gregorian year is decoded directly from the transmitted |
---|
467 | timecode.</dd> |
---|
468 | |
---|
469 | <dt><tt>l</tt></dt> |
---|
470 | |
---|
471 | <dd>The leap second warning is normally space, but changes to <tt> |
---|
472 | L</tt> if a leap second is to occur at the end of the month of June |
---|
473 | or December.</dd> |
---|
474 | |
---|
475 | <dt><tt>d</tt></dt> |
---|
476 | |
---|
477 | <dd>The DST code for Canada encodes the state for all |
---|
478 | provinces.</dd> |
---|
479 | |
---|
480 | <dt><tt>dut</tt></dt> |
---|
481 | |
---|
482 | <dd>The DUT sign and magnitude shows the current UT1 offset |
---|
483 | relative to the displayed UTC time, in deciseconds.</dd> |
---|
484 | |
---|
485 | <dt><tt>lset</tt></dt> |
---|
486 | |
---|
487 | <dd>Before the clock is set, the interval since last set is the |
---|
488 | number of minutes since the program was started; after the clock is |
---|
489 | set, this is number of minutes since the time was last verified |
---|
490 | relative to the broadcast signal.</dd> |
---|
491 | |
---|
492 | <dt><tt>agc</tt></dt> |
---|
493 | |
---|
494 | <dd>The audio gain shows the current codec gain setting in the |
---|
495 | range 0 to 255. Ordinarily, the receiver audio gain control or IRIG |
---|
496 | level control should be set for a value midway in this range.</dd> |
---|
497 | |
---|
498 | <dt><tt>rfrq</tt></dt> |
---|
499 | |
---|
500 | <dd>The current radio frequency, if the CI-V interface is active, |
---|
501 | or 'X' if not.</dd> |
---|
502 | |
---|
503 | <dt><tt>bcnt</tt></dt> |
---|
504 | |
---|
505 | <dd>The number of format A bursts received during the most recent |
---|
506 | minute bursts were received.</dd> |
---|
507 | |
---|
508 | <dt><tt>dist</tt></dt> |
---|
509 | |
---|
510 | <dd>The minimum decoding distance determined during the most recent |
---|
511 | minute bursts were received.</dd> |
---|
512 | |
---|
513 | <dt><tt>tsmp</tt></dt> |
---|
514 | |
---|
515 | <dd>The number of timestamps determined during the most recent |
---|
516 | minute bursts were received.</dd> |
---|
517 | </dl> |
---|
518 | |
---|
519 | <h4>Modes</h4> |
---|
520 | |
---|
521 | <p>The <tt>mode</tt> keyword of the <tt>server</tt> configuration |
---|
522 | command specifies the ICOM ID select code. A missing or zero |
---|
523 | argument disables the CI-V interface. Following are the ID select |
---|
524 | codes for the known radios.</p> |
---|
525 | |
---|
526 | <table cols="6" width="100%"> |
---|
527 | <tr> |
---|
528 | <td>Radio</td> |
---|
529 | <td>Hex</td> |
---|
530 | <td>Decimal</td> |
---|
531 | <td>Radio</td> |
---|
532 | <td>Hex</td> |
---|
533 | <td>Decimal</td> |
---|
534 | </tr> |
---|
535 | |
---|
536 | <tr> |
---|
537 | <td>IC725</td> |
---|
538 | <td>0x28</td> |
---|
539 | <td>40</td> |
---|
540 | <td>IC781</td> |
---|
541 | <td>0x26</td> |
---|
542 | <td>38</td> |
---|
543 | </tr> |
---|
544 | |
---|
545 | <tr> |
---|
546 | <td>IC726</td> |
---|
547 | <td>0x30</td> |
---|
548 | <td>48</td> |
---|
549 | <td>R7000</td> |
---|
550 | <td>0x08</td> |
---|
551 | <td>8</td> |
---|
552 | </tr> |
---|
553 | |
---|
554 | <tr> |
---|
555 | <td>IC735</td> |
---|
556 | <td>0x04</td> |
---|
557 | <td>4</td> |
---|
558 | <td>R71</td> |
---|
559 | <td>0x1A</td> |
---|
560 | <td>26</td> |
---|
561 | </tr> |
---|
562 | |
---|
563 | <tr> |
---|
564 | <td>IC751</td> |
---|
565 | <td>0x1c</td> |
---|
566 | <td>28</td> |
---|
567 | <td>R7100</td> |
---|
568 | <td>0x34</td> |
---|
569 | <td>52</td> |
---|
570 | </tr> |
---|
571 | |
---|
572 | <tr> |
---|
573 | <td>IC761</td> |
---|
574 | <td>0x1e</td> |
---|
575 | <td>30</td> |
---|
576 | <td>R72</td> |
---|
577 | <td>0x32</td> |
---|
578 | <td>50</td> |
---|
579 | </tr> |
---|
580 | |
---|
581 | <tr> |
---|
582 | <td>IC765</td> |
---|
583 | <td>0x2c</td> |
---|
584 | <td>44</td> |
---|
585 | <td>R8500</td> |
---|
586 | <td>0x4a</td> |
---|
587 | <td>74</td> |
---|
588 | </tr> |
---|
589 | |
---|
590 | <tr> |
---|
591 | <td>IC775</td> |
---|
592 | <td>0x46</td> |
---|
593 | <td>68</td> |
---|
594 | <td>R9000</td> |
---|
595 | <td>0x2a</td> |
---|
596 | <td>42</td> |
---|
597 | </tr> |
---|
598 | </table> |
---|
599 | |
---|
600 | <h4>Fudge Factors</h4> |
---|
601 | |
---|
602 | <dl> |
---|
603 | <dt><tt>time1 <i>time</i></tt></dt> |
---|
604 | |
---|
605 | <dd>Specifies the propagation delay for CHU (45:18N 75:45N), in |
---|
606 | seconds and fraction, with default 0.0.</dd> |
---|
607 | |
---|
608 | <dt><tt>time2 <i>time</i></tt></dt> |
---|
609 | |
---|
610 | <dd>Not used by this driver.</dd> |
---|
611 | |
---|
612 | <dt><tt>stratum <i>number</i></tt></dt> |
---|
613 | |
---|
614 | <dd>Specifies the driver stratum, in decimal from 0 to 15, with |
---|
615 | default 0.</dd> |
---|
616 | |
---|
617 | <dt><tt>refid <i>string</i></tt></dt> |
---|
618 | |
---|
619 | <dd>Specifies the driver reference identifier, an ASCII string from |
---|
620 | one to four characters, with default <tt>CHU</tt>.</dd> |
---|
621 | |
---|
622 | <dt><tt>flag1 0 | 1</tt></dt> |
---|
623 | |
---|
624 | <dd>Not used by this driver.</dd> |
---|
625 | |
---|
626 | <dt><tt>flag2 0 | 1</tt></dt> |
---|
627 | |
---|
628 | <dd>When the audio driver is compiled, this flag selects the audio |
---|
629 | input port, where 0 is the mike port (default) and 1 is the line-in |
---|
630 | port. It does not seem useful to select the compact disc player |
---|
631 | port.</dd> |
---|
632 | |
---|
633 | <dt><tt>flag3 0 | 1</tt></dt> |
---|
634 | |
---|
635 | <dd>When the audio driver is compiled, this flag enables audio |
---|
636 | monitoring of the input signal. For this purpose, the speaker |
---|
637 | volume must be set before the driver is started.</dd> |
---|
638 | |
---|
639 | <dt><tt>flag4 0 | 1</tt></dt> |
---|
640 | |
---|
641 | <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd> |
---|
642 | </dl> |
---|
643 | |
---|
644 | <h4>Additional Information</h4> |
---|
645 | |
---|
646 | <a href="refclock.htm">Reference Clock Drivers</a> <br> |
---|
647 | <a href="audio.htm">Reference Clock Audio Drivers</a> |
---|
648 | |
---|
649 | <hr> |
---|
650 | <a href="index.htm"><img align="left" src="pic/home.gif" alt= |
---|
651 | "gif"></a> |
---|
652 | |
---|
653 | <address><a href="mailto:mills@udel.edu">David L. Mills |
---|
654 | <mills@udel.edu></a></address> |
---|
655 | </body> |
---|
656 | </html> |
---|
657 | |
---|