From: Juergen Perlinger Date: Sun, 16 Feb 2014 14:07:57 +0000 (+0100) Subject: started documentation on driver 46 (GPSD_JSON) X-Git-Tag: NTP_4_2_7P427~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6eba2e7c222287a3742837c3ffb0ad78f9f27cf;p=thirdparty%2Fntp.git started documentation on driver 46 (GPSD_JSON) bk: 5300c63d9G1820UqcWrPdrEJIoD6tA --- diff --git a/html/drivers/driver46.html b/html/drivers/driver46.html new file mode 100644 index 000000000..ba2f9d2c3 --- /dev/null +++ b/html/drivers/driver46.html @@ -0,0 +1,115 @@ + + + GPSD-NG client driver + + + + + + + +

GPSD NG client driver

+
+

Synopsis

+ +

+ Address: 127.127.46.u
+ Reference ID: GPSD
+ Driver ID: GPSD_JSON
+ Serial Port: /dev/gpsu as symlink to the true + device (not used directly; see below)
+ Features: +

+ +

Description

+ +

+ This driver is a client driver to the GPSD daemon, which over + the time became increasingly popular for UN*Xish platforms. GPSD + can manage several devices in parallel, aggregate information, + and acts as a data hub for client applications. GPSD can also + auto-detect and handle PPS hardware signals on serial + ports. Have a look at the + GPSD project page. +

+

+ It is imortant to understand that this driver needs a GPS + device with PPS support to operate. +

+

+ The GPSD-NG protocol is text based, using JSON notation to + transfer records in form of JSON objects. The driver uses a + TCP/IP connection to localhost:gpsd to connect to the + daemon and then requests the GPS device /dev/gpsu + to be watched. (Different clock units use different devices, and + GPSD is able to give only the relevant information to a clock + instance.) +

+

+ This driver does not expect GPSD running or the clock device to + be present a priori; it will try to re-establish a lost + or hitherto unsuccessful connection. There is a 10 seconds delay + between a connection loss or failed attempt and the next + reconnect attempt; this makes sure that there is no thrashing on + the network layer. +

+

+ The overall accuracy depends on the receiver used. The driver + uses the error estimations (95% probability limits) provided by + GPSD to set the clock precision dynamically according to these + readings. +

+

+ The driver needs the VERSION, TPV and PPS objects of the GPSD + protocol. (Others are quietly ignored.) +

+ + +

Naming a Device

+

+ The GPSD driver uses the same name as the NMEA driver, + namely /dev/gpsu. There is a simple reason for + that: While the NMEA driver and the GPSD driver can be active at + the same time for different devices, they + cannot access the same device at a time. Having the same name + helps on that. It also eases migration from using NMEA directly + to using GPSD, as no new links etc need to be created. + + GPSD is normally started with the device name to access; it can + also be instructed by hotplug scripts to add or remove devices + from its device pool. Luckily, the symlinks used by the NMEA + driver are happily accepted and used by GPSD; this makes it + possible to use the symlink names as device identification. + +

The 'mode' byte

+

+ Until now, GPSD has no mode bits. +

+ +

Fudge Factors

+ +
+
time1 time
+
Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.
+
time2 time
+
(not used)
+
stratum number
+
Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+
refid string
+
Specifies the driver reference identifier, an ASCII string from one to four characters, with + default GPS.
+
flag1 0 | 1
(not used)
+
flag2 0 | 1
(not used)
+
flag3 0 | 1
(not used)
+
flag4 0 | 1
(not used)
+
+ +

Additional Information

+

Reference Clock Drivers

+
+ + diff --git a/html/refclock.html b/html/refclock.html index ad7048086..16c50be60 100644 --- a/html/refclock.html +++ b/html/refclock.html @@ -85,6 +85,7 @@
  • Type 43 RIPE NCC interface for Trimble Palisade
  • Type 44 NeoClock4X - DCF77 / TDF serial line
  • Type 45 Spectracom TSYNC PCI
  • +
  • Type 46 GPSD NG client protocol

  • diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index c73dd7247..dde46318b 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -731,6 +731,7 @@ static const u_char clocktypes[] = { CTL_SST_TS_UHF, /* REFCLK_RIPENCC (43) */ CTL_SST_TS_UHF, /* REFCLK_NEOCLOCK4X (44) */ CTL_SST_TS_UHF, /* REFCLK_TSYNCPCI (45) */ + CTL_SST_TS_UHF /* REFCLK_GPSDJSON (46) */ }; #endif /* REFCLOCK */