logo资料库

NMEA0183协议.pdf

第1页 / 共28页
第2页 / 共28页
第3页 / 共28页
第4页 / 共28页
第5页 / 共28页
第6页 / 共28页
第7页 / 共28页
第8页 / 共28页
资料共28页,剩余部分请下载后查看
The NMEA 0183 Protocol Table of Contents 1. What is the NMEA 0183 Standard? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . page 1 Electrical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. 3. General Sentence Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Talker Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Sentence Identifiers and Sentence Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5. 6. Some Proprietary Sentences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 7. Manufacturer Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 The material presented in this document has been compiled from various inofficial sources. It is neither a complete nor error-free description of the NMEA 0183 standard. In particular, it does not cover the new sentences and the high-speed interface defined in version 3.x. Klaus Betke, May 2000. Revised August 2001. 1. What is the NMEA 0183 Standard? The National Marine Electronics Association (NMEA) is a non-profit association of manufacturers, distributors, dealers, educational institutions, and others interested in peripheral marine electronics occupations. The NMEA 0183 standard defines an electrical interface and data protocol for communications between marine instrumentation. NMEA 0183 is a voluntary industry standard, first released in March of 1983. It has been updated from time to time; the latest release, currently (August 2001) Version 3.0, July 2001, is available from the NMEA office (Warning: the price for non-members is 250 US$). P O Box 3435 New Bern NC 28564-3435 USA www.nmea.org NMEA has also established a working group to develop a new standard for data communications among shipboard electronic devices. The new standard, NMEA 2000, is a bi-directional, multi-transmitter, multi-receiver serial data network. It is multi-master and self-configuring, and there is no central controller. The NMEA began a beta testing period in January 2000 with eleven manufacturers. A release version of NMEA 2000 is expected in 2001.
The NMEA 0183 Protocol 2. Electrical Interface 2 NMEA 0183 devices are designated as either talkers or listeners (with some devices being both), employing an asynchronous serial interface with the following parameters: Baud rate: Number of data bits: Stop bits: Parity: Handshake: 4800 8 (bit 7 is 0) 1 (or more) none none NMEA 0183 allows 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 standard dos not specify the use of a particular connector. Note: The new 0183-HS standard (HS = high speed) introduced in version 3.0 uses a 3-wire interface and a baud rate of 38400. This type of interface is not discussed here. Its is recommended that the talker output comply with EIA RS-422, a differential system with two signal lines, "A" and "B". Differential drive signals have no reference to ground and are more immune to noise. However, a single-ended line at TTL level is accepted as well. The voltages on the A line correspond to those on the TTL single wire, while the B voltages are inverted (when output A is at +5 V, output B is at 0 V, and vice versa. This is the unipolar RS-422 operation. In bipolar mode ±5 V are used). 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 RS-422 "A" wire may be directly connected to a computer's RS-232 input. In fact even many of the latest products, like hand-held GPS receivers, do not have a RS-422 differential output, but just a single line with TTL or 5 V CMOS compatible signal level. 3. General Sentence Format All data is transmitted in the form of sentences. Only printable ASCII characters are allowed, plus CR (carriage return) and LF (line feed). Each sentence starts with a "$" sign and ends with . There are three basic kinds of sentences: talker sentences, proprietary sentences and query sentences. Talker Sentences. The general format for a talker sentence is: $ttsss,d1,d2,.... The first two letters following the „$” are the talker identifier. The next three characters (sss) are the sentence identifier, followed by a number of data fields separated by commas, followed by an optional checksum, and terminated by carriage return/line feed. The data fields are uniquely defined for each sentence type. An example talker sentence is: $HCHDM,238,M where "HC" specifies the talker as being a magnetic compass, the "HDM" specifies the magnetic heading message follows. The "238" is the heading value, and "M" designates the heading value as magnetic. A sentence may contain up to 80 characters plus "$" and CR/LF. If data for a field is not available, the field is omitted, but the delimiting commas are still sent, with no space between them. The checksum field consists of a "*" and two hex digits representing the exclusive OR of all characters between, but not including, the "$" and "*". Proprietary 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 proprietary sentences, mainly from Garmin, Inc., are listed in chapter 6.
The NMEA 0183 Protocol 3 Query sentences. A query sentence is a means for a listener to request a particular sentence from a talker. The general format is: $ttllQ,sss,[CR][LF] The first two characters of the address field are the talker identifier of the requester and the next two characters are the talker identifier of the device being queried (listener). The fifth character is always a "Q" defining the message as a query. The next field (sss) contains the three letter mnemonic of the sentence being requested. An example query sentence is: $CCGPQ,GGA where the "CC" device (computer) is requesting from the "GP" device (a GPS unit) the "GGA" sentence. The GPS will then transmit this sentence once per second until a different query is requested. 4. Talker Identifiers Autopilot - General Autopilot - Magnetic Communications – Digital Selective Calling (DSC) Communications – Receiver / Beacon Receiver Communications – Satellite Communications – Radio-Telephone (MF/HF) Communications – Radio-Telephone (VHF) Communications – Scanning Receiver Direction Finder Electronic Chart Display & Information System (ECDIS) Emergency Position Indicating Beacon (EPIRB) Engine Room Monitoring Systems Global Positioning System (GPS) Heading – Magnetic Compass Heading – North Seeking Gyro AG AP CD CR CS CT CV CX DF EC EP ER GP HC HE HN Heading – Non North Seeking Gyro II IN LC P RA SD SN SS TI VD DM VW WI YX ZA ZC ZQ ZV Integrated Instrumentation Integrated Navigation Loran C Proprietary Code RADAR and/or ARPA Sounder, Depth Electronic Positioning System, other/general Sounder, Scanning Turn Rate Indicator Velocity Sensor, Doppler, other/general Velocity Sensor, Speed Log, Water, Magnetic Velocity Sensor, Speed Log, Water, Mechanical Weather Instruments Transducer Timekeeper – Atomic Clock Timekeeper – Chronometer Timekeeper – Quartz Timekeeper – Radio Update, WWV or WWVH
The NMEA 0183 Protocol 4 5. Sentence Identifiers and Formats AAM Waypoint Arrival Alarm 1 2 3 4 5 6 | | | | | | $--AAM,A,A,x.x,N,c--c*hh 1) Status, BOOLEAN, A = Arrival circle entered 2) Status, BOOLEAN, A = perpendicular passed at waypoint 3) Arrival circle radius 4) Units of radius, nautical miles 5) Waypoint ID 6) Checksum ALM GPS Almanac Data 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | | | | | | | | | | | | | | | | $--ALM,x.x,x.x,xx,x.x,hh,hhhh,hh,hhhh,hhhh,hhhhhh,hhhhhh,hhhhhh,hhhhhh,hhh,hhh,*hh 1) Total number of messages 2) Message Number 3) Satellite PRN number (01 to 32) 4) GPS Week Number: Date and time in GPS is computed as number of weeks from 6 January 1980 plus number of seconds into the week. 5) SV health, bits 17-24 of each almanac page 6) Eccentricity 7) Almanac Reference Time 8) Inclination Angle 9) Rate of Right Ascension 10) Root of semi-major axis 11) Argument of perigee 12) Longitude of ascension node 13) Mean anomaly 14) F0 Clock Parameter 15) F1 Clock Parameter 16) Checksum APA Autopilot Sentence "A" 1 2 3 4 5 6 7 8 9 10 11 | | | | | | | | | | | $--APA,A,A,x.xx,L,N,A,A,xxx,M,c---c*hh 1) Status V = LORAN-C Blink or SNR warning A = general warning flag or other navigation systems when a reliable fix is not available 2) Status V = Loran-C Cycle Lock warning flag A = OK or not used 3) Cross Track Error Magnitude 4) Direction to steer, L or R 5) Cross Track Units (Nautic miles or kilometres) 6) Status A = Arrival Circle Entered 7) Status A = Perpendicular passed at waypoint 8) Bearing origin to destination 9) M = Magnetic, T = True 10) Destination Waypoint ID 11) checksum
The NMEA 0183 Protocol 5 Autopilot Sentence "B" APB 13 15 1 2 3 4 5 6 7 8 9 10 11 12| 14| | | | | | | | | | | | | | | | $--APB,A,A,x.x,a,N,A,A,x.x,a,c--c,x.x,a,x.x,a*hh 1) Status V = LORAN-C Blink or SNR warning A = general warning flag or other navigation systems when a reliable fix is not available 2) Status V = Loran-C Cycle Lock warning flag A = OK or not used 3) Cross Track Error Magnitude 4) Direction to steer, L or R 5) Cross Track Units, N = Nautical Miles 6) Status A = Arrival Circle Entered 7) Status A = Perpendicular passed at waypoint 8) Bearing origin to destination 9) M = Magnetic, T = True 10) Destination Waypoint ID 11) Bearing, present position to Destination 12) M = Magnetic, T = True 13) Heading to steer to destination waypoint 14) M = Magnetic, T = True 15) Checksum ASD Autopilot System Data Format unknown Bearing & Distance to Waypoint – Dead Reckoning BEC 12 1 2 3 4 5 6 7 8 9 10 11| 13 | | | | | | | | | | | | | $--BEC,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c*hh 1) Time (UTC) 2) Waypoint Latitude 3) N = North, S = South 4) Waypoint Longitude 5) E = East, W = West 6) Bearing, True 7) T = True 8) Bearing, Magnetic 9) M = Magnetic 10) Nautical Miles 11) N = Nautical Miles 12) Waypoint ID 13) Checksum
The NMEA 0183 Protocol 6 BOD Bearing – Waypoint to Waypoint 1 2 3 4 5 6 7 | | | | | | | $--BOD,x.x,T,x.x,M,c--c,c--c*hh 1) Bearing Degrees, TRUE 2) T = True 3) Bearing Degrees, Magnetic 4) M = Magnetic 5) TO Waypoint 6) FROM Waypoint 7) Checksum BWC Bearing and Distance to Waypoint – Latitude, N/S, Longitude, E/W, UTC, Status 11 1 2 3 4 5 6 7 8 9 10 | 12 13 | | | | | | | | | | | | | $--BWC,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c*hh 1) Time (UTC) 2) Waypoint Latitude 3) N = North, S = South 4) Waypoint Longitude 5) E = East, W = West 6) Bearing, True 7) T = True 8) Bearing, Magnetic 9) M = Magnetic 10) Nautical Miles 11) N = Nautical Miles 12) Waypoint ID 13) Checksum BWR Bearing and Distance to Waypoint – Rhumb Line Latitude, N/S, Longitude, E/W, UTC, Status 11 1 2 3 4 5 6 7 8 9 10 | 12 13 | | | | | | | | | | | | | $--BWR,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c*hh 1) Time (UTC) 2) Waypoint Latitude 3) N = North, S = South 4) Waypoint Longitude 5) E = East, W = West 6) Bearing, True 7) T = True 8) Bearing, Magnetic 9) M = Magnetic 10) Nautical Miles 11) N = Nautical Miles 12) Waypoint ID 13) Checksum
The NMEA 0183 Protocol 7 BWW Bearing – Waypoint to Waypoint 1 2 3 4 5 6 7 | | | | | | | $--BWW,x.x,T,x.x,M,c--c,c--c*hh 1) Bearing Degrees, TRUE 2) T = True 3) Bearing Degrees, Magnetic 4) M = Magnetic 5) TO Waypoint 6) FROM Waypoint 7) Checksum DBK Depth Below Keel 1 2 3 4 5 6 7 | | | | | | | $--DBK,x.x,f,x.x,M,x.x,F*hh 1) Depth, feet 2) f = feet 3) Depth, meters 4) M = meters 5) Depth, Fathoms 6) F = Fathoms 7) Checksum DBS Depth Below Surface 1 2 3 4 5 6 7 | | | | | | | $--DBS,x.x,f,x.x,M,x.x,F*hh 1) Depth, feet 2) f = feet 3) Depth, meters 4) M = meters 5) Depth, Fathoms 6) F = Fathoms 7) Checksum DBT Depth Below Transducer 1 2 3 4 5 6 7 | | | | | | | $--DBT,x.x,f,x.x,M,x.x,F*hh 1) Depth, feet 2) f = feet 3) Depth, meters 4) M = meters 5) Depth, Fathoms 6) F = Fathoms 7) Checksum DCN Decca Position obsolete
The NMEA 0183 Protocol 8 DPT Heading – Deviation & Variation 1 2 3 | | | $--DPT,x.x,x.x*hh 1) Depth, meters 2) Offset from transducer; positive means distance from transducer to water line, negative means distance from transducer to keel 3) Checksum DSC Digital Selective Calling Information Format unknown DSE Extended DSC Format unknown DSI DSC Transponder Initiate Format unknown DSR DSC Transponder Response Format unknown DTM Datum Reference Format unknown FSI Frequency Set Information 1 2 3 4 5 | | | | | $--FSI,xxxxxx,xxxxxx,c,x*hh 1) Transmitting Frequency 2) Receiving Frequency 3) Communications Mode (NMEA Syntax 2) 4) Power Level 5) Checksum GBS GPS Satellite Fault Detection Format unknown
分享到:
收藏