46#define NMEA_PRINT(...) {};
49#if NMEA_PRINT == printf
86 while (
dev->char_available(
dev->periph)) {
135 bool msg_valid =
false;
205 NMEA_PRINT(
"nmea_parse_char: skipping incomplete msg: len=%i, \"%s\"\n\r",
218 NMEA_PRINT(
"nmea_parse_char: msg too long, len=%i, \"%s\"\n\r",
232 NMEA_PRINT(
"nmea_parse_char: this should not happen!");
267 NMEA_PRINT(
"p_GSA() - skipping empty message\n\r");
336 NMEA_PRINT(
"p_RMC() - skipping empty message\n\r");
388 NMEA_PRINT(
"p_GGA() - skipping empty message\n\r");
441 NMEA_PRINT(
"p_GGA() - POS_AVAILABLE == TRUE\n\r");
443 NMEA_PRINT(
"p_GGA() - gps_pos_available == false\n\r");
504 NMEA_PRINT(
"p_GSV() - skipping empty message\n\r");
528 NMEA_PRINT(
"p_GSV() - num_sat=%i\n\r", num_sat);
Main include for ABI (AirBorneInterface).
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Device independent GPS code (interface)
int16_t azim
azimuth in deg
uint32_t tow
GPS time of week in ms.
int32_t hmsl
height above mean sea level (MSL) in mm
int8_t elev
elevation in deg
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
struct EcefCoor_i ecef_pos
position in ECEF in cm
#define GPS_VALID_POS_LLA_BIT
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
uint16_t pdop
position dilution of precision scaled by 100
#define GPS_VALID_POS_ECEF_BIT
#define GPS_VALID_HMSL_BIT
uint32_t last_msg_time
cpu time in sec at last received GPS message
uint8_t svid
Satellite ID.
uint8_t nb_channels
Number of scanned satellites.
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
uint16_t gspeed
norm of 2d ground speed in cm/s
uint8_t valid_fields
bitfield indicating valid fields (GPS_VALID_x_BIT)
#define GPS_FIX_3D
3D GPS fix
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
#define GPS_VALID_COURSE_BIT
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
uint8_t num_sv
number of sat in fix
static bool nmea_parse_RMC(void)
Parse RMC NMEA messages.
bool nmea_parse_msg(void)
nmea_parse_char() has a complete line.
static bool nmea_parse_GSV(void)
Parse GSV-nmea-messages.
bool WEAK nmea_parse_prop_msg(void)
uint8_t nmea_calc_crc(const char *buff, int buff_sz)
Calculate control sum of binary buffer.
static bool nmea_parse_GSA(void)
Parse GSA NMEA messages.
void gps_nmea_event(void)
void WEAK nmea_parse_prop_init(void)
void WEAK nmea_configure(void)
The function to be called when a characted from the device is available.
void nmea_parse_char(uint8_t c)
This is the actual parser.
static bool nmea_parse_GGA(void)
Parse GGA NMEA messages.
NMEA protocol specific code.
#define GPS_NMEA_NB_CHANNELS
uint8_t status
line parser status
static void nmea_read_until(int *i)
Read until a certain character, placed here for proprietary includes.
bool have_gsv
flag set to TRUE if GPGSV message received
uint8_t gps_nb_ovrn
number if incomplete nmea-messages
bool msg_available
flag set to TRUE if a new msg/sentence is available to be parsed
bool is_configured
flag set to TRUE if configuration is finished
char msg_buf[NMEA_MAXLEN]
buffer for storing one nmea-line
int32_t lat
in degrees*1e7
int32_t alt
in millimeters above WGS84 reference ellipsoid
int32_t lon
in degrees*1e7
uint8_t buff[25]
Buffer used for general comunication over SPI (in buffer)
arch independent LED (Light Emitting Diodes) API
void ecef_of_lla_f(struct EcefCoor_f *out, struct LlaCoor_f *in)
Paparazzi floating point math for geodetic calculations.
float alt
in meters (normally above WGS84 reference ellipsoid)
vector in EarthCenteredEarthFixed coordinates
vector in Latitude, Longitude and Altitude
static const struct usb_device_descriptor dev
volatile uint32_t nb_sec
full seconds since startup
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.