Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Macros | |
#define | UNINIT 0 |
Includes macros generated from ubx.xml. More... | |
#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 | 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_ucenter_event() {} |
Functions | |
void | gps_impl_init (void) |
GPS initialization. More... | |
void | gps_ubx_read_message (void) |
void | gps_ubx_parse (uint8_t c) |
static void | ubx_send_1byte (struct link_device *dev, uint8_t byte) |
void | ubx_header (struct link_device *dev, uint8_t nav_id, uint8_t msg_id, uint16_t len) |
void | ubx_trailer (struct link_device *dev) |
void | ubx_send_bytes (struct link_device *dev, uint8_t len, uint8_t *bytes) |
void | ubx_send_cfg_rst (struct link_device *dev, uint16_t bbr, uint8_t reset_mode) |
void | gps_ubx_msg (void) |
Variables | |
struct GpsUbx | gps_ubx |
#define GOT_CHECKSUM1 8 |
Definition at line 45 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_CLASS 3 |
Definition at line 40 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_ID 4 |
Definition at line 41 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_LEN1 5 |
Definition at line 42 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_LEN2 6 |
Definition at line 43 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_PAYLOAD 7 |
Definition at line 44 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_SYNC1 1 |
Definition at line 38 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GOT_SYNC2 2 |
Definition at line 39 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GPS_UBX_ERR_CHECKSUM 3 |
Definition at line 51 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GPS_UBX_ERR_MSG_TOO_LONG 2 |
Definition at line 50 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GPS_UBX_ERR_NONE 0 |
Definition at line 48 of file gps_ubx.c.
Referenced by gps_impl_init().
#define GPS_UBX_ERR_OUT_OF_SYNC 5 |
Definition at line 53 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GPS_UBX_ERR_OVERRUN 1 |
Definition at line 49 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define GPS_UBX_ERR_UNEXPECTED 4 |
Definition at line 52 of file gps_ubx.c.
Referenced by gps_ubx_parse().
#define gps_ubx_ucenter_event | ( | void | ) | {} |
Definition at line 318 of file gps_ubx.c.
Referenced by gps_ubx_msg().
#define UNINIT 0 |
Includes macros generated from ubx.xml.
Definition at line 37 of file gps_ubx.c.
Referenced by gps_impl_init(), and gps_ubx_parse().
#define UTM_HEM_SOUTH 1 |
Definition at line 56 of file gps_ubx.c.
Referenced by gps_ubx_read_message().
void gps_impl_init | ( | void | ) |
GPS initialization.
GPS model specific init implementation.
Definition at line 64 of file gps_ubx.c.
References GpsUbx::error_cnt, GpsUbx::error_last, FALSE, gps_ubx, GPS_UBX_ERR_NONE, GpsUbx::have_velned, GpsUbx::msg_available, GpsUbx::status, and UNINIT.
void gps_ubx_msg | ( | void | ) |
Definition at line 323 of file gps_ubx.c.
References FALSE, GpsState::fix, get_sys_time_usec(), gps, GPS_FIX_3D, gps_ubx, GPS_UBX_ID, gps_ubx_read_message(), gps_ubx_ucenter_event, GpsUbx::have_velned, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, GpsState::last_msg_ticks, GpsState::last_msg_time, GpsUbx::msg_available, GpsUbx::msg_class, GpsUbx::msg_id, sys_time::nb_sec, and sys_time::nb_sec_rem.
Referenced by GpsEvent().
void gps_ubx_parse | ( | uint8_t | c | ) |
Definition at line 192 of file gps_ubx.c.
References GpsUbx::ck_a, GpsUbx::ck_b, GpsUbx::error_cnt, GpsUbx::error_last, GOT_CHECKSUM1, GOT_CLASS, GOT_ID, GOT_LEN1, GOT_LEN2, GOT_PAYLOAD, GOT_SYNC1, GOT_SYNC2, gps_ubx, 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, GpsUbx::len, GpsUbx::msg_available, GpsUbx::msg_buf, GpsUbx::msg_class, GpsUbx::msg_id, GpsUbx::msg_idx, GpsUbx::status, TRUE, and UNINIT.
Referenced by GpsEvent().
void gps_ubx_read_message | ( | void | ) |
Definition at line 74 of file gps_ubx.c.
References LlaCoor_i::alt, UtmCoor_i::alt, SVinfo::azim, GpsState::cacc, SVinfo::cno, GpsState::course, UtmCoor_f::east, UtmCoor_i::east, GpsState::ecef_pos, GpsState::ecef_vel, SVinfo::elev, GpsState::fix, SVinfo::flags, gps, GPS_FIX_3D, GPS_NB_CHANNELS, gps_time_sync, gps_ubx, GpsState::gspeed, GpsUbx::have_velned, GpsState::hmsl, LlaCoor_i::lat, LED_ON, LED_TOGGLE, LLA_FLOAT_OF_BFP, GpsState::lla_pos, LlaCoor_i::lon, Min, GpsUbx::msg_buf, GpsUbx::msg_class, GpsUbx::msg_id, nav_utm_zone0, GpsState::nb_channels, sys_time::nb_tick, GpsState::ned_vel, UtmCoor_f::north, UtmCoor_i::north, GpsState::num_sv, GpsState::pacc, GpsState::pdop, SVinfo::qi, GpsState::sacc, GpsUbx::sol_flags, GpsState::speed_3d, GpsUbx::status_flags, SVinfo::svid, GpsState::svinfos, GpsTimeSync::t0_ticks, GpsTimeSync::t0_tow, GpsTimeSync::t0_tow_frac, GpsState::tow, UTM_HEM_SOUTH, utm_of_lla_f(), GpsState::utm_pos, GpsState::week, EcefCoor_i::x, NedCoor_i::x, EcefCoor_i::y, NedCoor_i::y, EcefCoor_i::z, NedCoor_i::z, UtmCoor_f::zone, and UtmCoor_i::zone.
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 283 of file gps_ubx.c.
References gps_ubx, link_device::periph, link_device::put_byte, GpsUbx::send_ck_a, GpsUbx::send_ck_b, and ubx_send_1byte().
|
static |
Definition at line 276 of file gps_ubx.c.
References gps_ubx, link_device::periph, link_device::put_byte, 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 302 of file gps_ubx.c.
References ubx_send_1byte().
void ubx_send_cfg_rst | ( | struct link_device * | dev, |
uint16_t | bbr, | ||
uint8_t | reset_mode | ||
) |
void ubx_trailer | ( | struct link_device * | dev | ) |
Definition at line 295 of file gps_ubx.c.
References gps_ubx, link_device::periph, link_device::put_byte, GpsUbx::send_ck_a, GpsUbx::send_ck_b, and link_device::send_message.
struct GpsUbx gps_ubx |
Definition at line 58 of file gps_ubx.c.
Referenced by ArduIMU_periodicGPS(), gps_impl_init(), gps_ubx_msg(), gps_ubx_parse(), gps_ubx_read_message(), gps_ubx_ucenter_event(), GpsEvent(), ubx_header(), ubx_send_1byte(), and ubx_trailer().