From: Dave Hart This driver supports GPS receivers with the $GPRMC, $GPGLL, $GPGGA, $GPZDA, and $GPZDG NMEA sentences by default. Note that Accord's custom NMEA sentence $GPZDG 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 $GPZDG is received. The driver expects the receiver to be set up to transmit at least one supported sentence every second. The accuracy depends on the receiver used. Inexpensive 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. If the Operating System supports PPSAPI (RFC 2783), fudge flag1 1 enables its use. The various GPS sentences that this driver recognises look like this: Specific GPS sentences and bitrates may be selected by setting bits of the 'mode' in the server configuration line: 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:
(others quietly ignored)$GPRMC,UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CS<cr><lf>
@@ -64,9 +64,9 @@ $GPZDG,GPSTIME,DD,MM,YYYY,AA.BB,V*CS<cr><lf>
<cr><lf> - Sentence terminator.
- server 127.127.20.x mode X
bit 0 - process $GPMRC (value = 1)
bit 1 - process $GPGGA (value = 2)
bit 2 - process $GPGLL (value = 4)
bit 4 - process $GPZDA or $GPZDG (value = 8)
+ server 127.127.20.x mode X
bit 0 - process $GPMRC (value = 1)
bit 1 - process $GPGGA (value = 2)
bit 2 - process $GPGLL (value = 4)
bit 4 - process $GPZDA or $GPZDG (value = 8)
- bits 4/5/6 - select serial bitrate ( 0 for 4800 - the default, 1 for 9600, 2 for 19200, 3 for 38400, 4 for 57600, 5 for 115200 )
The driver will send a $PMOTG,RMC,0000*1D<cr><lf> command each poll interval. This is not needed on most GPS receivers because they automatically send $GPRMC every second, but helps a Motorola GPS receiver that is otherwise silent. NMEA devices ignore commands they do not understand.