GPS: GGA, RMC, and GLL NMEA sentence structure

GPS GNSS NMEA Globe

If I were to hazard a guess, I’d assume that you are here because you hooked up a Global Navigation Satellite System (GNSS) module to a microcontroller and now you are confused about which data to use. The most commonly used GNSS worldwide is the Global Positioning System (GPS). As a result, the term “GPS” is frequently used to refer to the entire set of tools and procedures involved in estimating a user’s location using a GNSS. The National Marine Electronics Association (NMEA) has a standard for the formatting of GPS information. Nearly all GNSS receivers output NMEA data. In this article, we shall go into great detail on GGA, RMC, and GLL NMEA sentences.

NMEA standard sentence structure

The NMEA 0183 is a messaging protocol standard. These messages consist of sentences with data transmitted from a single talker to one or more listeners. Each sentence contains various bits of data that are separated by commas. 

All NMEA sentences start with the “$” sign and end with Carriage Return (CR) and Line Feed (LF). The data within the sentence is separated by commas to make it easier to read and parse by microcontrollers. Each NMEA message has a checksum before the CR. For the data in the NMEA sentence, printable ASCII format is used.

NMEA sentences include a Talker Identifier (ID) after the “$” sign. The talker ID is a two-character prefix that identifies the type of the transmitting unit. NMEA 0183 talker identifier mnemonics of navigation satellite system receivers are provided in Table 1.

Table 1. NMEA 0183 talker identifier mnemonics: navigation satellite system receivers.

IDNAVIGATION SATELLITE SYSTEM RECEIVERSREGION/COUNTRY
GAEuropean Global Navigation System (Galileo)Europe
GBBeiDou Navigation Satellite System (BDS) China
GINavigation Indian Constellatiozn (NavIC) India
GLGlobalnaya Navigazionnaya Sputnikovaya Sistema (GLONASS)Russia
GNGlobal Navigation Satellite System (GNSS)*multiple 
GPGlobal Positioning System (GPS) US
GQQuasi-Zenith Satellite System (QZSS) Japan

*Note: The “GN” Talker Identifier shall be used when the data in the sentence is produced from a combination of multiple satellite systems.

The next three letters after talker ID are the protocol header, which defines the message content. We will discuss messages containing GGA, RMC, and GLL protocol headers.

GGA – Global Positioning System Fix Data

Time, position, and fix related data for a GNSS receiver.

Format:

$<TalkerID>GGA,<Timestamp>,<Lat>,<N/S>,<Long>,<E/W>,<GPSQual>,<Sats>,<HDOP>,<Alt>,<AltVal>,<GeoSep>,<GeoVal>,<DGPSAge>,<DGPSRef>*<checksum><CR><LF>

Table 2 contains the values for the following example:

$GNGGA,062735.00,3150.788156,N,11711.922383,E,1,12,2.0,90.0,M,,M,,*55

Table 2. GGA Data Format

FieldCharExampleDescription
CharEach NMEA message starts with “$“
TalkerIDString, 2 characterGNThe talker ID.GP: For GPSGL: For GLONASSGA: For GalileoGB: For BeiDouGI: For NAVIC (IRNSS)GQ: For QZSSGN: For multi-constellation mode
Timestamphhmmss.sss062735.00UTC time of GNSS sample:hh: hours (Fixed two digits)mm: minutes (Fixed two digits)ss: seconds (Fixed two digits).ss: decimal fraction of seconds
Lat DDMM.MMMMM3150.788156Latitude as degrees:DD: Degrees (Fixed two digits)MM: Minutes (Fixed two digits).MMMMMM: Decimal fraction of minutes
N/SN or SNLatitude direction:N = NorthS = South
LongDDDMM.MMMMM11711.922383Longitude as degrees:DDD: Degree (Fixed three digits)MM: Minutes (Fixed two digits).MMMMMM: Decimal fraction of minutes
E/WE or WELongitude direction:E = EastW = West
GPSQualDecimal, 1 digit10 = Fix not available or invalid1 = GPS, SPS Mode, fix valid2 = Differential GPS, SPS Mode, fix valid6 = Estimated (dead reckoning) mo
SatsDecimal, 2 digits12Number of satellites in use. 
HDOPx.x 2.0Horizontal dilution of precision.
Altx.x 90.0Height above mean sea level.
AltValMMReference unit for altitude:M = meter
GeoSepx.x NullGeoidal separation measures in meters.
GeovalMReference unit for geoidal separation:M = meters
DGPSAgex.xNullAge of differential corrections, sec 
DGPSRefxxxxNullDifferential reference station ID
*End character of data field
Checksum55Hexadecimal checksum

RMC – Recommended minimum specific GPS/Transit data

Time, date, position, course, and speed data provided by a GNSS receiver.

Format:

$<TalkerID>RMC,<Timestamp>,<Status>,<Lat>,<N/S>,<Long>,<E/W>,<SOG>,<COG>,<Date>,<MagVar>,<MagVarDir>,<mode>,<NavStatus>*<checksum><CR><LF>

Table 3 contains the values for the following example:

$GNRMC,060512.00,A,3150.788156,N,11711.922383,E,0.0,,311019,,,A,V*1B

Table 3. RMC Data Format

FieldCharExampleDescription
CharEach NMEA message starts with “$“
TalkerIDString, 2 characterGNThe talker ID.GP: For GPSGL: For GLONASSGA: For GalileoGB: For BeiDouGI: For NAVIC (IRNSS)GQ: For QZSSGN: For multi-constellation mode
Timestamphhmmss.sss060512.00UTC time of GNSS sample:hh: hours (Fixed two digits)mm: minutes (Fixed two digits)ss: seconds (Fixed two digits).ss: decimal fraction of seconds
StatusA or VAValidity of data:A = validV = invalid
Lat DDMM.MMMMM3150.788156Latitude as degrees:DD: Degrees (Fixed two digits)MM: Minutes (Fixed two digits).MMMMMM: Decimal fraction of minutes
N/SN or SNLatitude direction:N = NorthS = South
LongDDDMM.MMMMM11711.922383Longitude as degrees:DDD: Degree (Fixed three digits)MM: Minutes (Fixed two digits).MMMMMM: Decimal fraction of minutes
E/WE or WELongitude direction:E = EastW = West
SOGx.x0.0Speed over ground in knots.
COGx.xnullCourse over ground.
Dateddmmyy311019Date in format ddmmy
MagVarx.xnullMagnetic Variation, degrees
MagVarDirE or WnullMagnetic Variation direction:E = EastW = West
ModeD, A, N or EAPositioning system mode indicator.
NavStatusS, C, U or VVNavigational status.S = SafeC = CautionU = UnsafeV = Navigational status not valid.
*End character of data field
Checksum1BHexadecimal checksum

GLL – Geographic position – latitude and longitude

Latitude and longitude of vessel position, time of position fix and status.

Format:

$<TalkerID>GLL,<Lat>,<N/S>,<Long>,<E/W>,<Timestamp>,<Status>,<ModeInd>*<checksum><CR><LF>

Table 4 contains the values for the following example:

$GNGLL,3150.788156,N,11711.922383,E,062735.00,A,A*76

Table 4. GLL Data Format

FieldCharExampleDescription
CharEach NMEA message starts with “$“
TalkerIDString, 2 characterGNThe talker ID.GP: For GPSGL: For GLONASSGA: For GalileoGB: For BeiDouGI: For NAVIC (IRNSS)GQ: For QZSSGN: For multi-constellation mode
Lat DDMM.MMMMM3150.788156Latitude as degrees:DD: Degrees (Fixed two digits)MM: Minutes (Fixed two digits).MMMMMM: Decimal fraction of minutes
N/SN or SNLatitude direction:N = NorthS = South
LongDDDMM.MMMMM11711.922383Longitude as degrees:DDD: Degree (Fixed three digits)MM: Minutes (Fixed two digits).MMMMMM: Decimal fraction of minutes
E/WE or WELongitude direction:E = EastW = West
Timestamphhmmss.sss062735.00UTC time of GNSS sample:hh: hours (Fixed two digits)mm: minutes (Fixed two digits)ss: seconds (Fixed two digits).ss: decimal fraction of seconds
StatusA or VAValidity of data:A = validV = invalid
ModeIndA or VAPositioning system mode indicator:A = Autonomous modeN = Data not valid
*End character of data field
Checksum76Hexadecimal checksum

Summary

As can be seen from tables 2–4, each NMEA sentence that we discussed has a different structure and might have additional information compared to other sentences. If you just need “GPS” coordinates, any of the GGA, RMC, or GLL sentences will do the job. However, if you need specific information, like an object’s altitude, you will need to use GGA sentences. Similar to this, if you need information about the object’s speed, you will have to use RMC sentences. That said, NMEA sentences should be chosen according to the additional information that you need.

Leave a Reply

Your email address will not be published. Required fields are marked *