From: Harlan Stenn Date: Thu, 21 Apr 2005 04:27:25 +0000 (-0400) Subject: Documentation changes from Dave Mills X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=625db623ebfe56b42968f2e68df894078b5f726e;p=thirdparty%2Fntp.git Documentation changes from Dave Mills bk: 42672badhcD8jHZlXcSFbiLVcjbhLw --- diff --git a/html/drivers/driver18.html b/html/drivers/driver18.html index b91211434e..1fb5e36ea3 100644 --- a/html/drivers/driver18.html +++ b/html/drivers/driver18.html @@ -17,17 +17,16 @@ Reference ID: NIST | USNO | PTB | WWVB
Driver ID: ACTS_MODEM
Serial Port: /dev/actsu; 9600 baud, 8-bits, no parity
Features: tty_clk
- Requires: /usr/include/sys/termios.h header file with modem control

+ Requires: /usr/include/sys/termios.h header file with modem control and a dial-out (cua) device.

Description

-

This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available.

-

For best results the indicated time must be corrected for the modem and telephone circuit propagation delay, which can be 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a few milliseconds, occasionally higher.

+

This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available. It can also be configured to operate full period.

+

For best results the indicated time must be corrected for the modem and telephone circuit propagation delays, which can reach 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a few milliseconds, occasionally higher.

This driver requires a 9600-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. The actual line speed ranges from 1200 bps with USNO to 14,400 bps with NIST. The modem setup string is hard-coded in the driver and may require changes for nonstandard modems or special circumstances.

-

There are three modes of operation selected by the mode keyword in the server configuration command. In manual mode (2) the calling program is initiated by setting fudge flag1. This can be done using ntpdc, either manually or via a cron job. In auto mode (0) flag1 is set automatically at each poll event. In backup mode (1) flag1 is set automatically at each poll event, but only if the prefer peer is unreachable.

-

When flag1 is set, the calling program dials the first number in the list specified by the phone command. If the call fails for any reason, the program dials the second number and so on. The number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The flag1 is reset and the calling program terminated if (a) valid clock update has been determined, (b) no more numbers remain in the list, (c) a device fault or timeout occurs or (d) fudge flag1 is reset manually using ntpdc.

-

The driver is transparent to the message format of each modem time service and Spectracom radio. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.

-

Ordinarily, the serial port is connected to a modem; however, if fudge flag3 is set, it can be connected directly to a device or another computer for testing or calibration. In principle, fudge flag2 enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.

-

The minpoll and maxpoll keywords of the server configuration command can be used to limit the intervals between calls. Ordinarily, the poll interval follows the system poll interval, but not less than the minpoll specification. should ramp up over time to over a day.

-

The behavior of the clock selection algorithm is modified when this driver is in use. The algorithm is designed so that this driver will be selected only when the prefer peer is unreachable or unspecified. This can be overridden by assigning this driver as the prefer peer, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored.

+

There are three modes of operation selected by the mode keyword in the server configuration command. In manual mode (2) the calling program is initiated by setting fudge flag1. This can be done manually using ntpdc, or by a cron job. In auto mode (0) flag1 is set at each poll event. In backup mode (1) flag1 is set at each poll event, but only if no other synchronization sources are available.

+

When flag1 is set, the calling program dials the first number in the list specified by the phone command. If the call fails for any reason, the program dials the second number and so on. The phone number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The flag1 is reset and the calling program terminated if (a) valid clock update has been determined, (b) no more numbers remain in the list, (c) a device fault or timeout occurs or (d) fudge flag1 is reset manually using ntpdc.

+

The driver automatically recognizes the message format of each modem time service. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.

+

Ordinarily, the serial port is connected to a modem; however, if fudge flag3 is set, it can be connected directly to a Spectracom WWV or GPS radio for testing or calibration. The Spectracom radio can be connected via a modem if the radio is connfigured to send time codes continuoulsly at 1-s intervals. In principle, fudge flag2 enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.

+

The minpoll and maxpoll keywords of the server configuration command can be used to limit the intervals between calls. The recommended settings are 12 (1.1 hours) for minpoll and 17 (36 hours) for maxpoll. Ordinarily, the poll interval will start at minpoll and ramp up to maxpoll in a day or two.

US Phone Numbers and Formats

Note: Phone numbers include the entire Hayes modem command, including the ATDT and other control codes as may be necessary. For most cases only the ATDT may be necessary.

National Institute of Science and Technology (NIST)

@@ -45,7 +44,7 @@

Data Format (two lines, repeating at one-second intervals)

jjjjj nnn hhmmss UTC

-

* on-time character
+

* on-time character for previous timecode message
jjjjj modified Julian day number (not used)
nnn day of year
hhmmss second of day @@ -54,7 +53,7 @@

Spectracom GPS and WWVB Receivers

If a modem is connected to a Spectracom receiver, this driver will call it and retrieve the time in one of two formats, 0 and 2. Ordinarily, the receiver requires a T in order to return the timecode. As this driver does not send data via the modem, it must either be configured in continuous mode or be polled by another local driver.

Monitor Data

-

Every received timecode is written as-is to the clockstats file.

+

The received timecode is written as-is to the clockstats file along with the Hayes connection and hangup commands and result codes.

Fudge Factors

time1 time diff --git a/html/drivers/driver36.html b/html/drivers/driver36.html index 8da6fe32c8..d5719a5b3e 100644 --- a/html/drivers/driver36.html +++ b/html/drivers/driver36.html @@ -51,7 +51,7 @@

To work well, the driver needs a shortwave receiver with good audio response at 100 Hz. Most shortwave and communications receivers roll off the audio response below 250 Hz, so this can be a problem, especially with receivers using DSP technology, since DSP filters can have very fast rolloff outside the passband. Some DSP transceivers, in particular the ICOM 775, have a programmable low frequency cutoff which can be set as low as 80 Hz. However, this particular radio has a strong low frequency buzz at about 10 Hz which appears in the audio output and can affect data recovery under marginal conditions. Although not tested, it would seem very likely that a cheap shortwave receiver could function just as well as an expensive communications receiver.

Autotune

The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a serial port using a level converter such as the CT-17.

-

Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the mode keyword of the server configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given below. Since all ICOM select codes are less than 128, the high order bit of the code is used by the driver to specify the baud rate. If this bit is not set, the rate is 9600 bps for the newer radios; if set, the rate is 1200 bps for the older radios. A missing mode keyword or a zero argument leaves the interface disabled.

+

Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the mode keyword of the server configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given on the Reference Clock Audio Drivers page. A missing mode keyword or a zero argument leaves the interface disabled.

If specified, the driver will attempt to open the device /dev/icom and, if successful will activate the autotune function and tune the radio to each operating frequency in turn while attempting to acquire minute sync from either WWV or WWVH. However, the driver is liberal in what it assumes of the configuration. If the /dev/icom link is not present or the open fails or the CI-V bus or radio is inoperative, the driver quietly gives up with no harm done.

Once acquiring minute sync, the driver operates as described above to set the clock. However, during seconds 59, 0 and 1 of each minute it tunes the radio to one of the five broadcast frequencies to measure the sync pulse and data pulse amplitudes and SNR and update the signal metric. Each of the five frequencies are probed in a five-minute rotation to build a database of current propagation conditions for all signals that can be heard at the time. At the end of each probe a mitigation procedure scans the database and retunes the radio to the best frequency and station found. For this to work well, the radio should be set for a fast AGC recovery time. This is most important while tracking a strong signal, which is normally the case, and then probing another frequency, which may have much weaker signals.

Reception conditions for each frequency and station are evaluated according to the signal metric, which uses the minute sync pulse amplitude and SNR and data subcarrier amplitude and SNR. The minute pulse is evaluated at second 0, while the data pulse is evaluated at second 1. In principle, the data pulse in second 58 is usable, but the AGC in most radios is not fast enough for a reliable measurement.

@@ -164,92 +164,8 @@

An example timecode is:

0 2000 006 22:36:00 S +3 1 115 WV20 86 5 66.4 1024

Here the clock has been set and no alarms are raised. The year, day and time are displayed along with no leap warning, standard time and DUT +0.3 s. The clock was set on the last minute, the AGC is safely in the middle ot the range 0-255, and the receiver is tracking WWV on 20 MHz. Good receiving conditions prevail, as indicated by the metric 86 and 5 bit errors during the last minute. The current frequency is 66.4 PPM and the averaging interval is 1024 s, indicating the maximum precision available.

-

Modes

-

The mode keyword of the server configuration command specifies the ICOM ID select code in decimal. A missing or zero argument disables the CI-V interface. Following are the ID select codes for the known radios. These codes are for 9600 baud rate; for 1200 baud rate add 128.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RadioHexDecimalRadioHexDecimal
7060x4e787750x4668
706MKIIG0x58887810x2638
7250x28409700x2e46
7260x3048R710x1A26
7350x044R720x3250
7510x1c28R70000x088
756PROII0x64100R85000x4a74
7610x1e30R90000x2a42
7650x2c44
-

Fudge Factors

-
+

Fudge Factors

+
time1 time
Specifies the propagation delay for WWV (40:40:49.0N 105:02:27.0W), in seconds and fraction, with default 0.0.
time2 time @@ -267,7 +183,7 @@
flag4 0 | 1
Enable verbose clockstats recording if set.
-
+
diff --git a/html/drivers/driver6.html b/html/drivers/driver6.html index 34577cceaf..8ca850bc8e 100644 --- a/html/drivers/driver6.html +++ b/html/drivers/driver6.html @@ -39,8 +39,12 @@

Performance and Horror Stories

The m-law companded data format allows considerable latitude in signal levels; however, an automatic gain control (AGC) function is implemented to further compensate for varying input signal levels and to avoid signal distortion. For proper operation, the IRIG signal source should be configured for analog signal levels, NOT digital TTL levels.

The accuracy of the system clock synchronized to the IRIG-B source with this driver and the ntpd daemon is 10-20 ms with a Sun UltraSPARC II running Solaris 2.6 and maybe twice that with a Sun SPARC IPC running SunOS 4.1.3. Be however acutely aware that the accuracy with Solaris 2.8 and presumably beyond has seriously degraded to the order of several milliseconds. The Sun kernel driver has a sawtooth modulation with amplitude over 5 ms peak-peak and period 5.5 s. The crafty IRIG driver uses a transverse filter to remove the modulation and something called a botttom-fisher to remove incidental positive spikes especially prevalent with Sun Blade 1000 and possibly other systems. The result is nominal accuracy and jitter something less than 0.5 ms, but the this is still far inferior to the performance with older systems.

-

The processor resources consumed by the daemon can be significant, ranging from about 1.2 percent on the faster UltraSPARC II to 38 percent on the slower SPARC IPC. However, the overall timing accuracy is limited by the resolution and stability of the CPU clock oscillator and the interval between clock corrections, which is 64 s with this driver. This performance, while probably the best that can be achieved by the daemon itself, can be improved with assist from the PPS discipline as described elsewhere in this documentation.

-

Monitor Data

+

The processor resources consumed by the daemon can be significant, ranging from about 1.2 percent on the faster UltraSPARC II to 38 percent on the slower SPARC IPC. However, the overall timing accuracy is limited by the resolution and stability of the CPU clock oscillator and the interval between clock corrections, which is 64 s with this driver. This performance, while probably the best that can be achieved by the daemon itself, can be improved with assist from the PPS discipline as described elsewhere in this documentation.

+

Autotune

+

The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a serial port using a level converter such as the CT-17.

+

Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the mode keyword of the server configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given on the Reference Clock Audio Drivers page. A missing mode keyword or a zero argument leaves the interface disabled.

+

If specified, the driver will attempt to open the device /dev/icom and, if successful will activate the autotune function and tune the radio to each operating frequency in turn while attempting to acquire minute sync from CHU. However, the driver is liberal in what it assumes of the configuration. If the /dev/icom link is not present or the open fails or the CI-V bus or radio is inoperative, the driver quietly gives up with no harm done.

+

Monitor Data

The timecode format used for debugging and data recording includes data helpful in diagnosing problems with the IRIG signal and codec connections. With debugging enabled (-d on the ntpd command line), the driver produces one line for each timecode in the following format:

00 1 98 23 19:26:52 721 143 0.694 47 20 0.083 66.5 3094572411.00027

The first field containes the error flags in hex, where the hex bits are interpreted as below. This is followed by the IRIG status indicator, year of century, day of year and time of day. The status indicator and year are not produced by some IRIG devices. Following these fields are the carrier amplitude (0-8100), codec gain (0-255), field phase (0-79), time constant (2-20), modulation index (0-1), carrier phase error (0±0.5) and carrier frequency error (PPM). The last field is the on-time timestamp in NTP format. The fraction part is a good indicator of how well the driver is doing. With an UltrSPARC 30, this is normally within a few tens of microseconds relative to the IRIG-B signal and within a few hundred microseconds with IRIG-E.