Skip to main content

NMEA Protocol

NMEA 0183 is the standard communication protocol used by virtually all GNSS receivers to transmit position, satellite, and accuracy data. When you connect an external receiver to Mapit GIS (via Bluetooth on Android, or TCP/IP on either platform), the receiver sends a continuous stream of NMEA sentences over the serial link.

What Is NMEA?

NMEA stands for National Marine Electronics Association. The NMEA 0183 standard defines a text-based protocol where each message (called a sentence) is a single line of ASCII text:

$GPGGA,120000.00,5133.82,N,00042.24,W,1,08,0.9,45.4,M,47.0,M,,*47

Every sentence follows the same structure:

PartExampleDescription
Start$Every sentence begins with a dollar sign
Talker IDGPIdentifies the satellite system (GP = GPS, GL = GLONASS, GA = Galileo, GB/BD = BeiDou, GN = multi-GNSS)
Sentence typeGGAThree-letter code identifying the data format
Data fields120000.00,5133.82,...Comma-separated values
Checksum*47XOR of all bytes between $ and *, encoded as two hex digits
Terminator\r\nCarriage return and line feed

The talker ID tells you which satellite constellation produced the data:

Talker IDConstellation
GPGPS (USA)
GLGLONASS (Russia)
GAGalileo (Europe)
GB / BDBeiDou (China)
QZQZSS (Japan)
GNMulti-GNSS (combined solution)

Supported Sentence Types

Mapit GIS parses the following NMEA sentence types. The NMEA parser (NmeaParser) processes each incoming line, validates the format, and extracts the relevant data fields.

GGA - Global Positioning System Fix Data

The most important sentence for surveying. GGA provides the core position fix including coordinates, altitude, fix quality, satellite count, and accuracy.

FieldData
UTC timeHours, minutes, seconds
Latitude / LongitudeDegrees and decimal minutes
Fix quality0 = Invalid, 1 = GPS, 2 = DGPS, 3 = PPS, 4 = RTK Fixed, 5 = RTK Float, 6 = Dead reckoning, 7 = Manual, 8 = Simulation
Satellites in useNumber of satellites contributing to the fix
HDOPHorizontal dilution of precision
Altitude (MSL)Height above mean sea level in metres
Geoid separationDifference between the WGS 84 ellipsoid and mean sea level in metres
DGPS ageSeconds since last differential correction
DGPS station IDReference station identifier

Supported talker IDs: GPGGA, GNGGA

Provides position, speed, and bearing. Used as a fallback when GGA is not available.

FieldData
UTC time and dateFull timestamp
StatusA = Active (valid fix), V = Void (no fix)
Latitude / LongitudePosition
Speed over groundIn knots (converted to m/s internally)
Track angleTrue bearing in degrees

Supported talker IDs: GPRMC, GNRMC

GSA - GNSS DOP and Active Satellites

Reports the dilution of precision values and which satellites are being used in the position solution.

FieldData
ModeA = Automatic, M = Manual
Fix type1 = No fix, 2 = 2D fix, 3 = 3D fix
Satellite PRNsUp to 12 satellite identifiers used in the fix
PDOPPosition dilution of precision
HDOPHorizontal dilution of precision
VDOPVertical dilution of precision

NMEA 4.10+ receivers include a system ID field (field 19) to distinguish constellations.

Supported talker IDs: GPGSA, GNGSA, GLGSA, QZGSA, BDGSA, GBGSA

GSV - GNSS Satellites in View

Provides detailed information about each visible satellite - used to populate the sky plot and signal bar chart in the GPS Info sheet.

FieldData
Satellites in viewTotal count for this constellation
Satellite PRNIdentifier
ElevationDegrees above horizon (0-90)
AzimuthDegrees from true north (0-360)
SNRSignal-to-noise ratio in dB-Hz (0-99)

Each GSV sentence carries data for up to 4 satellites, with multiple sentences forming a complete set.

Supported talker IDs: GPGSV, GLGSV, GAGSV, QZGSV, BDGSV, GBGSV

GST - GNSS Pseudorange Error Statistics

Provides statistical accuracy estimates. This is the primary source of RMS accuracy values displayed in the GPS Info sheet.

FieldData
RMSRoot mean square of pseudorange residuals
Semi-major / semi-minor errorError ellipse axes in metres
OrientationError ellipse rotation in degrees
Latitude 1-sigma errorStandard deviation in metres
Longitude 1-sigma errorStandard deviation in metres
Height 1-sigma errorStandard deviation in metres

From these values, the app computes:

  • HRMS = sqrt(lat_error^2 + lon_error^2)
  • VRMS = height_error
  • 3D RMS = sqrt(lat_error^2 + lon_error^2 + height_error^2)

VTG - Course Over Ground and Ground Speed

Used internally to advance the NMEA state machine, marking the end of a sentence sequence.

Supported talker IDs: GPVTG, GNVTG

GLL - Geographic Position

Provides latitude and longitude with UTC time. Used only when neither GGA nor RMC is available in the receiver's output.

Supported talker IDs: GPGLL, GNGLL

GNS - GNSS Fix Data

A multi-GNSS equivalent of GGA that includes a mode indicator per constellation. Updates the NMEA state accordingly.

PNVGSDP - Proprietary Accuracy Sentence

A proprietary sentence (NovAtel-compatible) providing standard deviations for latitude, longitude, and height, plus a fix mode character:

ModeMeaning
AAutonomous
DDifferential
FRTK Float
RRTK Fixed
EDead reckoning
NNo fix

Sentence Priority

The parser uses a state machine to avoid mixing data from different fix epochs. When multiple sentence types provide overlapping data, this priority applies:

  1. GGA - preferred for position and fix quality
  2. RMC - used if GGA is absent (provides speed and bearing not in GGA)
  3. GLL - last resort for position only

Checksum Validation

Each NMEA sentence ends with a two-character hex checksum preceded by *. The checksum is computed by XOR-ing all bytes between $ and *:

$GPGGA,120000,...*47
↑ XOR these ↑

The parser verifies the checksum format but is pragmatic about validation - sentences with minor formatting issues are still processed to maximise compatibility with the wide variety of GNSS receivers on the market.