Khepera III Toolbox/The Toolbox/Modules/nmea

The nmea module parses a stream of NMEA 0183 messages.

Description
nmea_parser_init initializes a new NMEA parser. After initialization, the following hook functions can be set in the parser structure:
 * hook_process_message: Called whenever a complete and correct message is received.
 * hook_process_message_checksum_error: Called whenever a complete message with a wrong checksum is received. Such messages should be discarded.
 * hook_process_unrecognized_char: Called whenever a char which does not belong to a message is received.

Data must then be passed to nmea_parser_process_data, which parses the stream and calls the appropriate hook function.

Sending NMEA Messages
Sending NMEA messages is usually done by printing the corresponding values directly with printf. However, there may be situations in which you want to send an NMEA message structure as correctly formatted NMEA message. This is done as follows: