WORKING WITH GPS - NMEA
The following examples are for working with the NMEA sentences that you would receive from a GPS receiver.
These data comes from the serial port on the GPS receiver. These tables really helped me get through my first experiences with GPS.
COMMON SENTENCES
| Sentence | Description |
| $GPGGA | Global positioning system fixed data |
| $GPGLL | Geographic position - latitude / longitude |
| $GPGSA | GNSS DOP and active satellites |
| $GPGSV | GNSS satellites in view |
| $GPRMC | Recommended minimum specific GNSS data |
| $GPVTG | Course over ground and ground speed |
$GPGGA Sentence (Fix data)
Example (signal not acquired): $GPGGA,235947.000,0000.0000,N,00000.0000,E,0,00,0.0,0.0,M,,,,0000*00Example (signal acquired): $GPGGA,092204.999,4250.5589,S,14718.5084,E,1,04,24.4,19.7,M,,,,0000*1F
| Field | Example | Comments |
| Sentence ID | $GPGGA | |
| UTC Time | 092204.999 | hhmmss.sss |
| Latitude | 4250.5589 | ddmm.mmmm |
| N/S Indicator | S | N = North, S = South |
| Longitude | 14718.5084 | dddmm.mmmm |
| E/W Indicator | E | E = East, W = West |
| Position Fix | 1 | 0 = Invalid, 1 = Valid SPS, 2 = Valid DGPS, 3 = Valid PPS |
| Satellites Used | 04 | Satellites being used (0-12) |
| HDOP | 24.4 | Horizontal dilution of precision |
| Altitude | 19.7 | Altitude in meters according to WGS-84 ellipsoid |
| Altitude Units | M | M = Meters |
| Geoid Seperation | Geoid seperation in meters according to WGS-84 ellipsoid | |
| Seperation Units | M = Meters | |
| DGPS Age | Age of DGPS data in seconds | |
| DGPS Station ID | 0000 | |
| Checksum | *1F | |
| Terminator | CR/LF |
$GPGLL Sentence (Position)
Example (signal not acquired): $GPGLL,0000.0000,N,00000.0000,E,235947.000,V*2DExample (signal acquired): $GPGLL,4250.5589,S,14718.5084,E,092204.999,A*2D
| Field | Example | Comments |
| Sentence ID | $GPGLL | |
| Latitude | 4250.5589 | ddmm.mmmm |
| N/S Indicator | S | N = North, S = South |
| Longitude | 14718.5084 | dddmm.mmmm |
| E/W Indicator | E | E = East, W = West |
| UTC Time | 092204.999 | hhmmss.sss |
| Status | A | A = Valid, V = Invalid |
| Checksum | *2D | |
| Terminator | CR/LF |
$GPGSA Sentence (Active satellites)
Example (signal not acquired): $GPGSA,A,1,,,,,,,,,,,,,0.0,0.0,0.0*30Example (signal acquired): $GPGSA,A,3,01,20,19,13,,,,,,,,,40.4,24.4,32.2*0A
| Field | Example | Comments |
| Sentence ID | $GPGSA | |
| Mode 1 | A | A = Auto 2D/3D, M = Forced 2D/3D |
| Mode 1 | 3 | 1 = No fix, 2 = 2D, 3 = 3D |
| Satellite used 1 | 01 | Satellite used on channel 1 |
| Satellite used 2 | 20 | Satellite used on channel 2 |
| Satellite used 3 | 19 | Satellite used on channel 3 |
| Satellite used 4 | 13 | Satellite used on channel 4 |
| Satellite used 5 | Satellite used on channel 5 | |
| Satellite used 6 | Satellite used on channel 6 | |
| Satellite used 7 | Satellite used on channel 7 | |
| Satellite used 8 | Satellite used on channel 8 | |
| Satellite used 9 | Satellite used on channel 9 | |
| Satellite used 10 | Satellite used on channel 10 | |
| Satellite used 11 | Satellite used on channel 11 | |
| Satellite used 12 | Satellite used on channel 12 | |
| PDOP | 40.4 | Position dilution of precision |
| HDOP | 24.4 | Horizontal dilution of precision |
| VDOP | 32.2 | Vertical dilution of precision |
| Checksum | *0A | |
| Terminator | CR/LF |
$GPGSV Sentence (Satellites in view)
Example (signal not acquired): $GPGSV,1,1,01,21,00,000,*4BExample (signal acquired): $GPGSV,3,1,10,20,78,331,45,01,59,235,47,22,41,069,,13,32,252,45*70
| Field | Example | Comments |
| Sentence ID | $GPGSV | |
| Number of messages | 3 | Number of messages in complete message (1-3) |
| Sequence number | 1 | Sequence number of this entry (1-3) |
| Satellites in view | 10 | |
| Satellite ID 1 | 20 | Range is 1-32 |
| Elevation 1 | 78 | Elevation in degrees (0-90) |
| Azimuth 1 | 331 | Azimuth in degrees (0-359) |
| SNR 1 | 45 | Signal to noise ration in dBHZ (0-99) |
| Satellite ID 2 | 01 | Range is 1-32 |
| Elevation 2 | 59 | Elevation in degrees (0-90) |
| Azimuth 2 | 235 | Azimuth in degrees (0-359) |
| SNR 2 | 47 | Signal to noise ration in dBHZ (0-99) |
| Satellite ID 3 | 22 | Range is 1-32 |
| Elevation 3 | 41 | Elevation in degrees (0-90) |
| Azimuth 3 | 069 | Azimuth in degrees (0-359) |
| SNR 3 | Signal to noise ration in dBHZ (0-99) | |
| Satellite ID 4 | 13 | Range is 1-32 |
| Elevation 4 | 32 | Elevation in degrees (0-90) |
| Azimuth 4 | 252 | Azimuth in degrees (0-359) |
| SNR 4 | 45 | Signal to noise ration in dBHZ (0-99) |
| Checksum | *70 | |
| Terminator | CR/LF |
$GPRMC Sentence (Position and time)
Example (signal not acquired): $GPRMC,235947.000,V,0000.0000,N,00000.0000,E,,,041299,,*1DExample (signal acquired): $GPRMC,092204.999,A,4250.5589,S,14718.5084,E,0.00,89.68,211200,,*25
| Field | Example | Comments |
| Sentence ID | $GPRMC | |
| UTC Time | 092204.999 | hhmmss.sss |
| Status | A | A = Valid, V = Invalid |
| Latitude | 4250.5589 | ddmm.mmmm |
| N/S Indicator | S | N = North, S = South |
| Longitude | 14718.5084 | dddmm.mmmm |
| E/W Indicator | E | E = East, W = West |
| Speed over ground | 0.00 | Knots |
| Course over ground | 0.00 | Degrees |
| UTC Date | 211200 | DDMMYY |
| Magnetic variation | Degrees | |
| Magnetic variation | E = East, W = West | |
| Checksum | *25 | |
| Terminator | CR/LF |
$GPVTG Sentence (Course over ground)
Example (signal not acquired): $GPVTG,,T,,M,,N,,K*4EExample (signal acquired): $GPVTG,89.68,T,,M,0.00,N,0.0,K*5F
| Field | Example | Comments |
| Sentence ID | $GPVTG | |
| Course | 89.68 | Course in degrees |
| Reference | 89.68 | T = True heading |
| Course | Course in degrees | |
| Reference | 89.68 | M = Magnetic heading |
| Speed | 0.00 | Horizontal speed |
| Units | N | N = Knots |
| Speed | 0.00 | Horizontal speed |
| Units | K | K = KM/h |
| Checksum | *5F | |
| Terminator | CR/LF |