The NMEA FAQ Version 6.3 April 25, 2000 Additions, corrections, and comments should be emailed to the author, Peter Bennett peterbb@interchange.ubc.ca Contents: 1. What is NMEA? 1.1 What is an NMEA Standard 1.2 NMEA Address 2. Electrical Interface 3. NMEA-0180 and NMEA-0182 3.1 Simple Format 3.2 Complex Format 4. NMEA-0183 4.1 General Sentence Format 4.2 Sentences sent by specific equipment 4.3 Sample Sentences Dissected 4.3.1 Standard Sentences 4.3.2 Garmin Proprietary Sentences 5. RS-232 connections 6. Troubleshooting 7. About the author 7.1 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 P.O. Box 3435 New Bern NC, 28564-3435 U.S.A. Phone: 919-638-2626 Fax: 919-638-4885 email: nmea@coastalnet.com web page: http://www4.coastalnet.com/nmea/default.html 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. Byte Data 1 $ 2 M | device 3 P | address 4 K = kilometres | cross track N = nautical miles | error U = microseconds | units 5 - 8 0 - 9 or . cross track error value 9 L or R cross track error position 10 T or M True or Magnetic bearing 11 - 13 0 - 9 bearing to next waypoint 14 - 23 12D34'56"N or present latitude 12D34.56'N 24 - 34 123D45'56"W or present longitude 123D45.67"W 35 non-ASCII status byte bit 0 = 1 for manual cycle lock 1 = 1 low SNR 2 = 1 cycle jump 3 = 1 blink 4 = 1 arrival alarm 5 = 1 discontinuity of TDs 6 = 1 always 36 "NUL" character (hex 80)(reserved status byte) 37 "ETX" character (hex 83) Any unavailable data is filled with "NUL" bytes. 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. Some common talker IDs are: GP Global Positioning System receiver LC Loran-C receiver OM Omega Navigation receiver II Integrated Instrumentation (eg. AutoHelm Seatalk system) 4.2 Sentences sent by specific equipment This section lists the sentence types used by various equipment. The format and data included in each sentence type is given in section 4.3. Eagle AccuNav Standard: RMB, RMC, GLL, APB Proprietary: PSLIB It also pretends it's a Loran, sending LCGLL, as well as GPGLL Garmin 12XL, NMEA-0183 V 1.5 Standard: RMB, RMC, WPL Proprietary: PGRMM (map datum), PGRMZ (altitude), PSLIB (DGPS ctrl) Garmin 12XL, NMEA-0183 V 2.0 Standard: GGA, GSA, GSV, RMB, RMC, RTE, WPL Proprietary: PGRME (estimated error) PGRMM, PSLIB Garmin GPS-38, NMEA-0183 V. 1.5 mode Standard: GLL, RMB, RMC, WPL, BOD, XTE, VTG, BWC Proprietary: PGRMM (map datum), PGRMZ (altitude), PSLIB (dgps ctrl) Garmin GPS-38, NMEA-0183 V. 2.0 mode Standard: GLL, RMB, RMC, WPL, BOD, GSA, GSV, RTE, GGA Proprietary: PGRME (estimated error), PGRMM, PGRMZ, PSLIB Garmin GPS-45 (and probably GPS-40 and GPS-90) Standard: BOD, GLL, RTE, RMB, RMC, GGA, GSA, GSV Proprietary: PGRME, PGRMM, PGRMZ Garmin GPS-65 (and probably GPS-75) Standard: BWC, GLL, RMB, RMC, R00, WPL, XTE, VTG Proprietary: PGRMM, PGRMZ, PSLIB Lowrance Global Map 100 Standard: GLL, RMC, RMB, APB, GGA, GSV Proprietary: PSLIB Magellan Trailblazer Standard: APB, BWC, GGA, GLL, RMB, RMC, VTG Trimble Ensign XL Standard: APA, BWC, BWR, GGA, GLL, RMB Trimble Flightmate Pro and Scoutmaster Standard: APA, APB, BWC, GGA, GLL, GSA, GSV, RMB, RMC, VTG, WCV, XTE, ZTC 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) Note that NMEA data can only be sent to, or received from, a SeaTalk system using AutoHelm's NMEA<->SeaTalk interface box, or those instruments that provide an NMEA-0183 interface. SeaTalk itself is not compatible with NMEA, and cannot be read with a normal PC serial port. Seatalk output: Standard: APB, BPI, BWC, VWR, VHW, DBT, GLL, HDM, HDT, HCS, MTW, VTG Seatalk input: Standard: APA, APB, RMB, XTE, XTR, BPI, BWR, BWC, BER, BEC,WDR, WDC, BOD, WCV, VHW, VWR, DBT 4.3 Sample Sentences Dissected 4.3.1 Standard Sentences A talker typically sends a group of sentences at intervals determined by the unit's update rate, but generally not more often than once per second. Characters following the "*" are a checksum. Checksums are optional for most sentences, according to the standard. APB - Autopilot format B APB,A,A,0.10,R,N,V,V,011,M,DEST,011,M,011,M A Loran-C blink/SNR warning A Loran-C cycle warning 0.10 cross-track error distance R steer Right to correct (or L for Left) N cross-track error units - nautical miles V arrival alarm - circle V arrival alarm - perpendicular 011,M magnetic bearing, origin to destination DEST destination waypoint ID 011,M magnetic bearing, present position to destination 011,M magnetic heading to steer (bearings could be given in True as 033,T) (note: some pilots, Roberston in particular, misinterpret "bearing from origin to destination" as "bearing from present position to destination". This apparently results in poor performance if the boat is sufficiently off-course that the two bearings are different.) BOD - Bearing - origin to destination waypoint BOD,045.,T,023.,M,DEST,START 045.,T bearing 045 True from "START" to "DEST" 023.,M breaing 023 Magnetic from "START" to "DEST" DEST destination waypoint ID START origin waypoint ID BWC - Bearing and distance to waypoint - great circle BWC,225444,4917.24,N,12309.57,W,051.9,T,031.6,M,001.3,N,004*29 225444 UTC time of fix 22:54:44 4917.24,N Latitude of waypoint 12309.57,W Longitude of waypoint 051.9,T Bearing to waypoint, degrees true 031.6,M Bearing to waypoint, degrees magnetic 001.3,N Distance to waypoint, Nautical miles 004 Waypoint ID BWR - Bearing and distance to waypoint - rhumb line (format same as BWC) DBT - Depth below transducer DBT,0017.6,f,0005.4,M 0017.6,f 17.6 feet 0005.4,M 5.4 Metres GGA - Global Positioning System Fix Data GGA,123519,4807.038,N,01131.324,E,1,08,0.9,545.4,M,46.9,M, , *42 123519 Fix taken at 12:35:19 UTC 4807.038,N Latitude 48 deg 07.038' N 01131.324,E Longitude 11 deg 31.324' E 1 Fix quality: 0 = invalid 1 = GPS fix 2 = DGPS fix 08 Number of satellites being tracked 0.9 Horizontal dilution of position 545.4,M Altitude, Metres, above mean sea level 46.9,M Height of geoid (mean sea level) above WGS84 ellipsoid (empty field) time in seconds since last DGPS update (empty field) DGPS station ID number GLL - Geographic position, Latitude and Longitude GLL,4916.45,N,12311.12,W,225444,A 4916.46,N Latitude 49 deg. 16.45 min. North 12311.12,W Longitude 123 deg. 11.12 min. West 225444 Fix taken at 22:54:44 UTC A Data valid (Garmin 65 does not include time and status) 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 HDM - Heading, Magnetic HDM,235.,M HDM Heading, Magnetic 235.,M Heading 235 deg. Magnetic (HDG, which includes deviation and variation, is recommended instead) HSC - Command heading to steer HSC,258.,T,236.,M 258.,T 258 deg. True 236.,M 136 deg. Magnetic MTW - Water temperature, Celcius MTW,11.,C 11.,C 11 deg. C 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.) RMB - Recommended minimum navigation information (sent by nav. receiver when a destination waypoint is active) RMB,A,0.66,L,003,004,4917.24,N,12309.57,W,001.3,052.5,000.5,V*0B A Data status A = OK, V = warning 0.66,L Cross-track error (nautical miles, 9.9 max.), steer Left to correct (or R = right) 003 Origin waypoint ID 004 Destination waypoint ID 4917.24,N Destination waypoint latitude 49 deg. 17.24 min. N 12309.57,W Destination waypoint longitude 123 deg. 09.57 min. W 001.3 Range to destination, nautical miles 052.5 True bearing to destination 000.5 Velocity towards destination, knots V Arrival alarm A = arrived, V = not arrived *0B mandatory checksum RMC - Recommended minimum specific GPS/Transit data RMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68 225446 Time of fix 22:54:46 UTC A Navigation receiver warning A = OK, V = warning 4916.45,N Latitude 49 deg. 16.45 min North 12311.12,W Longitude 123 deg. 11.12 min West 000.5 Speed over ground, Knots 054.7 Course Made Good, True 191194 Date of fix 19 November 1994 020.3,E Magnetic variation 20.3 deg East *68 mandatory checksum RTE - Waypoints in active route RTE,2,1,c,0,W3IWI,DRIVWY,32CEDR,32-29,32BKLD,32-I95,32-US1,BW-32,BW-198*69 2 two sentences for full data 1 this is sentence 1 of 2 c c = complete list of waypoints in this route w = first listed waypoint is start of current leg 0 Route identifier W3IWI... Waypoint identifiers VHW - Water speed and heading VHW,259.,T,237.,M,05.00,N,09.26,K 259.,T Heading 259 deg. True 237.,M Heading 237 deg. Magnetic 05.00,N Speed 5 knots through the water 09.26,K Speed 9.26 KPH VWR - Relative wind direction and speed VWR,148.,L,02.4,N,01.2,M,04.4,K 148.,L Wind from 148 deg Left of bow 02.4,N Speed 2.4 Knots 01.2,M 1.2 Metres/Sec 04.4,K Speed 4.4 Kilometers/Hr VTG - Track made good and ground speed VTG,054.7,T,034.4,M,005.5,N,010.2,K 054.7,T True track made good 034.4,M Magnetic track made good 005.5,N Ground speed, knots 010.2,K Ground speed, Kilometers per hour WCV - Waypoint Closure Velocity WDC - Distance to Waypoint WDR - Waypoint Distance, Rhumb Line 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. XTE - Cross track error, measured XTE,A,A,0.67,L,N A General warning flag V = warning (Loran-C Blink or SNR warning) A Not used for GPS (Loran-C cycle lock flag) 0.67 cross track error distance L Steer left to correct error (or R for right) N Distance units - Nautical miles XTR - Cross-Track Error - Dead Reckoning XTR,0.67,L,N 0.67 cross track error distance L Steer left to correct error (or R for right) N Distance units - Nautical miles 4.3.2 Proprietary Sentences The following are Garmin proprietary sentences. "P" denotes proprietary, "GRM" is Garmin's manufacturer code, and "M" or "Z" indicates the specific sentence type. $PGRME,15.0,M,45.0,M,25.0,M*22 15.0,M Estimated horizontal position error in metres (HPE) 45.0,M Estimated vertical error (VPE) in metres 25.0,M Overall spherical equivalent position error $PGRMZ,93,f,3*21 93,f Altitude in feet 3 Position fix dimensions 2 = user altitude 3 = GPS altitude This sentence shows in feet, regardless of units shown on the display. $PGRMM,NAD27 Canada*2F Currently active horizontal datum 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) Serial Port Connections Computer (DTE) Modem DB-25 DE-9 Signal Direction DB-25 2 3 Tx Data -> 2 3 2 Rx Data <- 3 4 7 Request to send -> 4 5 8 Clear to send <- 5 6 6 Data Set Ready <- 6 7 5 signal ground 7 8 1 Data CarrierDetect <- 8 20 4 Data Terminal Ready -> 20 22 9 Ring Indicator <- 22 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. 7. About the author This FAQ was written by: Peter Bennett peterbb@interchange.ubc.ca I have an Web site containing this file, a GPS FAQ, and other NMEA information files and PC programs for capturing and displaying NMEA data, and related things: http://vancouver-webpages.com/peter This site is mirrored in Germany at: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html 7.1 Acknowlegments I would like to thank the following for their contributions or corrections to this document: Tom Clark, clark@tomcat.gsfc.nasa.gov Bob Shearer, t.shearer@unixa.nerc-wallingford.ac.uk David Steckler, davidst@nobeltec.com Karl Olmstead, olmstead@ridgecrest.ca.us Dave Wells, KD6TO, davew@cruzio.com Mike Morrow, caveman@castles.com
file: /Techref/io/sensor/pos/gps/nmeafaq.txt, 27KB, , updated: 2001/1/5 13:27, local time: 2024/8/21 12:35,
3.15.147.144:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://piclist.com/tecHREF/io/sensor/pos/gps/nmeafaq.txt"> io sensor pos gps nmeafaq</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to piclist.com! |
.