NMEA 0183
From Wikipedia, the free encyclopedia
NMEA 0183 (or NMEA for short) is a combined electrical and data specification for communication between marine electronic devices such as echo sounder, sonars, Anemometer (winds speed and direction), gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the US-based National Marine Electronics Association.
The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data is transmitted in a "sentence" from one "talker" to one "listener" at a time. Through the use of intermediate expanders, a talker can have a unidirectional conversation with multiple listeners, and using multiplexers, multiple sensors can talk to a single computer port. Third-party switches are available that can establish a primary and secondary talker, with automatic failover if the primary fails.
At the application layer, the standard also defines the contents of each sentence (message) type so that all listeners can parse messages accurately.
Contents |
[edit] Electrical Characteristics (physical layer)
NMEA 0183 implementations vary, but can often interoperate with RS-232, RS-423, and RS-422. Each signal runs over a pair of wires. It is wise to test specific implementations for compatibility with these more widespread electrical standards, but, at the relatively slow speed of the interface, there is a high chance that it will work. Especially in a marine environment where grounding may be erratic, it can be wise to protect interfaces, especially of computer serial ports, with an optocoupler.
The official specification states that the "talker" drive circuit shall at minimum meet the requirements of EIA-422-A, a.k.a. RS-422. It also states that all "listeners" shall have optoisolators and other protective circuitry.
One frequently over-looked requirement for the "listener" portion of the circuit is the minimum level of operation. The "listener" must be able to operate with a minimum differential input voltage of 2.0 Volts and take no more than 2.0 mA current.
[edit] Serial Configuration (data link layer)
Baud Rate: 4800
Data Bits: 8
Parity: None
Stop Bits: 1 (or more)
Handshake: None
AIS units use a default baud rate of 38400
[edit] Application Layer Protocol Rules
- Each message starting character is a dollar sign.
- The next five characters identify the type of message (talker).
- All data fields that follow are comma-delimited.
- The first character that immediately follows the last data field character is an asterisk.
- The asterisk is immediately followed by a two-digit checksum representing a hex number. The checksum is the Exclusive OR of all characters between the '$' and '*'. According to the official specification, the checksum is optional for most data sentences, but is compulsory for RMA, RMB, and RMC (among others).
- <CR><LF> ends the message.
Example of sentence:
Waypoint Arrival Alarm
$GPAAM,A,A,0.10,N,WPTNME*32
Where:
GP Talker ID (GP for a GPS unit) AAM Arrival Alarm A Arrival circle entered A Perpendicular passed 0.10 Circle radius N Nautical miles WPTNME Waypoint name *32 Checksum data
A compound string from the NR203 GPS Receiver containing multiple messages. The actual messages decoded include…
- ZDA – Standard NMEA $..ZDA Time & Date message
- GLL – Standard NMEA $..GLL Geographic Position – Latitude/Longitude message
- NSV – NMEA message containing individual satellite information.
Typical ASCII String
$<CR><LF>
MRK,0<CR><LF>
ZDA,123336.8069,17,06,2001,13.0<CR><LF>
GLL,2924.11158,N,1211.07392,W, 75.97,M<CR><LF>
VTG,218.7,T,2.38,H,0.18,V<CR><LF>
SGD,-1.0,G,-1.0,M<CR><LF>
SYS,3T,9<CR><LF>
ZEV,0.28745E-006<CR><LF>
NSV,2,00,000,00,0.0,00.0,00,00,D<CR><LF>
NSV,7,00,000,00,0.0,00.0,00,00,D<CR><LF>
NSV,28,00,000,00,0.0,00.0,00,00,N<CR><LF>
NSV,1,00,000,00,0.0,00.0,00,00,D<CR><LF>
NSV,13,00,000,00,0.0,00.0,00,00,D<CR><LF>
NSV,4,00,000,00,0.0,00.0,00,00,N<CR><LF>
NSV,25,00,000,00,0.0,00.0,00,00,N<CR><LF>
NSV,0,00,000,00,0.0,00.0,00,00,N<CR><LF>
NSV,11,00,000,00,0.0,00.0,00,00,D<CR><LF>
NSV,0,00,000,00,0.0,00.0,00,00,N<CR><LF>
&
Description | Form | Field |
---|---|---|
Start Chars | "$" | 0 |
UTC of position fix | ZDA,hhmmss.ssss,dd,mm,yyyy | 1 |
Latitude in Degrees/Minutes | llll.lllll | 2 |
Direction of Lat | (N or S) | 3 |
Longitude in Degrees/Minutes | yyyy.yyyyy | 4 |
Direction of Lon | (E or W) | 5 |
Number of SVs | NSV | 6 |
Sat. i.d. number | NSV,n,… | 7 |
Repeated for “n” sats | ||
End Character | “&” |
The new standard, NMEA 2000, accommodates several "talkers" at a higher baud rate, without using a central hub.
The NMEA standard is proprietary and sells for at least US$ 270 as of August 2007. [1] However, much of it has been reverse-engineered from public sources and is available in references like gpsd and Dale DePriest's.
[edit] Vendor extensions
Most GPS manufacturers include special messages to the standard NMEA set in their products for maintenance and diagnostics purposes. These extended messages are not standardized at all and are normally different from vendor to vendor.
[edit] Software Compatibility
NMEA 0183 GPS compliant software:
- NetStumbler
- Rand McNally StreetFinder
- Magic e-Map
- NemaTalker NMEA instrument simulation
- Microsoft Streets & Trips 2008
- Serotonin Mango M2M (suitable for NMEA compliant weather stations)
- MapKing