查看文章 |
http://www.gpsinformation.org/dale/nmea.htm 1 IntroductionThe National Marine Electronics Association (NMEA) has developed a specification that defines the interface between various pieces of marine electronic equipment. The standard permits marine electronics to send information to computers and to other marine equipment. A full copy of this standard is available for purchase at their web site. None of the information on this site comes from this standard and I do not have a copy. Anyone attempting to design anything to this standard should obtain an official copy. GPS receiver communication is defined within this specification. Most computer programs that provide real time position information understand and expect data to be in NMEA format. This data includes the complete PVT (position, velocity, time) solution computed by the GPS receiver. The idea of NMEA is to send a line of data called a sentence that is totally self contained and independent from other sentences. There are standard sentences for each device category and there is also the ability to define proprietary sentences for use by the individual company. All of the standard sentences have a two letter prefix that defines the device that uses that sentence type. (For gps receivers the prefix is GP.) which is followed by a three letter sequence that defines the sentence contents. In addition NMEA permits hardware manufactures to define their own proprietary sentences for whatever purpose they see fit. All proprietary sentences begin with the letter P and are followed with 3 letters that identifies the manufacturer controlling that sentence. For example a Garmin sentence would start with PGRM and Magellan would begin with PMGN. Each sentence begins with a '$' and ends with a carriage return/line feed sequence and can be no longer than 80 characters of visible text (plus the line terminators). The data is contained within this single line with data items separated by commas. The data itself is just ascii text and may extend over multiple sentences in certain specialized instances but is normally fully contained in one variable length sentence. The data may vary in the amount of precision contained in the message. For example time might be indicated to decimal parts of a second or location may be show with 3 or even 4 digits after the decimal point. Programs that read the data should only use the commas to determine the field boundaries and not depend on column positions. There is a provision for a checksum at the end of each sentence which may or may not be checked by the unit that reads the data. The checksum field consists of a '*' and two hex digits representing an 8 bit exclusive OR of all characters between, but not including, the '$' and '*'. A checksum is required on some sentences. There have been several changes to the standard but for gps use the only ones that are likely to be encountered are 1.5 and 2.0 through 2.3. These just specify some different sentence configurations which may be peculiar to the needs of a particular device thus the gps may need to be changed to match the devices being interfaced to. Some gps's provide the ability configure a custom set the sentences while other may offer a set of fixed choices. Many gps receivers simply output a fixed set of sentences that cannot be changed by the user. The current version of the standard is 3.01. I have no specific information on this version, but I am not aware of any GPS products that require conformance to this version. 2 NMEA sentencesNMEA consists of sentences, the first word of which, called a data type, defines the interpretation of the rest of the sentence. Each Data type would have its own unique interpretation and is defined in the NMEA standard. The GGA sentence (shown below) shows an example that provides essential fix data. Other sentences may repeat some of the same information but will also supply new data. Whatever device or program that reads the data can watch for the data sentence that it is interested in and simply ignore other sentences that is doesn't care about. In the NMEA standard there are no commands to indicate that the gps should do something different. Instead each receiver just sends all of the data and expects much of it to be ignored. Some receivers have commands inside the unit that can select a subset of all the sentences or, in some cases, even the individual sentences to send. There is no way to indicate anything back to the unit as to whether the sentence is being read correctly or to request a re-send of some data you didn't get. Instead the receiving unit just checks the checksum and ignores the data if the checksum is bad figuring the data will be sent again sometime later. There are many sentences in the NMEA standard for all kinds of devices that may be used in a Marine environment. Some of the ones that have applicability to gps receivers are listed below: (all message start with GP.)
Some gps receivers with special capabilities output these special messages.
3 Decode of selected position sentences RMC - NMEA has its own version of essential gps pvt (position, velocity, time) data. It is called RMC, The Recommended Minimum, which will look similar to: $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
Where:
RMC Recommended Minimum sentence C
123519 Fix taken at 12:35:19 UTC
A Status A=active or V=Void.
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
022.4 Speed over the ground in knots
084.4 Track angle in degrees True
230394 Date - 23rd of March 1994
003.1,W Magnetic Variation
*6A The checksum data, always begins with *
Note that, as of the 2.3 release of NMEA, there is a new field in the RMC sentence at the end just prior to the checksum. For more information on this field see here.
Knot (speed)From Wikipedia, the free encyclopediaJump to: navigation, search
"Knots" redirects here. For other uses, see Knot (disambiguation).
The knot is a unit of speed equal to one nautical mile per hour. Its kn abbreviation is preferred by American and Canadian maritime authorities, [1] [2] the Institute of Electrical and Electronics Engineers, and the International Bureau of Weights and Measures, [3] [4] however, the kt (knot) and kts (knots) abbreviations also are used. The knot is a non-SI unit accepted for use with the SI.[3] Worldwide, the knot is used in meteorology, and in maritime and air navigation — for example, a vessel travelling at 1 knot along a meridian, travels one minute of geographic latitude in one hour. Mariners first used the term knot denoting the measure of how many knots of line paid out in a given time using the chip log.
[edit] Definitions
1.852 km is the length of the internationally-agreed nautical mile. The U.S. adopted the international definition in 1954, having previously used the U.S. nautical mile (1,853.248 m).[6] The U.K. adopted the international nautical mile definition in 1970, having previously used the U.K. Admiralty nautical mile (6,080 ft [1,853.184 m]). The speeds of vessels relative to the fluids in which they travel (boat speeds and air speeds) are measured in knots. For consistency, the speeds of navigational fluids (tidal streams, river currents and wind speeds) are also measured in knots. Thus, speed over the ground (SOG) (ground speed (GS) in aircraft) and rate of progress towards a distant point ('velocity made good', VMG) are also given in knots. [edit] OriginUntil the mid-19th century vessel speed at sea was measured using a chip log. This consisted of a wooden panel, weighted on one edge to float upright and thus have substantial water resistance, attached by line to a reel. The chip log was "cast" over the stern of the moving vessel and the line allowed to pay out. Knots placed at a distance of 47 feet 3 inches (14.4018 m) passed through a sailor's fingers, while another sailor used a 30 second sandglass (28 second sandglass is the current accepted timing) to time the operation.[7] The knot count would be reported and used in the sailing master's dead reckoning and navigation. This method gives a value for the knot of 20.25 in/s, or 1.85166 km·h−1. The difference from the modern definition is less than 0.02%. [edit] Modern use |