NMEA 0183 protocol guide

NMEA 0183 Protocol Guide: Sentence Structure, Checksum and Message Types

NMEA 0183 is a communication standard widely used in marine electronics and navigation. It lets GPS receivers, chartplotters, autopilots, depth sounders and wind instruments exchange data as simple lines of text. This guide covers its physical layer, sentence structure, common message types, checksum calculation, how it compares with NMEA 2000, and how to read it in Python.

4 min read
In this article 12
  1. What is NMEA 0183?
  2. Technical specifications
  3. Sentence structure
  4. Common message types
  5. Converting coordinates to decimal degrees
  6. Calculating the checksum
  7. NMEA 0183 vs NMEA 2000
  8. Applications
  9. Reading NMEA 0183 in Python
  10. Conclusion
  11. Frequently asked questions
  12. Related guides

What is NMEA 0183?

NMEA 0183 is a serial data standard developed by the National Marine Electronics Association for communication between electronic navigation devices. Typical users include:

  • GPS / GNSS receivers
  • Autopilots
  • Depth sounders
  • Radar and AIS
  • Wind and environmental sensors

Data is transmitted as ASCII text, traditionally over an RS-422 (differential) interface; many GPS modules and PCs use RS-232 or TTL-level UART for the same data.

Technical specifications

Physical layer

  • Baud rate: Usually 4800 bps; high-speed variants for AIS and fast sensors use 38400 bps.
  • Data format: 8 data bits, no parity, 1 stop bit (8N1).
  • Electrical interface:

– RS-422: Differential signalling, reliable over long cable runs; the standard defines one talker and multiple listeners.

– RS-232 / TTL UART: Common for short connections to a PC or microcontroller.

Sentence framing

NMEA 0183 messages are called sentences and are sent as ASCII characters. A typical sentence looks like this:

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

Sentence structure

PartDescription
$Start character (! for encapsulated sentences such as AIS)
Talker IDThe sending device (e.g. GP = GPS, GN = multi-GNSS)
Sentence IDMessage type (e.g. GGA, RMC, GSV)
Data fieldsComma-separated values
*Start of the checksum
ChecksumXOR-based validation value in hex
CR/LFEnd-of-line characters

A sentence is at most 82 characters long, including the $ and the CR/LF.

Common message types

GGA (Global Positioning System Fix Data)

Position, altitude, fix quality and satellite count.

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

Core navigation data: time, status, position, speed, course and date.

$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

GSV (Satellites in View)

Information on visible satellites: ID, elevation, azimuth and signal-to-noise ratio.

VTG (Track Made Good and Ground Speed)

Course and speed over ground, in knots and km/h.

Converting coordinates to decimal degrees

NMEA uses degrees and decimal minutes (ddmm.mmmm). Divide the minutes by 60 and add them to the degrees; south and west are negative.

  • 4807.038,N → 48 + 7.038 / 60 = 48.1173°
  • 01131.000,E → 11 + 31.000 / 60 = 11.5167°

For other formats, use the coordinate converter.

Calculating the checksum

The checksum protects data integrity and is calculated with XOR:

  1. Take every character between $ and *.
  2. XOR them together.
  3. Send the result as two hexadecimal digits.

Example: For GPGLL,4916.45,N,12311.12,W,225444,A the XOR result is 31, so the full sentence ends with *31. Note that every character counts: the same sentence with a trailing comma (...,A,) has a checksum of 1D.

You can decode sentences and verify checksums instantly with our NMEA 0183 decoder and checksum tool.

NMEA 0183 vs NMEA 2000

FeatureNMEA 0183NMEA 2000
Data formatASCII textBinary (CAN bus)
Speed4800–38400 bps250 kbps
TopologyPoint to point (one talker, several listeners)Multi-device network
Message sizeUp to 82 characters8-byte frames (multi-frame for larger data)
ComplexitySimpleMore advanced

Applications

  • GPS navigation: Position, speed and time synchronisation.
  • Autopilots: Course and waypoint data.
  • AIS: Vessel traffic information.
  • Radar integration: Target positions.
  • Weather sensors: Wind, temperature and pressure.

Reading NMEA 0183 in Python

import serial

def read_nmea(port='/dev/ttyUSB0', baud=4800):
    with serial.Serial(port, baud, timeout=1) as ser:
        while True:
            line = ser.readline().decode('ascii', errors='replace').strip()
            if line.startswith('$'):
                print('NMEA sentence:', line)

read_nmea()

This reads sentences from a serial NMEA device and prints them to the console. Libraries such as pynmea2 can parse the fields for you. Most USB GPS modules use 9600 baud, so adjust the baud rate to match your device.

Conclusion

NMEA 0183 is a simple but effective protocol that has served marine and navigation electronics for decades. Although NMEA 2000 is gradually replacing it on newer boats, NMEA 0183 is still everywhere, from GPS modules on drones to legacy marine instruments. Parsing it correctly, including checksum validation, is essential for reliable navigation data.

Frequently asked questions

What baud rate does NMEA 0183 use?

The standard rate is 4800 bps. High-speed NMEA 0183 (often used for AIS) runs at 38400 bps, and many GPS modules default to 9600 bps.

Can I connect NMEA 0183 to NMEA 2000?

Not directly. You need a gateway that converts between the ASCII serial format and the CAN-based NMEA 2000 network.

What should I do if the checksum doesn’t match?

Don’t use the sentence. A wrong checksum is usually caused by noise on the cable, an incorrect baud rate or a truncated read; check the wiring and the serial port settings.

Found this useful?Share it with a friend or follow us on Instagram for new projects.

Similar Posts