The NMEA FAQ

Version 6.1 Sept. 15, 1997

Additions, corrections, and comments should be emailed to the author,
Peter Bennett.

Contents:

What is NMEA?

What is an NMEA Standard

NMEA Address

Electrical Interface

NMEA-0180 and NMEA-0182

Simple Format

Complex Format

NMEA-0183

General Sentence Format

Sentences sent by specific equipment

Sample Sentences Dissected

Standard Sentences

Garmin Proprietary Sentences

RS-232 connections

Troubleshooting

About the author

Acknowledgements

1. What is NMEA?

The National Marine Electronics Association is dedicated to the education and advancement of the marine electronics industry and the market which it serves.

It is a non-profit association composed of manufacturers, distributors, dealers, educational institutions, and others interested in peripheral marine electronics occupations (quoted from a promo in "NMEA News").

1.1 What is an NMEA standard?

For the purposes of this article, an NMEA standard defines an electrical interface and data protocol for communications between marine instrumentation. (They may also have standards for other things.)

1.2 NMEA Address

2. Electrical Interface

These standards allow a single "talker", and several "listeners" on one circuit. The recommended interconnect wiring is a shielded twisted pair, with the shield grounded only at the talker. The standards do not specify the use of any
particular connector.

The NMEA-0180 and 0182 standards say that the talker output may be RS-232, or from a TTL buffer, capable of delivering 10 mA at 4 V. A sample circuit shows an open collector TTL buffer with a
680 ohm resistor to +12 V, and a diode to prevent the output voltage from rising above +5.7 V.

NMEA-0183 accepts this, but recommends that the talker output comply with EIA-422. This is a differential system, having two signal lines, A and B. The voltages on the "A" line correspond to those on the older TTL single wire, while the "B"
voltages are reversed (while "A" is at +5, "B" is at ground, and vice versa)

In either case, the recommended receive circuit uses an opto-isolator with suitable protection circuitry. The input should be isolated from the receiver's ground.

In practice, the single wire, or the EIA-422 "A" wire may be directly connected to a computer's RS-232 input.

3. NMEA-0180 and NMEA 0182

NMEA-0180 and 0182 are very limited, and just deal with communcations from a Loran-C (or other navigation receiver, although the standards specifically mention Loran), and an autopilot.

From the information I have, it appears that 0180 and 0182 are identical. I suspect that equipment claiming to use NMEA-0180 will use the "simple" format described below, while those using NMEA-0182 will use the "complex" format. (but
this is really just a guess... corrections??)

3.1 "Simple" data format

The simple format consists of a single data byte transmitted at intervals of 0.8 to 5 seconds, at 1200 baud with odd parity. Bits 5 - 0 give the cross-track error in units of 0.1 uS or 0.01 nautical mile. The error is given in offset binary, with a count
of 1 representing full scale right error, 32 (hex 20) for on course, and 63 (hex 3f) full scale left error. Bit 6 is a 1 if the data is valid, and bit 7 is 0 to indicate the simple data format.

3.2 "Complex" data format

The complex format consists of a data block of 37 bytes of (mostly) readable ASCII text giving cross-track error, bearing to waypoint, present Lat/Long, and a binary status byte. The data block shall be sent at intervals of 2 to 8 sec. All bytes in the complex
format have bit 7 = 1 to distinguish them from the simple format. It is permissible for a sending device to send both simple and complex data, and even to send a "simple" data byte in the middle of a "complex" data block.

4. NMEA-0183

4.1 General Sentence Format

Under the NMEA-0183 standard, all characters used are printable ASCII text (plus carriage return and line feed). NMEA-0183 data is sent at 4800 baud.

The data is transmitted in the form of "sentences". Each sentence starts with a "$", a two letter "talker ID", a three letter "sentence ID", followed by a number of data fields separated by commas, and terminated by
an optional checksum, and a carriage return/line feed. A sentence may contain up to 82 characters including the "$" and CR/LF.

If data for a field is not available, the field is simply omitted, but the commas that would delimit it are still sent, with no space between them.

Since some fields are variable width, or may be omitted as above, the receiver should locate desired data fields by counting commas, rather than by character position within the sentence.

The optional checksum field consists of a "*" and two hex digits representing the exclusive OR of all characters between, but not including, the "$" and "*". A checksum is required on some sentences.

The standard allows individual manufacturers to define proprietary sentence formats. These sentences start with "$P", then a 3 letter manufacturer ID, followed by whatever data the manufacturer wishes, following the general format of the standard
sentences.

Autohelm Seatalk
Autohelm Seatalk is a proprietary bus for communications between various intruments. Some of the instruments can act as NMEA-0183 talkers or listeners. Data received from an external NMEA-0183 device will, if Seatalk understands the sentence, be re-transmitted,
but not necessarily in the same sentence type.

The specific sentences sent will depend on the data available on the Seatalk bus (i.e. sentences containing wind speed and direction will only be sent if the system includes a wind instrument)

GSA - GPS DOP and active satellites
GSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39
A Auto selection of 2D or 3D fix (M = manual)
3 3D fix
04,05... PRNs of satellites used for fix (space for 12)
2.5 PDOP (dilution of precision)
1.3 Horizontal dilution of precision (HDOP)
2.1 Vertical dilution of precision (VDOP)
DOP is an indication of the effect of satellite geometry on the accuracy of the fix.

GSV - Satellites in view
GSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75
2 Number of sentences for full data
1 sentence 1 of 2
08 Number of satellites in view
01 Satellite PRN number
40 Elevation, degrees
083 Azimuth, degrees
46 Signal strength - higher is better
<repeat for up to 4 satellites per sentence>
There my be up to three GSV sentences in a data packet

R00 - List of waypoint IDs in currently active route
R00,MINST,CHATN,CHAT1,CHATW,CHATM,CHATE,003,004,005,006,007,,,*05
(This sentence is produced by a Garmin 65, but is not listed in Version 2.0 of the standard. The standard lists RTE for this purpose.)

WPL - waypoint location
WPL,4917.16,N,12310.64,W,003*65
4917.16,N Latitude of waypoint
12310.64,W Longitude of waypoint
003 Waypoint ID
When a route is active, this sentence is sent once for each waypoint in the route, in sequence. When all waypoints have been reported, GPR00 is sent in the next data set. In any group of sentences, only one WPL sentence, or an R00 sentence, will be sent.

Proprietary sentences to control a Starlink differential beacon receiver. (I assume Garmin's DBR is made by Starlink)
$PSLIB,,,J*22
$PSLIB,,,K*23
These two sentences are normally sent together in each group of sentences from the GPS.
The three fields are: Frequency, bit Rate, Request Type. The value in the third field may be:
J = status request
K = configuration request
blank = tuning message

When the GPS receiver is set to change the DBR frequency or baud rate, the "J" sentence is replaced (just once) by (for example): $PSLIB,320.0,200*59 to set the DBR to 320 KHz, 200 baud.

5. RS-232 connections

Although this is not really related to NMEA, many people want to connect a GPS to a computer, so need to know about the RS-232 serial ports on a computer.

The RS-232 standard defines two classes of devices that may communicate using RS-232 serial data - Data Terminal Equipment (DTE), and Data Communication Equipment (DCE). Computers and terminals are considered DTE, while modems are DCE. The standard defines
pinouts for DTE and DCE such that a "straight through" cable (pin 2 to pin 2, 3 to 3, etc) can be used between a DTE and DCE. To connect two DTEs together, you need a "null modem" cable, that swaps pins between the two ends (eg. pin 2 to
3, 3 to 2). Unfortunately, there is sometimes disagreement whether a certain device is DTE or DCE, hence my standard RS-232 disclaimer: if it doesn't work, swap pins 2 and 3!

The standard RS-232 connector is a 25 conductor DB-25, although many PCs (and some other equipment) now use a 9 pin DE-9 (often incorrectly called DB-9)

For NMEA-0183 interfacing, we are only concerned with Rx Data, signal ground (and possibly Tx Data, if we want the computer to talk to the GPS)

NMEA-0183 data is sent at 4800 baud.

6. Troubleshooting

First check that the talker (usually GPS or Loran) can send NMEA-0183, and determine what sentences it sends. Also, verify that the listener understands NMEA-0183, and that it understands the sentences the talker is sending. In some cases the same information
may be sent in two or more different sentences. If the talker and listener don't both use the same sentences, there will be no communication. It may be possible to change the sentences sent by the talker, to match those understood by the listener.

Next, check that the talker is indeed set to send NMEA-0183 data. Some talkers may have provision to send NMEA-0180 or 0182, or some proprietary format.

A computer, using any convenient terminal program (Telix, Procomm, Windows Terminal, etc.) set to 4800 baud, can be used to monitor the NMEA data, and confirm what sentences are sent,
and that the data is in the correct format. Verify that the wiring is correct - that the talker data output is connected to the listener data input, and that a signal ground line is connected between the two pieces of equipment.

If you have multiple listeners connected to a single talker, you may be overloading the talker port. Try connecting only one listener at a time.

On any NMEA-0183 circuit, there can only be one talker. If you must have more than one talker, and one of the talker devices can also act as a listener, you may be able to connect things "in series", so a talker-only output is connected
to a listener/talker input, and the listener/talker output is connected to other listeners. However, some listener/talker devices may reformat the data, or only pass data they understand. (The Autohelm Seatalk system does this, and claims the data as it's
own, starting all output sentences with "$II".)

Particularly with older equipment, the equipment may claim to comply with NMEA-0183, but in fact have an error in the data format. (My Kings 8001 Loran-C claims to send an APB sentence, but gets some of the fields in the wrong order, so my autopilot can't
understand it.) This sort of problem can be verified by capturing the NMEA-0183 data on a computer, and comparing the data formats with those given above.