Paparazzi UAS
v5.8.2_stable-0-g6260b7c
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_NB_CHANNELS 12 |
#define | NMEA_MAXLEN 255 |
Functions | |
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... | |
void | 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) |
void | nmea_parse_prop_msg (void) |
void | gps_nmea_msg (void) |
static void | GpsEvent (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 39 of file gps_nmea.h.
Data Fields | ||
---|---|---|
uint8_t | gps_nb_ovrn | number if incomplete nmea-messages |
bool_t | have_gsv | flag set to TRUE if GPGSV message received |
bool_t | is_configured | flag set to TRUE if configuration is finished |
bool_t | msg_available | |
char | msg_buf[NMEA_MAXLEN] | buffer for storing one nmea-line |
int | msg_len | |
bool_t | pos_available | |
uint8_t | status | line parser status |
#define GPS_NB_CHANNELS 12 |
Definition at line 35 of file gps_nmea.h.
#define NMEA_MAXLEN 255 |
Definition at line 37 of file gps_nmea.h.
Referenced by nmea_parse_char().
void gps_nmea_msg | ( | void | ) |
Definition at line 83 of file gps_nmea.c.
References FALSE, GpsState::fix, get_sys_time_usec(), gps, GPS_FIX_3D, gps_nmea, GPS_NMEA_ID, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, GpsState::last_msg_ticks, GpsState::last_msg_time, GpsNmea::msg_available, sys_time::nb_sec, sys_time::nb_sec_rem, nmea_parse_msg(), and GpsNmea::pos_available.
Referenced by GpsEvent().
|
inlinestatic |
Definition at line 68 of file gps_nmea.h.
References link_device::char_available, dev, link_device::get_byte, gps_nmea, gps_nmea_msg(), GpsNmea::is_configured, GpsNmea::msg_available, nmea_configure(), nmea_parse_char(), and link_device::periph.
uint8_t nmea_calc_crc | ( | const char * | buff, |
int | buff_sz | ||
) |
Calculate control sum of binary buffer.
Definition at line 225 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 buf, crc, furuno_cfg_cnt, gps_furuno_settings, GPS_FURUNO_SETTINGS_NB, gps_nmea, GpsLinkDevice, GpsNmea::is_configured, nmea_calc_crc(), and TRUE.
Referenced by gps_impl_init(), and GpsEvent().
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 156 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, TRUE, and WAIT.
Referenced by GpsEvent().
void 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 119 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, TRUE, and WAIT.
Referenced by gps_nmea_msg().
void nmea_parse_prop_init | ( | void | ) |
Definition at line 89 of file gps_furuno.c.
References furuno_cfg_cnt.
Referenced by gps_impl_init().
void nmea_parse_prop_msg | ( | void | ) |
Definition at line 95 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 85 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 62 of file gps_nmea.c.
Referenced by gps_impl_init(), gps_nmea_msg(), GpsEvent(), nmea_configure(), 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().