Reference ID: GPS
Driver ID: GPS_NMEA
/dev/gpsu; 4800 baud, 8-bits,
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.
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.
The $GPRMC message that the GPS transmits look like this:
$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC<cr><lf> 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) <cr><lf> - Sentence terminator.
The driver will send a "$PMOTG,RMC,0000*1D<cr><lf>" 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.
Switch off all output with by sending it the following string.
"$PGRMO,,2<cr><lf>"Now switch only $GPRMC on by sending it the following string.
On some systems the PPS signal isn't switched on by default. It can be switched on by sending the following string.
The $GPRMC string that is used is written to the clockstats file.
flag1 0 | 1
flag2 0 | 1
flag3 0 | 1
flag4 0 | 1
Reference Clock Drivers