#include "nmeap_def.h"
Go to the source code of this file.
Data Structures | |
struct | nmeap_gga |
struct | nmeap_rmc |
Defines | |
#define | NMEAP_MAX_SENTENCES 8 |
#define | NMEAP_MAX_SENTENCE_NAME_LENGTH 5 |
#define | NMEAP_MAX_SENTENCE_LENGTH 255 |
#define | NMEAP_MAX_TOKENS 24 |
#define | NMEAP_GPGGA 1 |
#define | NMEAP_GPRMC 2 |
#define | NMEAP_USER 100 |
Typedefs | |
typedef void(* | nmeap_callout_t )(struct nmeap_context *context, void *sentence_data, void *user_data) |
typedef int(* | nmeap_sentence_parser_t )(struct nmeap_context *context, struct nmeap_sentence *sentence) |
typedef nmeap_gga | nmeap_gga_t |
typedef nmeap_rmc | nmeap_rmc_t |
Functions | |
int | nmeap_init (nmeap_context_t *context, void *user_data) |
int | nmeap_addParser (nmeap_context_t *context, const char *sentence_name, nmeap_sentence_parser_t sentence_parser, nmeap_callout_t sentence_callout, void *sentence_data) |
int | nmeap_parseBuffer (nmeap_context_t *context, const char *buffer, int *length) |
int | nmeap_parse (nmeap_context_t *context, char ch) |
int | nmeap_gpgga (nmeap_context_t *context, nmeap_sentence_t *sentence) |
int | nmeap_gprmc (nmeap_context_t *context, nmeap_sentence_t *sentence) |
double | nmeap_latitude (const char *plat, const char *phem) |
double | nmeap_longitude (const char *plat, const char *phem) |
|
|
|
|
|
max length of a complete sentence. the standard says 82 bytes, but its probably better to go at least 128 since some units don't adhere to the 82 bytes especially for proprietary sentences |
|
length of sentence name. leave this at 5 unless you really know what you are doing |
|
maximum number of sentence parsers supported |
|
max tokens in one sentence. 24 is enough for any standard sentence |
|
user defined parsers should make ID numbers using NMEAP_USER as the base value, plus some increment |
|
sentence callout function type a callout is fired for each registered sentence type the callout gets the object context and a pointer to sentence specific data. the callout must cast the 'sentence_data' to the appropriate type for that callout
|
|
|
|
|
|
sentence parser function type stored in the object context and called internally when the sentence name matches the specified value the callout gets the object context and a pointer to sentence specific data. the callout must cast the 'sentence_data' to the appropriate type for that callout
|
|
register an NMEA sentence parser
|
|
built-in parser for GGA sentences.
|
|
built-in parser for RMC sentences.
|
|
initialize an NMEA parser. call this function to initialize a user allocated context object
|
|
extract latitude from 2 tokens in ddmm.mmmm,h format.
|
|
extract longitude from 2 tokens in ddmm.mmmm,h format.
|
|
parse one character of nmea data.
|
|
parse a buffer of nmea data.
|