The NMEA Standard


Copyright © 21 Feb 2009 12:21 Flemming Bitz 

My status

Næsten alle GPS'er kan kommunikere med andet udstyr - feks. med en PC - vha. en såkaldt NMEA protokol.
I et følgende har jeg gengivet en artikel om NMEA-0183, som jeg har "sakset" fra http://www.marinecomputer.com/info.php?info_id=49. Artiklen er på engelsk.
Vil du have en mere detaljeret beskrivelse af NMEA standarden så se denne side: nmea.htm.

The NMEA-0183 standard has details for electrical specifications as well as protocol conventions. The electrical specifications actually recommend using the RS-422 standard which is slightly different than the RS-232 standard mentioned above. The RS-422 standard is a newer standard that specifies two wires each for transmitting and receiving for a total of four signal wires, while the older RS-232 standard specifies a common signal ground and one wire each for transmitting and receiving for a total of three signal wires. In most cases, an RS-422 signal coming from an electronic device will be able to be read by an RS-232 port on a computer.

The NMEA protocol is based on ASCII (American Standard Code for Information Interchange) characters being sent along the wire at 4800 bits per second or about 600 characters a second. Since any personal computer can read ASCII characters, it's easy to snoop on the NMEA transmission coming into your computer and see what it looks like. If you set up a direct connection to your COM port using Hyper Terminal (or a similar program), you see a stream of characters that looks something like this:

$GPGLL,4338.581,N,07015.101,W,170110,A*3D
$PGRMZ,4,f,3*1F
$PGRMM,WGS 84*06
$GPBOD,088.3,T,105.8,M,MANTIN,STHPTI*5B
$GPWPL,4347.000,N,06851.300,W,MANTIN*45
$GPRMC,170111,A,4338.581,N,07015.101,W,000.0,360.0,060199,017.5,W*73
$GPRMB,A,7.15,L,STHPTI,MANTIN,4347.000,N,06851.300,W,061.4,081.6,,V*1B
$GPGGA,170111,4338.581,N,07015.101,W,1,00,2.0,1.1,M,-31.8,M,,*71
$GPGSA,A,3,,,,,,,,,,,,,2.7,2.0,3.0*36
$GPGSV,2,1,08,03,17,171,42,06,21,047,44,14,28,251,45,16,25,292,44*71
$GPGSV,2,2,08,18,13,315,41,22,83,222,53,25,44,086,48,29,12,147,40*7C
$PGRME,15.0,M,22.5,M,15.0,M*1B

Each line is called an NMEA sentence. Each sentence starts with a $, followed by a two character "talker ID". In this case, the $GP indicates that the signal is coming from a GPS (a Garmin GPS45). The next three letters indicate the type of sentence that is being sent. Some common sentences are:
APB - Autopilot format B
BOD - Bearing - origin to destination waypoint
BWC - Bearing and distance to waypoint - great circle
BWR - Bearing and distance to waypoint - rhumb line
DBT - Depth below transducer
GGA - Global Positioning System Fix Data
GLL - Geographic position, Latitude and Longitude
GSA - GPS dilution of precision and active satellites
GSV - Satellites in view
HDM - Heading, Magnetic
HSC - Command heading to steer
MTW - Water temperature
RMB - Recommended minimum navigation information
RMC - Recommended minimum specific GPS/Transit data
RTE - Waypoints in active route
VWR - Relative wind direction and speed
VTG - Track made good and ground speed
WPL - waypoint location
XTE - Cross track error, measured

Notice that a few lines start with a $P followed by a GRM. These are called proprietary sentences. Each manufacturer has the option of sending out sentence types that aren't necessarily part of the NMEA standard protocol. In order to do this, the device needs to start the sentence with a $P and then follow it by a manufacturer ID (GRM in this case denoted Garmin), and then send any data they choose after that. In the lines above you'll see three proprietary Garmin sentences:
GRM - E which denotes estimated error
GRM - Z which denotes altitude
GRM - M which denotes map datum.

So by looking at the first line of the transmission, you can see a valid sentence being sent by a GPS ($GP), giving our geographic position in latitude and longitude (GLL), at 43° 38.581' North (4338.581,N), 70° 15.101' West (07015.101,W) at 17:01:10 UTC (170110). The last few characters indicate the validity of the data and include some error checking to make sure that the transmission wasn't garbled.

If you're interested in all of the details of the NMEA standard, you can order a copy of the standard from the National Marine Electronics Association by telephone: 252-638-2626 or on the web at http://www.nmea.org/. The price is currently $60 for members, and $125 for non-members. You can also find various other web sites that discuss the standard in detail and offer a good deal of information for free.

Service links:

Retur til forrige side
NETTE's Hjemmeside
Skriv eller læs NETTE's gæstebog
NETTE's fotogalleri


Copyright © 21 Feb 2009 12:21 Flemming Bitz