Articles

News

inde


Contact Information
Articles
Links

NMEA 0183 Protocol

The Protocol

The NMEA 0183 v2.0 protocol is implemented by most GPS equipment, but is in fact a general purpose standard used in marine electronics for navigation and other functions (such as radio communications, satellites, direction finding, weather instruments, time systems, radar, etc...). The navigation use is not specific to GPS either but covers other systems, such as Loran-C, or DECCA navigator.

The electrical interface is not part of this standard, but normally only involves a shielded twisted pair cable supporting a "talker" and several "listeners". The shield is grounded at the talker end only. NMEA 0180 & 0182 recommend that the talker output can be either RS-232 (polar) or TTL (0/5V). NMEA 0183 retains this but recommends RS-422 in addition. Normally the simpler electrical interface is used in practice and direct connection to an RS-232 port is possible.

The NMEA 0183 protocol supports serial communications at 4800 bps (fixed) using printable ASCII characters only. This makes it easy to work with. A talker, such as a GPS unit, produces a stream of data continuously at a rate determined by its sampling rate (which is normally once every few seconds). The data is presented as "sentences", where each sentence starts with a "$" character, has a two-character talker ID and a three-character sentence ID. The data content is presented as a series of comma delimited fields. Each sentence can have up to 82 characters including the header, the data and an optional checksum field with <CR><LF> at the end. If a field is blank, all the comma delimiters remain but no data appears between commas corresponding to the blank field.

The checksum comprises a field starting with a "*" character and two hexadecimal digits (expressed in ASCII) representing the exclusing OR of all characters appearing between the "$" and "*" exclusively.

My Garmin GPS12XL outputs the following sentences on a continuous basis:

$PGRMZ,399,f,3*18
$PGRMM,WGS 84*06
$GPBOD,,T,,M,,*47
$GPRTE,1,1,c,0*07
$GPRMC,120757,A,5152.985,N,00205.733,W,000.0,349.4,230100,004.1,W*78
$GPRMB,A,,,,,,,,,,,,V*71
$GPGGA,120757,5152.985,N,00205.733,W,1,06,2.5,121.9,M,49.4,M,,*52
$GPGSA,A,3,,05,06,,09,,,24,,29,30,,3.9,2.5,2.9*30
$GPGSV,3,1,11,04,17,062,00,05,76,073,39,06,22,189,41,07,00,034,00*74
$GPGSV,3,2,11,09,37,123,49,14,03,354,00,21,00,251,00,24,12,102,44*7F
$GPGSV,3,3,11,25,09,298,30,29,49,262,30,30,59,251,36,,,,*48
$PGRME,34.4,M,42.9,M,55.0,M*12

All sentences starting with a "$P" are proprietary and have a three character manufacturer ID (GRM=Garmin in this case). The taker ID, "GP" for GPS, is present in the remainder of the sentences.

Here is an analysis of the sentences above:

Sentence BOD

Function: Bearing (origin to destination waypoint)
Example: $GPBOD,,T,,M,,*47

Synopsys: bearing, T (degrees true), bearing, M (degrees magnetic), destination waypoint ID, origin waypoint ID, checksum

Sentence RTE

Function: Waypoints in active routes
Example: $GPRTE,1,1,c,0*07
Synopsis: number of RTE sentences, number of this sentence, C/W (C=complete list of waypoints in this route, W=first waypoint listed is start of current leg), route identifyer, checksum

Sentence RMC

Function: Recommended mimimum specific GPS/transit data
Example: $GPRMC,120757,A,5152.985,N,00205.733,W,000.0,349.4,230100,004.1,W*78
Synopsis: time of fix (hhmmss), A/V (A=OK, V=navigation receiver warning), latitude, N/S, longitude, E/W, ground speed (knots), course made good (true), date of fix (ddmmyy), magnetic variation, E/W, checksum

Sentence RMB

Function: Recommended minimum navigation information (sent when a destination waypoint is active)
Example: $GPRMB,A,,,,,,,,,,,,V*71
Synopsis: A/V (A=OK, V=navigation receiver warning), cross-track error (nautical miles, 9.9 max.), L/R (L=left,R=right), origin waypoint ID, destination waypoint ID, N/S, destination waypoint latitude, destination waypoint longitude, E/W, range to destination (nautical miles), true bearing to destination, velocity towards destination (knots), arrival alarm (A=arrived, V=not arrived), checksum

Sentence GGA

Function: Global Positioning Fix Data
Example: $GPGGA,120757,5152.985,N,00205.733,W,1,06,2.5,121.9,M,49.4,M,,*52
Synopsis: time of fix (hhmmss), latitude, N/S, longitude, E/W, Fix quality (0=invalid, 1=GPS fix, 2=DGPS fix), number of satellites being tracked, horizontal dilution of position, altitude above sea level, M (meters), height of geoid (mean sea level) above WGS84 ellipsoid, time in seconds since last DGPS update, DGPS station ID number, checksum

Sentence GSA

Function: GPS dilution of precision* and active satellites
Example: $GPGSA,A,3,,05,06,,09,,,24,,29,30,,3.9,2.5,2.9*30
Synopsis: A/M (A=automatic selection of 2D or 3D fix, M=manual), 2/3 (2=2D, 3=3D fix), pseudo-random number (PRN) ID of satellites used for fix (room for 12), PDOP (position dilution of precision), HDOP (horizontal dilution of precision), VDOP (vertical dilution of precision), checksum
*DOP is an indication of the effect of satellite geometry on the accuracy of the fix

Sentence GSV

Function: Satellites in view
Example: $GPGSV,3,1,11,04,17,062,00,05,76,073,39,06,22,189,41,07,00,034,00*74
Synopsis: number of sentences, number of this sentence, number of satellites in view, satellite PRN, elevation, azimuth, signal strength (repeated for up to four satellites per sentence), checksum

Global Positioning System | NMEA 0183 Protocol

This document maintained by simon.collings@cableinet.co.uk.
Material Copyright © 2000 Simon Collings