Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/gps/gps_ubx.h"
#include "modules/core/abi.h"
#include "pprzlink/dl_protocol.h"
#include "led.h"
#include "ubx_protocol.h"
Go to the source code of this file.
Macros | |
#define | USE_GPS_UBX_RTCM 0 |
#define | DEBUG_PRINT(...) {} |
#define | UNINIT 0 |
Includes macros generated from ubx.xml. | |
#define | GOT_SYNC1 1 |
#define | GOT_SYNC2 2 |
#define | GOT_CLASS 3 |
#define | GOT_ID 4 |
#define | GOT_LEN1 5 |
#define | GOT_LEN2 6 |
#define | GOT_PAYLOAD 7 |
#define | GOT_CHECKSUM1 8 |
#define | RXM_RTCM_VERSION 0x02 |
#define | NAV_RELPOSNED_VERSION 0x01 |
#define | GPS_UBX_ERR_NONE 0 |
#define | GPS_UBX_ERR_OVERRUN 1 |
#define | GPS_UBX_ERR_MSG_TOO_LONG 2 |
#define | GPS_UBX_ERR_CHECKSUM 3 |
#define | GPS_UBX_ERR_UNEXPECTED 4 |
#define | GPS_UBX_ERR_OUT_OF_SYNC 5 |
#define | UTM_HEM_NORTH 0 |
#define | UTM_HEM_SOUTH 1 |
#define | GPS_UBX_BOOTRESET 0 |
#define | CFG_RST_Reset_Hardware 0x00 |
#define | CFG_RST_Reset_Controlled 0x01 |
#define | CFG_RST_Reset_Controlled_GPS_only 0x02 |
#define | CFG_RST_Reset_Controlled_GPS_stop 0x08 |
#define | CFG_RST_Reset_Controlled_GPS_start 0x09 |
#define | CFG_RST_BBR_Hotstart 0x0000 |
#define | CFG_RST_BBR_Warmstart 0x0001 |
#define | CFG_RST_BBR_Coldstart 0xffff |
#define | gps_ubx_ucenter_event() {} |
Variables | |
struct GpsUbx | gps_ubx [GPS_UBX_NB] |
uint8_t | gps_ubx_reset = 0 |
void gps_ublox_write | ( | struct link_device * | dev, |
uint8_t * | buff, | ||
uint32_t | n | ||
) |
Definition at line 137 of file gps_ubx.c.
References CFG_RST_BBR_Coldstart, CFG_RST_BBR_Hotstart, CFG_RST_BBR_Warmstart, CFG_RST_Reset_Controlled, DEBUG_PRINT, dev, GpsUbx::dev, foo, gps_ubx, gps_ubx_msg(), GPS_UBX_NB, gps_ubx_parse(), gps_ubx_reset, reset, and ubx_send_cfg_rst().
Definition at line 115 of file gps_ubx.c.
References GpsState::comp_id, GpsUbx::dev, GpsUbx::error_cnt, GpsUbx::error_last, foo, gps_ubx, GPS_UBX2_ID, GPS_UBX_BOOTRESET, GPS_UBX_ERR_NONE, GPS_UBX_ID, GPS_UBX_NB, gps_ubx_reset, GpsUbx::msg_available, GpsUbx::pacc_valid, GpsUbx::state, GpsUbx::status, and UNINIT.
Definition at line 665 of file gps_ubx.c.
References foo, get_sys_time_usec(), GPS_FIX_3D, gps_ubx_read_message(), gps_ubx_ucenter_event, GPS_VALID_VEL_NED_BIT, LED_ON, LED_TOGGLE, sys_time::nb_sec, and sys_time::nb_sec_rem.
Referenced by gps_ubx_event().
Definition at line 519 of file gps_ubx.c.
References foo, GOT_CHECKSUM1, GOT_CLASS, GOT_ID, GOT_LEN1, GOT_LEN2, GOT_PAYLOAD, GOT_SYNC1, GOT_SYNC2, GPS_UBX_ERR_CHECKSUM, GPS_UBX_ERR_MSG_TOO_LONG, GPS_UBX_ERR_OUT_OF_SYNC, GPS_UBX_ERR_OVERRUN, GPS_UBX_ERR_UNEXPECTED, GPS_UBX_MAX_PAYLOAD, pprzLogFile, and UNINIT.
Referenced by gps_ubx_event().
This code simulates gps_ubx.c:parse_ubx()
Definition at line 164 of file gps_ubx.c.
References GpsUbx::error_cnt, GpsUbx::error_last, foo, gps_ubx, GPS_UBX_ERR_OVERRUN, GpsUbx::msg_available, GpsUbx::msg_class, and GpsUbx::msg_id.
Definition at line 275 of file gps_ubx.c.
References foo, and GPS_VALID_POS_ECEF_BIT.
Referenced by gps_ubx_read_message().
Definition at line 290 of file gps_ubx.c.
References foo, GPS_VALID_HMSL_BIT, and GPS_VALID_POS_LLA_BIT.
Referenced by gps_ubx_read_message().
Definition at line 307 of file gps_ubx.c.
References foo, GPS_VALID_HMSL_BIT, GPS_VALID_POS_UTM_BIT, and UTM_HEM_SOUTH.
Referenced by gps_ubx_read_message().
Definition at line 180 of file gps_ubx.c.
References foo, GPS_VALID_COURSE_BIT, GPS_VALID_HMSL_BIT, GPS_VALID_POS_LLA_BIT, GPS_VALID_VEL_NED_BIT, and gps_week_number().
Referenced by gps_ubx_read_message().
Definition at line 413 of file gps_ubx.c.
References foo, get_sys_time_usec(), NAV_RELPOSNED_VERSION, RelPosNED::reference_id, and RTCMgetbitu().
Referenced by gps_ubx_read_message().
Definition at line 377 of file gps_ubx.c.
References foo, GPS_NB_CHANNELS, and Min.
Referenced by gps_ubx_read_message().
Definition at line 243 of file gps_ubx.c.
References foo, GPS_FIX_3D, GPS_VALID_POS_ECEF_BIT, and GPS_VALID_VEL_ECEF_BIT.
Referenced by gps_ubx_read_message().
Definition at line 401 of file gps_ubx.c.
References foo, and GPS_FIX_3D.
Referenced by gps_ubx_read_message().
Definition at line 361 of file gps_ubx.c.
References foo, GPS_NB_CHANNELS, and Min.
Referenced by gps_ubx_read_message().
Definition at line 340 of file gps_ubx.c.
References foo, GPS_VALID_COURSE_BIT, and GPS_VALID_VEL_NED_BIT.
Referenced by gps_ubx_read_message().
Definition at line 326 of file gps_ubx.c.
References foo, and GPS_VALID_VEL_ECEF_BIT.
Referenced by gps_ubx_read_message().
Definition at line 695 of file gps_ubx.c.
References gps_periodic_check(), gps_ubx, GPS_UBX_NB, and state.
Definition at line 460 of file gps_ubx.c.
References foo, gps_ubx_parse_nav_posecef(), gps_ubx_parse_nav_posllh(), gps_ubx_parse_nav_posutm(), gps_ubx_parse_nav_pvt(), gps_ubx_parse_nav_relposned(), gps_ubx_parse_nav_sat(), gps_ubx_parse_nav_sol(), gps_ubx_parse_nav_status(), gps_ubx_parse_nav_svinfo(), gps_ubx_parse_nav_velned(), and gps_ubx_parse_velecef().
Referenced by gps_ubx_msg().
void ubx_header | ( | struct link_device * | dev, |
uint8_t | nav_id, | ||
uint8_t | msg_id, | ||
uint16_t | len | ||
) |
Definition at line 615 of file gps_ubx.c.
References dev, foo, gps_ubx, GPS_UBX_NB, GpsUbx::send_ck_a, GpsUbx::send_ck_b, and ubx_send_1byte().
|
static |
Definition at line 603 of file gps_ubx.c.
References byte, dev, gps_ubx, GPS_UBX_NB, GpsUbx::send_ck_a, and GpsUbx::send_ck_b.
Referenced by ubx_header(), and ubx_send_bytes().
void ubx_send_bytes | ( | struct link_device * | dev, |
uint8_t | len, | ||
uint8_t * | bytes | ||
) |
Definition at line 644 of file gps_ubx.c.
References dev, and ubx_send_1byte().
void ubx_send_cfg_rst | ( | struct link_device * | dev, |
uint16_t | bbr, | ||
UNUSED uint8_t | reset_mode | ||
) |
Definition at line 652 of file gps_ubx.c.
Referenced by gps_ubx_event().
void ubx_trailer | ( | struct link_device * | dev | ) |
Definition at line 632 of file gps_ubx.c.
References dev, gps_ubx, GPS_UBX_NB, GpsUbx::send_ck_a, and GpsUbx::send_ck_b.
struct GpsUbx gps_ubx[GPS_UBX_NB] |
Definition at line 76 of file gps_ubx.c.
Referenced by ArduIMU_periodicGPS(), gps_ubx_event(), gps_ubx_init(), gps_ubx_parse_HITL_UBX(), gps_ubx_periodic_check(), gps_ubx_ucenter_event(), ubx_header(), ubx_send_1byte(), and ubx_trailer().
uint8_t gps_ubx_reset = 0 |
Definition at line 77 of file gps_ubx.c.
Referenced by gps_ubx_event(), and gps_ubx_init().