Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
NMEA protocol specific code. More...
Go to the source code of this file.
Data Structures | |
struct | GpsNmea |
Macros | |
#define | GPS_NMEA_NB_CHANNELS 12 |
#define | NMEA_MAXLEN 255 |
#define | PRIMARY_GPS GPS_NMEA |
#define | gps_nmea_periodic_check() gps_periodic_check(&gps_nmea.state) |
Functions | |
void | gps_nmea_init (void) |
void | gps_nmea_event (void) |
void | nmea_configure (void) |
The function to be called when a characted from the device is available. More... | |
void | nmea_parse_char (uint8_t c) |
This is the actual parser. More... | |
bool | nmea_parse_msg (void) |
nmea_parse_char() has a complete line. More... | |
uint8_t | nmea_calc_crc (const char *buff, int buff_sz) |
Calculate control sum of binary buffer. More... | |
void | nmea_parse_prop_init (void) |
bool | nmea_parse_prop_msg (void) |
void | nmea_gps_msg (void) |
static void | nmea_read_until (int *i) |
Read until a certain character, placed here for proprietary includes. More... | |
Variables | |
struct GpsNmea | gps_nmea |
NMEA protocol specific code.
Definition in file gps_nmea.h.
struct GpsNmea |
Definition at line 43 of file gps_nmea.h.
Data Fields | ||
---|---|---|
uint8_t | gps_nb_ovrn | number if incomplete nmea-messages |
bool | have_gsv | flag set to TRUE if GPGSV message received |
bool | is_configured | flag set to TRUE if configuration is finished |
bool | msg_available | flag set to TRUE if a new msg/sentence is available to be parsed |
char | msg_buf[NMEA_MAXLEN] | buffer for storing one nmea-line |
int | msg_len | |
struct GpsState | state | |
uint8_t | status | line parser status |
#define GPS_NMEA_NB_CHANNELS 12 |
Definition at line 35 of file gps_nmea.h.
Referenced by gps_nmea_init().
#define gps_nmea_periodic_check | ( | ) | gps_periodic_check(&gps_nmea.state) |
Definition at line 60 of file gps_nmea.h.
#define NMEA_MAXLEN 255 |
Definition at line 37 of file gps_nmea.h.
Referenced by nmea_parse_char().
#define PRIMARY_GPS GPS_NMEA |
Definition at line 40 of file gps_nmea.h.
void gps_nmea_event | ( | void | ) |
Definition at line 78 of file gps_nmea.c.
References dev, gps_nmea, GpsNmea::is_configured, GpsNmea::msg_available, nmea_configure(), nmea_gps_msg(), and nmea_parse_char().
void gps_nmea_init | ( | void | ) |
Definition at line 66 of file gps_nmea.c.
References GpsNmea::gps_nb_ovrn, gps_nmea, GPS_NMEA_NB_CHANNELS, GpsNmea::have_gsv, GpsNmea::is_configured, GpsNmea::msg_available, GpsNmea::msg_len, GpsState::nb_channels, nmea_configure(), nmea_parse_prop_init(), and GpsNmea::state.
uint8_t nmea_calc_crc | ( | const char * | buff, |
int | buff_sz | ||
) |
Calculate control sum of binary buffer.
Definition at line 243 of file gps_nmea.c.
Referenced by nmea_configure().
void nmea_configure | ( | void | ) |
The function to be called when a characted from the device is available.
The function to be called when a characted from the device is available.
Sets gps_nmea.is_configured to TRUE if all config msgs are sent.
Definition at line 66 of file gps_furuno.c.
References crc, fd, furuno_cfg_cnt, gps_furuno_settings, GPS_FURUNO_SETTINGS_NB, gps_nmea, GpsLinkDevice, GpsNmea::is_configured, and nmea_calc_crc().
Referenced by gps_nmea_event(), and gps_nmea_init().
void nmea_gps_msg | ( | void | ) |
Definition at line 95 of file gps_nmea.c.
References GpsState::fix, get_sys_time_usec(), GPS_FIX_3D, gps_nmea, GPS_NMEA_ID, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, GpsState::last_msg_ticks, GpsState::last_msg_time, sys_time::nb_sec, sys_time::nb_sec_rem, nmea_parse_msg(), and GpsNmea::state.
Referenced by gps_nmea_event().
void nmea_parse_char | ( | uint8_t | c | ) |
This is the actual parser.
It reads one character at a time setting gps_nmea.msg_available to TRUE after a full line.
Definition at line 174 of file gps_nmea.c.
References GOT_CHECKSUM, GOT_END, GOT_START, gps_nmea, GpsNmea::msg_available, GpsNmea::msg_buf, GpsNmea::msg_len, NMEA_MAXLEN, NMEA_PRINT, GpsNmea::status, and WAIT.
Referenced by gps_nmea_event().
bool nmea_parse_msg | ( | void | ) |
nmea_parse_char() has a complete line.
Find out what type of message it is and hand it to the parser for that type.
Definition at line 133 of file gps_nmea.c.
References gps_nmea, GpsNmea::have_gsv, GpsNmea::msg_buf, GpsNmea::msg_len, nmea_parse_GGA(), nmea_parse_GSA(), nmea_parse_GSV(), nmea_parse_prop_msg(), nmea_parse_RMC(), NMEA_PRINT, GpsNmea::status, and WAIT.
Referenced by nmea_gps_msg().
void nmea_parse_prop_init | ( | void | ) |
Definition at line 90 of file gps_furuno.c.
References furuno_cfg_cnt.
Referenced by gps_nmea_init().
bool nmea_parse_prop_msg | ( | void | ) |
Definition at line 96 of file gps_furuno.c.
References gps_nmea, GpsNmea::msg_buf, GpsNmea::msg_len, and nmea_parse_perdcrv().
Referenced by nmea_parse_msg().
|
inlinestatic |
Read until a certain character, placed here for proprietary includes.
Definition at line 79 of file gps_nmea.h.
References gps_nmea, GpsNmea::msg_buf, and GpsNmea::msg_len.
Referenced by nmea_parse_GGA(), nmea_parse_GSA(), nmea_parse_GSV(), nmea_parse_perdcrv(), and nmea_parse_RMC().
struct GpsNmea gps_nmea |
Definition at line 59 of file gps_nmea.c.
Referenced by gps_nmea_event(), gps_nmea_init(), nmea_configure(), nmea_gps_msg(), nmea_parse_char(), nmea_parse_GGA(), nmea_parse_GSA(), nmea_parse_GSV(), nmea_parse_msg(), nmea_parse_perdcrv(), nmea_parse_prop_msg(), nmea_parse_RMC(), and nmea_read_until().