From: Harlan Stenn Date: Fri, 11 May 2001 20:42:07 +0000 (-0000) Subject: ChangeLog, driver20.htm, refclock_nmea.c: X-Git-Tag: NTP_4_0_99_M~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f65809807dde08289b613d6e4c33b8a8d3e33018;p=thirdparty%2Fntp.git ChangeLog, driver20.htm, refclock_nmea.c: * html/driver20.htm: Reality check. * ntpd/refclock_nmea.c: Comment cleanup From: John Woolner bk: 3afc4e9fTA237xggz1k2EsJYnTKBbA --- diff --git a/ChangeLog b/ChangeLog index 74a1599510..8d63849c49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-05-11 Harlan Stenn + * html/driver20.htm: Reality check. + * ntpd/refclock_nmea.c: Comment cleanup + From: John Woolner + * html/release.htm: Cleanup (at least). * html/refclock.htm: Cleanup (at least). * html/kern.htm: Cleanup (at least). diff --git a/html/driver20.htm b/html/driver20.htm index 68ab141cec..6d1126b483 100644 --- a/html/driver20.htm +++ b/html/driver20.htm @@ -1,41 +1,46 @@ - - - - - Generic NMEA GPS Receiver - - - - -

-Generic NMEA GPS Receiver

- -
-

-Synopsis

-Address: 127.127.20.u -
Reference ID: GPS -
Driver ID: GPS_NMEA -
Serial Port: /dev/gpsu; 4800 baud, 8-bits, no parity -
Features: tty_clk -

-Description

-This driver supports GPS receivers with the $GPRMC NMEA output string. -The driver expect the receiver to be set up to transmit a $GPRMC + + + + + + Generic NMEA GPS Receiver + + + + +

+Generic NMEA GPS Receiver

+ +
+

+Synopsis

+Address: 127.127.20.u +
Reference ID: GPS +
Driver ID: GPS_NMEA +
Serial Port: /dev/gpsu; 4800 baud, 8-bits, no parity +
Features: tty_clk +

+Description

+This driver supports GPS receivers with the $GPRMC NMEA output +string by default.  Alternately the $GPGGA or $GPGLL +may +be selected. +
The driver expects the receiver to be set up to transmit a $GPRMC message every second. - -

The accuracy depend on the receiver used. Inexpesive GPS models are -available with a claimed PPS signal accuracy of 1 ms +

The accuracy depend on the receiver used. Inexpesive GPS models are +available with a claimed PPS signal accuracy of 1 ms or better relative to the broadcast signal. However, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system. - -

If the Operating System supports the PPSAPI, RFC-2783, it will be used. - -

The $GPRMC message that the GPS transmits look like this: -

$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC<cr><lf>
-
-  POS_UTC  - UTC of position. Hours, minutes and seconds. (hhmmss)
+

If the Operating System supports the PPSAPI, RFC-2783, it will be used. +
  +

The various GPS sentences that this driver recognises look like this: +
(others quietly ignored) +

$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC<cr><lf>
+$GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC<cr><lf>
+$GPGGA,POS_UTC,LAT,LAT_REF,LONG,LONG_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CC<cr><lf>
+
+  POS_UTC  - UTC of position. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
   POS_STAT - Position status. (A = Data valid, V = Data invalid)
   LAT      - Latitude (llll.ll)
   LAT_REF  - Latitude direction. (N = North, S = South)
@@ -46,90 +51,111 @@ of the serial interface and operating system.
   DATE     - Date (ddmmyy)
   MAG_VAR  - Magnetic variation (degrees) (x.x)
   MAG_REF  - Magnetic variation (E = East, W = West)
+  FIX_MODE - Position Fix Mode ( 0 = Invalid, >0 = Valid)
+  SAT_USED - Number Satellites used in solution
+  HDOP     - Horizontal Dilution of Precision
+  ALT      - Antenna Altitude
+  ALT_UNIT - Altitude Units (Metres/Feet)
+  GEO      - Geoid/Elipsoid separation
+  G_UNIT   - Geoid units (M/F)
+  D_AGE    - Age of last DGPS Fix
+  D_REF    - Reference ID of DGPS station
   CC       - Checksum (optional)
-  <cr><lf> - Sentence terminator.
-The driver will send a $PMOTG,RMC,0000*1D<cr><lf> message -each time a $GPRMC string is needed. This is not needed on most -GPS receivers because they automatically send the $GPRMC string -every second and will only work on GPS receivers that understand the $PMOTG +  <cr><lf> - Sentence terminator.
+Alternate GPS sentences (other than $GPRMC - the default) may +be enabled by setting the relevent bits of 'mode' in the server configuration +line +
 * server 127.127.20.x mode X +
    bit 0 - enables RMC    ( value = +1) +
    bit 1 - enables GGA    ( value = +2) +
    bit 2 - enables GLL      +( value = 4) +
multiple sentences may be selected +
  +

The driver will send a $PMOTG,RMC,0000*1D<cr><lf> message +each time a $GPRMC string is needed. This is not needed on most +GPS receivers because they automatically send the $GPRMC string +every second and will only work on GPS receivers that understand the $PMOTG string. Others will just ignore it. -

-Setting up the Garmin GPS-25XL

+

+Setting up the Garmin GPS-25XL

Switch off all output with by sending it the following string. -
"$PGRMO,,2<cr><lf>"
+
"$PGRMO,,2<cr><lf>"
Now switch only $GPRMC on by sending it the following string. -
"$PGRMO,GPRMC,1<cr><lf>"
+
"$PGRMO,GPRMC,1<cr><lf>"
On some systems the PPS signal isn't switched on by default. It can be switched on by sending the following string. -
"$PGRMC,,,,,,,,,,,,2<cr><lf>"
+
"$PGRMC,,,,,,,,,,,,2<cr><lf>"
-

-Monitor Data

-The $GPRMC string that is used is written to the clockstats file. -

-Fudge Factors

+

+Monitor Data

+The GPS sentence(s) that is used is written to the clockstats file. +

+Fudge Factors

-
-
-time1 time
+
+
+time1 time
-
+
Specifies the time offset calibration factor, in seconds and fraction, -with default 0.0.
+with default 0.0. -
-time2 time
+
+time2 time
-
-Not used by this driver.
+
+Not used by this driver.
-
-stratum number
+
+stratum number
-
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+
+Specifies the driver stratum, in decimal from 0 to 15, with default 0.
-
-refid string
+
+refid string
-
+
Specifies the driver reference identifier, an ASCII string from one to -four characters, with default GPS.
- -
-flag1 0 | 1
- -
-Not used by this driver.
+four characters, with default GPS. -
-flag2 0 | 1
+
+flag1 0 | 1
-
-Specifies the PPS signal on-time edge: 0 for assert (default), -1 for clear.
+
+Not used by this driver.
-
-flag3 0 | 1
+
+flag2 0 | 1
-
-Controls the kernel PPS discipline: 0 for disable (default), 1 -for enable.
+
+Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
-
-flag4 0 | 1
+
+flag3 0 | 1
-
-Not used by this driver.
+
+Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
+
+flag4 0 | 1
-

Additional Information +

+Not used by this driver.
-

Reference Clock Drivers

+
  +

  +
  +
  +

Additional Information +

Reference Clock Drivers

-
-
-David L. Mills (mills@udel.edu)
+
+
+David L. Mills (mills@udel.edu)
- - + + diff --git a/ntpd/refclock_nmea.c b/ntpd/refclock_nmea.c index 19e6147cb2..88bd248f8c 100644 --- a/ntpd/refclock_nmea.c +++ b/ntpd/refclock_nmea.c @@ -44,6 +44,15 @@ * The PPSAPI part of the driver understands fudge flag2 and flag3. If * flag2 is set, it will use the clear edge of the pulse. If flag3 is * set, kernel hardpps is enabled. + * + * GPS sentences other than RMC (the default) may be enabled by setting + * the relevent bits of 'mode' in the server configuration line + * server 127.127.20.x mode X + * + * bit 0 - enables RMC (1) + * bit 1 - enables GGA (2) + * bit 2 - enables GLL (4) + * multiple sentences may be selected */ /*