driver20.html revision 132451
1132451Sroberto<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2132451Sroberto
3132451Sroberto<html>
4132451Sroberto
5132451Sroberto    <head>
6132451Sroberto        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7132451Sroberto        <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i586) [Netscape]">
8132451Sroberto        <title>Generic NMEA GPS Receiver</title>
9132451Sroberto        <link href="../scripts/style.css" type="text/css" rel="stylesheet">
10132451Sroberto    </head>
11132451Sroberto
12132451Sroberto    <body>
13132451Sroberto        <h3>Generic NMEA GPS Receiver</h3>
14132451Sroberto        <hr>
15132451Sroberto        <h4>Synopsis</h4>
16132451Sroberto        <p>Address: 127.127.20.<i>u</i><br>
17132451Sroberto            Reference ID: <tt>GPS</tt><br>
18132451Sroberto            Driver ID: <tt>GPS_NMEA</tt><br>
19132451Sroberto            Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 baud, 8-bits, no parity<br>
20132451Sroberto            Features: <tt>tty_clk</tt></p>
21132451Sroberto        <h4>Description</h4>
22132451Sroberto        <p>This driver supports GPS receivers with the <tt>$GPRMC</tt> NMEA output string by default.&nbsp; Alternately the <tt>$GPGGA</tt> or <tt>$GPGLL </tt>may be selected.</p>
23132451Sroberto        <p>The driver expects the receiver to be set up to transmit a <tt>$GPRMC</tt> message every second.</p>
24132451Sroberto        <p>The accuracy depend on the receiver used. Inexpesive 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>
25132451Sroberto        <p>If the Operating System supports the PPSAPI, RFC-2783, it will be used.<br>
26132451Sroberto            &nbsp;</p>
27132451Sroberto        <p>The various GPS sentences that this driver recognises look like this:<br>
28132451Sroberto            (others quietly ignored)</p>
29132451Sroberto        <pre><tt>$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC&lt;cr&gt;&lt;lf&gt;
30132451Sroberto$GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC&lt;cr&gt;&lt;lf&gt;
31132451Sroberto$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&gt;&lt;lf&gt;
32132451Sroberto
33132451Sroberto&nbsp; POS_UTC&nbsp; - UTC of position. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
34132451Sroberto&nbsp; POS_STAT - Position status. (A = Data valid, V = Data invalid)
35132451Sroberto&nbsp; LAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Latitude (llll.ll)
36132451Sroberto&nbsp; LAT_REF&nbsp; - Latitude direction. (N = North, S = South)
37132451Sroberto&nbsp; LON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Longitude (yyyyy.yy)
38132451Sroberto&nbsp; LON_REF&nbsp; - Longitude direction (E = East, W = West)
39132451Sroberto&nbsp; SPD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Speed over ground. (knots) (x.x)
40132451Sroberto&nbsp; HDG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Heading/track made good (degrees True) (x.x)
41132451Sroberto&nbsp; DATE&nbsp;&nbsp;&nbsp;&nbsp; - Date (ddmmyy)
42132451Sroberto&nbsp; MAG_VAR&nbsp; - Magnetic variation (degrees) (x.x)
43132451Sroberto&nbsp; MAG_REF&nbsp; - Magnetic variation (E = East, W = West)
44132451Sroberto&nbsp; FIX_MODE - Position Fix Mode ( 0 = Invalid, &gt;0 = Valid)
45132451Sroberto&nbsp; SAT_USED - Number Satellites used in solution
46132451Sroberto&nbsp; HDOP&nbsp;&nbsp;&nbsp;&nbsp; - Horizontal Dilution of Precision
47132451Sroberto&nbsp; ALT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Antenna Altitude
48132451Sroberto&nbsp; ALT_UNIT - Altitude Units (Metres/Feet)
49132451Sroberto&nbsp; GEO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Geoid/Elipsoid separation
50132451Sroberto&nbsp; G_UNIT&nbsp;&nbsp; - Geoid units (M/F)
51132451Sroberto&nbsp; D_AGE&nbsp;&nbsp;&nbsp; - Age of last DGPS Fix
52132451Sroberto&nbsp; D_REF&nbsp;&nbsp;&nbsp; - Reference ID of DGPS station
53132451Sroberto&nbsp; CC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Checksum (optional)
54132451Sroberto&nbsp; &lt;cr&gt;&lt;lf&gt; - Sentence terminator.</tt></pre>
55132451Sroberto        Alternate GPS sentences (other than <tt>$GPRMC</tt> - the default) may be enabled by setting the relevent bits of 'mode' in the server configuration line<br>
56132451Sroberto        &nbsp;* server 127.127.20.x mode X<br>
57132451Sroberto        &nbsp;&nbsp;&nbsp; bit 0 - enables RMC&nbsp;&nbsp;&nbsp; ( value = 1)<br>
58132451Sroberto        &nbsp;&nbsp;&nbsp; bit 1 - enables GGA&nbsp;&nbsp;&nbsp; ( value = 2)<br>
59132451Sroberto        &nbsp;&nbsp;&nbsp; bit 2 - enables GLL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( value = 4)<br>
60132451Sroberto        multiple sentences may be selected<br>
61132451Sroberto        <p>The driver will send a <tt>$PMOTG,RMC,0000*1D&lt;cr&gt;&lt;lf&gt;</tt> message each time a <tt>$GPRMC</tt> string is needed. This is not needed on most GPS receivers because they automatically send the <tt>$GPRMC</tt> string every second and will only work on GPS receivers that understand the <tt>$PMOTG</tt> string. Others will just ignore it.</p>
62132451Sroberto        <h4>Setting up the Garmin GPS-25XL</h4>
63132451Sroberto        Switch off all output with by sending it the following string.
64132451Sroberto        <pre>&quot;$PGRMO,,2&lt;cr&gt;&lt;lf&gt;&quot;</pre>
65132451Sroberto        <p>Now switch only $GPRMC on by sending it the following string.</p>
66132451Sroberto        <pre>&quot;$PGRMO,GPRMC,1&lt;cr&gt;&lt;lf&gt;&quot;</pre>
67132451Sroberto        <p>On some systems the PPS signal isn't switched on by default. It can be switched on by sending the following string.</p>
68132451Sroberto        <pre>&quot;$PGRMC,,,,,,,,,,,,2&lt;cr&gt;&lt;lf&gt;&quot;</pre>
69132451Sroberto        <h4>Monitor Data</h4>
70132451Sroberto        <p>The GPS sentence(s) that is used is written to the clockstats file.</p>
71132451Sroberto        <h4>Fudge Factors</h4>
72132451Sroberto        <dl>
73132451Sroberto            <dt><tt>time1 <i>time</i></tt>
74132451Sroberto            <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
75132451Sroberto            <dt><tt>time2 <i>time</i></tt>
76132451Sroberto            <dd>Not used by this driver.
77132451Sroberto            <dt><tt>stratum <i>number</i></tt>
78132451Sroberto            <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
79132451Sroberto            <dt><tt>refid <i>string</i></tt>
80132451Sroberto            <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
81132451Sroberto            <dt><tt>flag1 0 | 1</tt>
82132451Sroberto            <dd>Not used by this driver.
83132451Sroberto            <dt><tt>flag2 0 | 1</tt>
84132451Sroberto            <dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
85132451Sroberto            <dt><tt>flag3 0 | 1</tt>
86132451Sroberto            <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
87132451Sroberto            <dt><tt>flag4 0 | 1</tt>
88132451Sroberto            <dd>Not used by this driver.
89132451Sroberto        </dl>
90132451Sroberto        <p>Additional Information</p>
91132451Sroberto        <p><a href="../refclock.html">Reference Clock Drivers</a></p>
92132451Sroberto        <hr>
93132451Sroberto        <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
94132451Sroberto    </body>
95132451Sroberto
96132451Sroberto</html>