NetBSD/usr.sbin/xntp/html/driver20.html

108 lines
3.4 KiB
HTML

<!-- $NetBSD: driver20.html,v 1.1 1998/12/30 20:20:34 mcr Exp $ -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
<html><head><title>
Generic NMEA GPS Receiver
</title></head><body><h3>
Generic NMEA GPS Receiver
</h3><hr>
<p><h4>Synopsis</h4>
<p>Address: 127.127.20.<var>u</var>
<br>Reference ID: GPS
<br>Driver ID: GPS_NMEA
<br>Serial Port: <code>/dev/gps<var>u</var></code>; 4800 baud, 8-bits,
no parity
<br>Features: <code>tty_clk</code>
<p><h4>Description</h4>
<p>This driver supports GPS's with the $GPRMC NMEA output string. The
driver expect the GPS to be set up to transmit a $GPRMC message every
second.
<p>The accuracy depend on the GPS used. Inexpesive GPS models are
available with a claimed PPS signal accuracy of 1us 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>The $GPRMC message that the GPS transmits look like this:
<pre>
$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;
POS_UTC - UTC of position. Hours, minutes and seconds. (hhmmss)
POS_STAT - Position status. (A = Data valid, V = Data invalid)
LAT - Latitude (llll.ll)
LAT_REF - Latitude direction. (N = North, S = South)
LON - Longitude (yyyyy.yy)
LON_REF - Longitude direction (E = East, W = West)
SPD - Speed over ground. (knots) (x.x)
HDG - Heading/track made good (degrees True) (x.x)
DATE - Date (ddmmyy)
MAG_VAR - Magnetic variation (degrees) (x.x)
MAG_REF - Magnetic variation (E = East, W = West)
CC - Checksum (optional)
&lt;cr&gt;&lt;lf&gt; - Sentence terminator.
</pre>
<p>The driver will send a "$PMOTG,RMC,0000*1D&lt;cr&gt;&lt;lf&gt;"
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.
<p><h4>Setting up the Garmin GPS-25XL</h4>
<p>Switch off all output with by sending it the following string.
<pre>"$PGRMO,,2&lt;cr&gt;&lt;lf&gt;"</pre>
Now switch only $GPRMC on by sending it the following string.
<pre>"$PGRMO,GPRMC,1&lt;cr&gt;&lt;lf&gt;"</pre>
<p>On some systems the PPS signal isn't switched on by default. It can
be switched on by sending the following string.
<pre>"$PGRMC,,,,,,,,,,,,2&lt;cr&gt;&lt;lf&gt;"</pre>
<p><h4>Monitor Data</h4>
<p>The $GPRMC string that is used is written to the clockstats file.
<p><h4>Fudge Factors</h4>
<dl>
<dt><code>time1 <var>time</var></code>
<dd>Specifies the time offset calibration factor, in seconds and
fraction, with default 0.0.
<p><dt><code>time2 <var>time</var></code>
<dd>Not used by this driver.
<p><dt><code>stratum <var>number</var></code>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default
0.
<p><dt><code>refid <var>string</var></code>
<dd>Specifies the driver reference identifier, an ASCII string from one
to four characters, with default <code>GPS</code>.
<p><dt><code>flag1 0 | 1</code>
<dd>Not used by this driver.
<p><dt><code>flag2 0 | 1</code>
<dd>Not used by this driver.
<p><dt><code>flag3 0 | 1</code>
<dd>Not used by this driver.
<p><dt><code>flag4 0 | 1</code>
<dd>Not used by this driver.
<p>Additional Information
<p><a href="refclock.html"> Reference Clock Drivers</a>
</dl>
<hr><address>David L. Mills (mills@udel.edu)</address></body></html>