The format and usage of NMEA 0183 data started back in March 1983, but its use and popularity on many vessels around the globe remain consistent. This article serves to help understand the specific intricacies of that data, and also to provide a clearer picture of what the data actually means and references when viewing it.
NMEA 0183 Sentences
NMEA 0183 Sentences are transmitted as ASCII characters, making them human-readable. All ASCII Characters are valid, except for those which are assigned for reserved characters (reference NMEA 0183 standard V4.30).
Only certain sentences are considered valid, which consist of Approved Parametric and Encapsulation sentences, Command sentences, Proprietary sentences and Query sentences. Any other form or format of sentence is considered invalid and should not be transmitted or output by any connected device.
This article will only focus on Parametric sentences, due to these being the most common, and the majority of approved sentences take this format.
Sentence structure
$ccccc,c–c*hh <CR><LF>
$TALKERID+SENTENCE FORMATTER, DATA FIELDS*CHECKSUM<CARRIAGE RETURN><LINE FEED>
This is an example of the NMEA 0183 GLL Sentence;
$–GLL,IIII.II,a,yyyyy.yy,a,hhmmss.ss,A,a*hh<CR><LF>
In this example, $ identifies that it is a parametric sentence, and ‘—’ is a placeholder for whatever the instrument outputting the sentence may be. For example, a GPS would be $GP. GLL here is the sentence formatter, telling us that it is a GLL message. Each data field after this is a data field, which is delimited using commas. Ending this sentence we have the checksum, followed by the carriage return and line feed which indicates the termination of the ASCII String/sentence.
With most of the NMEA 0183 messages following a general structure, there are certain rules they must follow;
- The sentence is limited to a maximum of 82 ASCII Characters, which compiles of 79 characters plus the starting delimiter and the ending <CR><LF>.
- A sentence will have a minimum of one field within it.
- There isn’t a specified limit on the number of fields you can have within a sentence, but this is of course limited by the maximum number of ASCII Characters supported in a single message.
- Every sentence will start with a delimiting character of ‘$’ or ‘!’, and will end with a terminating <CR><LF>.
There are certain specific sentences which may differ from the standard structure and have different restrictions. These are all documented within the NMEA’s 0183 standard.
Error detection
NMEA 0183 listener devices detect errors in data, such as;
- Invalid characters present in sentences
- Time out of sentence transfer
- Checksum error
- Invalid Talker ID length, sentence formatter and data fields
Thanks to the efficient error detection and handling methods, bandwidth is not massively consumed by invalid data. Intelligent instruments such as a GPS / AIS will only use the received data if it is valid, and consistent with the connected NMEA 0183 Talker.
For more on NMEA 0183 networking, download our free guide here.