driver20.html revision 1.1 1 1.1 kardel <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 1.1 kardel
3 1.1 kardel <html>
4 1.1 kardel
5 1.1 kardel <head>
6 1.1 kardel <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
7 1.1 kardel <title>Generic NMEA GPS Receiver</title>
8 1.1 kardel <link href="scripts/style.css" type="text/css" rel="stylesheet">
9 1.1 kardel </head>
10 1.1 kardel
11 1.1 kardel <body>
12 1.1 kardel <h3>Generic NMEA GPS Receiver</h3>
13 1.1 kardel <hr>
14 1.1 kardel <h4>Synopsis</h4>
15 1.1 kardel <p>Address: 127.127.20.<i>u</i><br>
16 1.1 kardel Reference ID: <tt>GPS</tt><br>
17 1.1 kardel Driver ID: <tt>GPS_NMEA</tt><br>
18 1.1 kardel Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 - 115200 bps, 8-bits, no parity<br>
19 1.1 kardel Serial Port: <tt>/dev/gpspps<i>u</i></tt>; for just the PPS signal (this is tried first for PPS, before <tt>/dev/gps<i>u</i></tt>)<br>
20 1.1 kardel Serial Port: <tt>/dev/gps<i>u</i></tt>; symlink to server:port (for nmead) Features: <tt>tty_clk</tt></p>
21 1.1 kardel <h4>Description</h4>
22 1.1 kardel <p>This driver supports GPS receivers with the <tt>$GPRMC, $GPGLL, $GPGGA, $GPZDA, and $GPZDG</tt> NMEA sentences by default. Note that Accord's custom NMEA sentence <tt>$GPZDG</tt> reports using the GPS timescale, while the rest of the sentences report UTC. The difference between the two is a whole number of seconds which increases with each leap second insertion in UTC. To avoid problems mixing UTC and GPS timescales, the driver disables processing of UTC sentences once <tt>$GPZDG</tt> is received.</p>
23 1.1 kardel <p>The driver expects the receiver to be set up to transmit at least one supported sentence every second.</p>
24 1.1 kardel <p>The accuracy depends on the receiver used. Inexpensive GPS models are available with a claimed PPS signal accuracy of 1 <font face="Symbol">m</font>s 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.</p>
25 1.1 kardel <p>If the Operating System supports PPSAPI (<a href="http://www.ietf.org/rfc/rfc2783.txt">RFC 2783</a>), fudge flag1 1 enables its use.<br> </p>
26 1.1 kardel <p>The various GPS sentences that this driver recognises look like this:<br>
27 1.1 kardel (others quietly ignored)</p>
28 1.1 kardel <pre><tt>$GPRMC,UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CS<cr><lf>
29 1.1 kardel $GPGLL,LAT,LAT_REF,LONG,LONG_REF,UTC,POS_STAT*CS<cr><lf>
30 1.1 kardel $GPGGA,UTC,LAT,LAT_REF,LONG,LONG_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CS<cr><lf>
31 1.1 kardel $GPZDA,UTC,DD,MM,YYYY,TH,TM,*CS<cr><lf>
32 1.1 kardel $GPZDG,GPSTIME,DD,MM,YYYY,AA.BB,V*CS<cr><lf>
33 1.1 kardel
34 1.1 kardel UTC - Time of day on UTC timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
35 1.1 kardel POS_STAT - Position status. (A = Data valid, V = Data invalid)
36 1.1 kardel LAT - Latitude (llll.ll)
37 1.1 kardel LAT_REF - Latitude direction. (N = North, S = South)
38 1.1 kardel LON - Longitude (yyyyy.yy)
39 1.1 kardel LON_REF - Longitude direction (E = East, W = West)
40 1.1 kardel SPD - Speed over ground. (knots) (x.x)
41 1.1 kardel HDG - Heading/track made good (degrees True) (x.x)
42 1.1 kardel DATE - Date (ddmmyy)
43 1.1 kardel MAG_VAR - Magnetic variation (degrees) (x.x)
44 1.1 kardel MAG_REF - Magnetic variation (E = East, W = West)
45 1.1 kardel FIX_MODE - Position Fix Mode (0 = Invalid, >0 = Valid)
46 1.1 kardel SAT_USED - Number Satellites used in solution
47 1.1 kardel HDOP - Horizontal Dilution of Precision
48 1.1 kardel ALT - Antenna Altitude
49 1.1 kardel ALT_UNIT - Altitude Units (Metres/Feet)
50 1.1 kardel GEO - Geoid/Elipsoid separation
51 1.1 kardel G_UNIT - Geoid units (M/F)
52 1.1 kardel D_AGE - Age of last DGPS Fix
53 1.1 kardel D_REF - Reference ID of DGPS station
54 1.1 kardel GPSTIME - Time of day on GPS timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.f])
55 1.1 kardel DD - Day of the month (1-31)
56 1.1 kardel MM - Month of the year (1-12)
57 1.1 kardel YYYY - Year
58 1.1 kardel AA.BB - Denotes the signal strength (should be < 05.00)
59 1.1 kardel V - GPS sync status
60 1.1 kardel '0' => INVALID time,
61 1.1 kardel '1' => accuracy of +/- 20ms,
62 1.1 kardel '2' => accuracy of +/- 100ns
63 1.1 kardel CS - Checksum
64 1.1 kardel <cr><lf> - Sentence terminator.</tt></pre>
65 1.1 kardel
66 1.1 kardel <p>Specific GPS sentences and bitrates may be selected by setting bits of the 'mode' in the server configuration line:<br>
67 1.1 kardel <tt>server 127.127.20.x mode X</tt><br> bit 0 - process <tt>$GPMRC</tt> (value = 1)<br> bit 1 - process <tt>$GPGGA</tt> (value = 2)<br> bit 2 - process <tt>$GPGLL</tt> (value = 4)<br> bit 4 - process <tt>$GPZDA</tt> or <tt>$GPZDG</tt> (value = 8)<br>
68 1.1 kardel <p>The default (mode 0) is to process all supported sentences, which results in the last received each cycle being used. Multiple sentences may be selected by adding their mode bit values. The driver uses 4800 bits per second by default. Faster bitrates can be selected using bits 4, 5, and 6 of the mode field:<br><br>
69 1.1 kardel bits 4/5/6 - select serial bitrate (0 for 4800 - the default, 16 for 9600, 32 for 19200, 48 for 38400, 64 for 57600, 80 for 115200)<br></p>
70 1.1 kardel <p>The driver will send a <tt>$PMOTG,RMC,0000*1D<cr><lf></tt> command each poll interval. This is not needed on most GPS receivers because they automatically send <tt>$GPRMC</tt> every second, but helps a Motorola GPS receiver that is otherwise silent. NMEA devices ignore commands they do not understand.</p>
71 1.1 kardel <h4>Setting up the Garmin GPS-25XL</h4>
72 1.1 kardel Switch off all output with by sending it the following string.
73 1.1 kardel <pre>"$PGRMO,,2<cr><lf>"</pre>
74 1.1 kardel <p>Now switch only $GPRMC on by sending it the following string.</p>
75 1.1 kardel <pre>"$PGRMO,GPRMC,1<cr><lf>"</pre>
76 1.1 kardel <p>On some systems the PPS signal isn't switched on by default. It can be switched on by sending the following string.</p>
77 1.1 kardel <pre>"$PGRMC,,,,,,,,,,,,2<cr><lf>"</pre>
78 1.1 kardel <h4>Monitor Data</h4>
79 1.1 kardel <p>The GPS sentence that is used is written to the clockstats file and available with ntpq -c clockvar.</p>
80 1.1 kardel <h4>Fudge Factors</h4>
81 1.1 kardel <dl>
82 1.1 kardel <dt><tt>time1 <i>time</i></tt>
83 1.1 kardel <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.
84 1.1 kardel <dt><tt>time2 <i>time</i></tt>
85 1.1 kardel <dd>Specifies the serial end of line time offset calibration factor, in seconds and fraction, with default 0.0.
86 1.1 kardel <dt><tt>stratum <i>number</i></tt>
87 1.1 kardel <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
88 1.1 kardel <dt><tt>refid <i>string</i></tt>
89 1.1 kardel <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
90 1.1 kardel <dt><tt>flag1 0 | 1</tt>
91 1.1 kardel <dd>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.
92 1.1 kardel <dt><tt>flag2 0 | 1</tt>
93 1.1 kardel <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the falling edge if 1.
94 1.1 kardel <dt><tt>flag3 0 | 1</tt>
95 1.1 kardel <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel discipline if 1.
96 1.1 kardel <dt><tt>flag4 0 | 1</tt>
97 1.1 kardel <dd>Obscures location in timecode: 0 for disable (default), 1 for enable.
98 1.1 kardel </dl>
99 1.1 kardel <p>Additional Information</p>
100 1.1 kardel <p><a href="../refclock.html">Reference Clock Drivers</a></p>
101 1.1 kardel <hr>
102 1.1 kardel <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
103 1.1 kardel </body>
104 1.1 kardel
105 1.1 kardel </html>
106