Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / ntp / html / driver20.htm
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5    <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i586) [Netscape]">
6    <title>Generic NMEA GPS Receiver
7 </title>
8 </head>
9 <body>
10
11 <h3>
12 Generic NMEA GPS Receiver</h3>
13
14 <hr>
15 <h4>
16 Synopsis</h4>
17 Address: 127.127.20.<i>u</i>
18 <br>Reference ID: <tt>GPS</tt>
19 <br>Driver ID: <tt>GPS_NMEA</tt>
20 <br>Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 baud, 8-bits, no parity
21 <br>Features: <tt>tty_clk</tt>
22 <h4>
23 Description</h4>
24 This driver supports GPS receivers with the <tt>$GPRMC</tt> NMEA output
25 string by default.&nbsp; Alternately the <tt>$GPGGA</tt> or <tt>$GPGLL
26 </tt>may
27 be selected.
28 <br>The driver expects the receiver to be set up to transmit a <tt>$GPRMC</tt>
29 message every second.
30 <p>The accuracy depend on the receiver used. Inexpesive GPS models are
31 available with a claimed PPS signal accuracy of 1 <font face="Symbol">m</font>s
32 or better relative to the broadcast signal. However, in most cases the
33 actual accuracy is limited by the precision of the timecode and the latencies
34 of the serial interface and operating system.
35 <p>If the Operating System supports the PPSAPI, RFC-2783, it will be used.
36 <br>&nbsp;
37 <p>The various GPS sentences that this driver recognises look like this:
38 <br>(others quietly ignored)
39 <pre><tt>$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC&lt;cr>&lt;lf>
40 $GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC&lt;cr>&lt;lf>
41 $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&lt;cr>&lt;lf>
42
43 &nbsp; POS_UTC&nbsp; - UTC of position. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
44 &nbsp; POS_STAT - Position status. (A = Data valid, V = Data invalid)
45 &nbsp; LAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Latitude (llll.ll)
46 &nbsp; LAT_REF&nbsp; - Latitude direction. (N = North, S = South)
47 &nbsp; LON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Longitude (yyyyy.yy)
48 &nbsp; LON_REF&nbsp; - Longitude direction (E = East, W = West)
49 &nbsp; SPD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Speed over ground. (knots) (x.x)
50 &nbsp; HDG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Heading/track made good (degrees True) (x.x)
51 &nbsp; DATE&nbsp;&nbsp;&nbsp;&nbsp; - Date (ddmmyy)
52 &nbsp; MAG_VAR&nbsp; - Magnetic variation (degrees) (x.x)
53 &nbsp; MAG_REF&nbsp; - Magnetic variation (E = East, W = West)
54 &nbsp; FIX_MODE - Position Fix Mode ( 0 = Invalid, >0 = Valid)
55 &nbsp; SAT_USED - Number Satellites used in solution
56 &nbsp; HDOP&nbsp;&nbsp;&nbsp;&nbsp; - Horizontal Dilution of Precision
57 &nbsp; ALT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Antenna Altitude
58 &nbsp; ALT_UNIT - Altitude Units (Metres/Feet)
59 &nbsp; GEO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Geoid/Elipsoid separation
60 &nbsp; G_UNIT&nbsp;&nbsp; - Geoid units (M/F)
61 &nbsp; D_AGE&nbsp;&nbsp;&nbsp; - Age of last DGPS Fix
62 &nbsp; D_REF&nbsp;&nbsp;&nbsp; - Reference ID of DGPS station
63 &nbsp; CC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Checksum (optional)
64 &nbsp; &lt;cr>&lt;lf> - Sentence terminator.</tt></pre>
65 Alternate GPS sentences (other than <tt>$GPRMC</tt> - the default) may
66 be enabled by setting the relevent bits of 'mode' in the server configuration
67 line
68 <br>&nbsp;* server 127.127.20.x mode X
69 <br>&nbsp;&nbsp;&nbsp; bit 0 - enables RMC&nbsp;&nbsp;&nbsp; ( value =
70 1)
71 <br>&nbsp;&nbsp;&nbsp; bit 1 - enables GGA&nbsp;&nbsp;&nbsp; ( value =
72 2)
73 <br>&nbsp;&nbsp;&nbsp; bit 2 - enables GLL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
74 ( value = 4)
75 <br>multiple sentences may be selected
76 <br>&nbsp;
77 <p>The driver will send a <tt>$PMOTG,RMC,0000*1D&lt;cr>&lt;lf></tt> message
78 each time a <tt>$GPRMC</tt> string is needed. This is not needed on most
79 GPS receivers because they automatically send the <tt>$GPRMC</tt> string
80 every second and will only work on GPS receivers that understand the <tt>$PMOTG</tt>
81 string. Others will just ignore it.
82 <h4>
83 Setting up the Garmin GPS-25XL</h4>
84 Switch off all output with by sending it the following string.
85 <pre>"$PGRMO,,2&lt;cr>&lt;lf>"</pre>
86 Now switch only $GPRMC on by sending it the following string.
87 <pre>"$PGRMO,GPRMC,1&lt;cr>&lt;lf>"</pre>
88 On some systems the PPS signal isn't switched on by default. It can be
89 switched on by sending the following string.
90 <pre>"$PGRMC,,,,,,,,,,,,2&lt;cr>&lt;lf>"</pre>
91
92 <h4>
93 Monitor Data</h4>
94 The GPS sentence(s) that is used is written to the clockstats file.
95 <h4>
96 Fudge Factors</h4>
97
98 <dl>
99 <dt>
100 <tt>time1 <i>time</i></tt></dt>
101
102 <dd>
103 Specifies the time offset calibration factor, in seconds and fraction,
104 with default 0.0.</dd>
105
106 <dt>
107 <tt>time2 <i>time</i></tt></dt>
108
109 <dd>
110 Not used by this driver.</dd>
111
112 <dt>
113 <tt>stratum <i>number</i></tt></dt>
114
115 <dd>
116 Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
117
118 <dt>
119 <tt>refid <i>string</i></tt></dt>
120
121 <dd>
122 Specifies the driver reference identifier, an ASCII string from one to
123 four characters, with default <tt>GPS</tt>.</dd>
124
125 <dt>
126 <tt>flag1 0 | 1</tt></dt>
127
128 <dd>
129 Not used by this driver.</dd>
130
131 <dt>
132 <tt>flag2 0 | 1</tt></dt>
133
134 <dd>
135 Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.</dd>
136
137 <dt>
138 <tt>flag3 0 | 1</tt></dt>
139
140 <dd>
141 Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.</dd>
142
143 <dt>
144 <tt>flag4 0 | 1</tt></dt>
145
146 <dd>
147 Not used by this driver.</dd>
148
149 <br>&nbsp;
150 <p>&nbsp;
151 <br>&nbsp;
152 <br>&nbsp;
153 <p>Additional Information
154 <p><a href="refclock.htm">Reference Clock Drivers</a></dl>
155
156 <hr>
157 <address>
158 David L. Mills (mills@udel.edu)</address>
159
160 </body>
161 </html>