![]() ![]() ![]() ![]() By using a state machine the computer can easily keep track of where it is within the protocol as well as recover from any errors such as timeouts and checksum errors. The NMEA parser we are discussing is based on a simple state machine. Most protocols have a state machine tracking the protocol state and any errors that may occur during the data transfer. The specification also states valid characters and gives a table of these characters ranging from HEX 20 to HEX 7E.Īs stated in the NMEA 0183 specification version 3.01 the maximum number of characters shall be 82, consisting of a maximum of 79 characters between start of message "$" or "!" and terminating delimiter (HEX 0D and 0A). These characters assist in the formatting of the NMEA data string. The specification also has a set of reserved characters. NMEA data is sent in 8-bit ASCII where the MSB is set to zero (0). Please note that the specific NMEA sentences parsed are centric to a GPS device. A simple example written in C++ demonstrates this parser design. The techniques here can be applied on received data from a higher abstraction layer. This article makes no assumption of the media that the NMEA data is acquired. This article will reference the NMEA 0183 specification and it is recommended that the NMEA 0813 specification be available as a reference. The article does assume that the reader has knowledge in software design and has experience in some sort of programming language. It will try to show techniques in parsing and data integrity checking. This article will hopefully clarify some of the design tasks needed to parse through NMEA sentences robustly. However, the specification does not cover implementation and design. The NMEA 0813 standard for interfacing marine electronics devices specifies the NMEA data sentence structure as well as general definitions of approved sentences. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |