APM:Libraries
|
#include <AP_GPS.h>
Classes | |
struct | detect_state |
struct | GPS_State |
struct | GPS_timing |
struct | rtcm_buffer |
Public Types | |
enum | GPS_Type { GPS_TYPE_NONE = 0, GPS_TYPE_AUTO = 1, GPS_TYPE_UBLOX = 2, GPS_TYPE_MTK = 3, GPS_TYPE_MTK19 = 4, GPS_TYPE_NMEA = 5, GPS_TYPE_SIRF = 6, GPS_TYPE_HIL = 7, GPS_TYPE_SBP = 8, GPS_TYPE_UAVCAN = 9, GPS_TYPE_SBF = 10, GPS_TYPE_GSOF = 11, GPS_TYPE_ERB = 13, GPS_TYPE_MAV = 14, GPS_TYPE_NOVA = 15 } |
enum | GPS_Status { NO_GPS = GPS_FIX_TYPE_NO_GPS, NO_FIX = GPS_FIX_TYPE_NO_FIX, GPS_OK_FIX_2D = GPS_FIX_TYPE_2D_FIX, GPS_OK_FIX_3D = GPS_FIX_TYPE_3D_FIX, GPS_OK_FIX_3D_DGPS = GPS_FIX_TYPE_DGPS, GPS_OK_FIX_3D_RTK_FLOAT = GPS_FIX_TYPE_RTK_FLOAT, GPS_OK_FIX_3D_RTK_FIXED = GPS_FIX_TYPE_RTK_FIXED } |
GPS status codes. More... | |
enum | GPS_Engine_Setting { GPS_ENGINE_NONE = -1, GPS_ENGINE_PORTABLE = 0, GPS_ENGINE_STATIONARY = 2, GPS_ENGINE_PEDESTRIAN = 3, GPS_ENGINE_AUTOMOTIVE = 4, GPS_ENGINE_SEA = 5, GPS_ENGINE_AIRBORNE_1G = 6, GPS_ENGINE_AIRBORNE_2G = 7, GPS_ENGINE_AIRBORNE_4G = 8 } |
enum | GPS_Config { GPS_ALL_CONFIGURED = 255 } |
Public Member Functions | |
AP_GPS () | |
AP_GPS (const AP_GPS &other)=delete | |
AP_GPS & | operator= (const AP_GPS &)=delete |
void | init (const AP_SerialManager &serial_manager) |
Startup initialisation. More... | |
void | update (void) |
void | handle_msg (const mavlink_message_t *msg) |
uint8_t | num_sensors (void) const |
uint8_t | primary_sensor (void) const |
GPS_Status | status (uint8_t instance) const |
Query GPS status. More... | |
GPS_Status | status (void) const |
GPS_Status | highest_supported_status (uint8_t instance) const |
const Location & | location (uint8_t instance) const |
const Location & | location () const |
bool | speed_accuracy (uint8_t instance, float &sacc) const |
bool | speed_accuracy (float &sacc) const |
bool | horizontal_accuracy (uint8_t instance, float &hacc) const |
bool | horizontal_accuracy (float &hacc) const |
bool | vertical_accuracy (uint8_t instance, float &vacc) const |
bool | vertical_accuracy (float &vacc) const |
const Vector3f & | velocity (uint8_t instance) const |
const Vector3f & | velocity () const |
float | ground_speed (uint8_t instance) const |
float | ground_speed () const |
uint32_t | ground_speed_cm (void) |
float | ground_course (uint8_t instance) const |
float | ground_course () const |
int32_t | ground_course_cd (uint8_t instance) const |
int32_t | ground_course_cd () const |
uint8_t | num_sats (uint8_t instance) const |
uint8_t | num_sats () const |
uint32_t | time_week_ms (uint8_t instance) const |
uint32_t | time_week_ms () const |
uint16_t | time_week (uint8_t instance) const |
uint16_t | time_week () const |
uint16_t | get_hdop (uint8_t instance) const |
uint16_t | get_hdop () const |
uint16_t | get_vdop (uint8_t instance) const |
uint16_t | get_vdop () const |
uint32_t | last_fix_time_ms (uint8_t instance) const |
uint32_t | last_fix_time_ms (void) const |
uint32_t | last_message_time_ms (uint8_t instance) const |
uint32_t | last_message_time_ms (void) const |
uint16_t | last_message_delta_time_ms (uint8_t instance) const |
uint16_t | last_message_delta_time_ms (void) const |
bool | have_vertical_velocity (uint8_t instance) const |
bool | have_vertical_velocity (void) const |
uint8_t | rtk_num_sats (uint8_t instance) const |
uint8_t | rtk_num_sats (void) const |
uint32_t | rtk_age_ms (uint8_t instance) const |
uint32_t | rtk_age_ms (void) const |
bool | get_lag (uint8_t instance, float &lag_sec) const |
bool | get_lag (float &lag_sec) const |
const Vector3f & | get_antenna_offset (uint8_t instance) const |
void | setHIL (uint8_t instance, GPS_Status status, uint64_t time_epoch_ms, const Location &location, const Vector3f &velocity, uint8_t num_sats, uint16_t hdop) |
void | setHIL_Accuracy (uint8_t instance, float vdop, float hacc, float vacc, float sacc, bool _have_vertical_velocity, uint32_t sample_ms) |
void | lock_port (uint8_t instance, bool locked) |
void | send_mavlink_gps_raw (mavlink_channel_t chan) |
void | send_mavlink_gps2_raw (mavlink_channel_t chan) |
void | send_mavlink_gps_rtk (mavlink_channel_t chan, uint8_t inst) |
uint8_t | first_unconfigured_gps (void) const |
void | broadcast_first_configuration_failure_reason (void) const |
bool | all_configured (void) const |
bool | all_consistent (float &distance) const |
bool | blend_health_check () const |
void | send_blob_start (uint8_t instance, const char *_blob, uint16_t size) |
void | send_blob_update (uint8_t instance) |
uint64_t | time_epoch_usec (uint8_t instance) const |
uint64_t | time_epoch_usec (void) const |
void | Write_DataFlash_Log_Startup_messages () |
void | set_log_gps_bit (uint32_t bit) |
bool | is_healthy (uint8_t instance) const |
bool | is_healthy (void) const |
bool | prepare_for_arming (void) |
Static Public Member Functions | |
static AP_GPS & | gps () |
static uint64_t | time_epoch_convert (uint16_t gps_week, uint32_t gps_ms) |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Protected Attributes | |
AP_Int8 | _type [GPS_MAX_RECEIVERS] |
AP_Int8 | _navfilter |
AP_Int8 | _auto_switch |
AP_Int8 | _min_dgps |
AP_Int16 | _sbp_logmask |
AP_Int8 | _inject_to |
uint32_t | _last_instance_swap_ms |
AP_Int8 | _sbas_mode |
AP_Int8 | _min_elevation |
AP_Int8 | _raw_data |
AP_Int8 | _gnss_mode [GPS_MAX_RECEIVERS] |
AP_Int16 | _rate_ms [GPS_MAX_RECEIVERS] |
AP_Int8 | _save_config |
AP_Int8 | _auto_config |
AP_Vector3f | _antenna_offset [GPS_MAX_RECEIVERS] |
AP_Int16 | _delay_ms [GPS_MAX_RECEIVERS] |
AP_Int8 | _blend_mask |
AP_Float | _blend_tc |
uint32_t | _log_gps_bit = -1 |
Private Types | |
enum | GPS_AUTO_CONFIG { GPS_AUTO_CONFIG_DISABLE = 0, GPS_AUTO_CONFIG_ENABLE = 1 } |
Private Member Functions | |
uint16_t | get_rate_ms (uint8_t instance) const |
void | detect_instance (uint8_t instance) |
void | update_instance (uint8_t instance) |
void | handle_gps_rtcm_data (const mavlink_message_t *msg) |
void | handle_gps_inject (const mavlink_message_t *msg) |
void | inject_data (uint8_t *data, uint16_t len) |
void | inject_data (uint8_t instance, uint8_t *data, uint16_t len) |
bool | calc_blend_weights (void) |
void | calc_blended_state (void) |
bool | should_df_log () const |
Private Attributes | |
GPS_timing | timing [GPS_MAX_RECEIVERS+1] |
GPS_State | state [GPS_MAX_RECEIVERS+1] |
AP_GPS_Backend * | drivers [GPS_MAX_RECEIVERS] |
AP_HAL::UARTDriver * | _port [GPS_MAX_RECEIVERS] |
uint8_t | primary_instance:2 |
primary GPS instance More... | |
uint8_t | num_instances:2 |
number of GPS instances present More... | |
uint8_t | locked_ports:2 |
struct AP_GPS::detect_state | detect_state [GPS_MAX_RECEIVERS] |
struct { | |
const char * blob | |
uint16_t remaining | |
} | initblob_state [GPS_MAX_RECEIVERS] |
struct AP_GPS::rtcm_buffer * | rtcm_buffer |
Vector2f | _NE_pos_offset_m [GPS_MAX_RECEIVERS] |
float | _hgt_offset_cm [GPS_MAX_RECEIVERS] |
Vector3f | _blended_antenna_offset |
float | _blended_lag_sec = 0.001f * GPS_MAX_RATE_MS |
float | _blend_weights [GPS_MAX_RECEIVERS] |
uint32_t | _last_time_updated [GPS_MAX_RECEIVERS] |
float | _omega_lpf |
bool | _output_is_blended |
uint8_t | _blend_health_counter |
Static Private Attributes | |
static AP_GPS * | _singleton |
static const uint32_t | _baudrates [] = {9600U, 115200U, 4800U, 19200U, 38400U, 57600U, 230400U} |
static const char | _initialisation_blob [] = UBLOX_SET_BINARY MTK_SET_BINARY SIRF_SET_BINARY |
static const char | _initialisation_raw_blob [] |
Friends | |
class | AP_GPS_ERB |
class | AP_GPS_GSOF |
class | AP_GPS_MAV |
class | AP_GPS_MTK |
class | AP_GPS_MTK19 |
class | AP_GPS_NMEA |
class | AP_GPS_NOVA |
class | AP_GPS_PX4 |
class | AP_GPS_SBF |
class | AP_GPS_SBP |
class | AP_GPS_SBP2 |
class | AP_GPS_SIRF |
class | AP_GPS_UBLOX |
class | AP_GPS_Backend |
|
private |
enum AP_GPS::GPS_Config |
enum AP_GPS::GPS_Status |
GPS status codes.
enum AP_GPS::GPS_Type |
AP_GPS::AP_GPS | ( | ) |
|
delete |
|
inline |
bool AP_GPS::all_consistent | ( | float & | distance | ) | const |
Definition at line 1002 of file AP_GPS.cpp.
Referenced by all_configured(), and AP_Arming::gps_checks().
bool AP_GPS::blend_health_check | ( | ) | const |
Definition at line 1018 of file AP_GPS.cpp.
Referenced by all_configured(), and AP_Arming::gps_checks().
void AP_GPS::broadcast_first_configuration_failure_reason | ( | void | ) | const |
Definition at line 991 of file AP_GPS.cpp.
Referenced by get_lag(), and AP_Arming::gps_checks().
|
private |
Definition at line 1165 of file AP_GPS.cpp.
Referenced by update().
|
private |
Definition at line 1327 of file AP_GPS.cpp.
Referenced by update().
|
private |
Definition at line 408 of file AP_GPS.cpp.
Referenced by update_instance().
uint8_t AP_GPS::first_unconfigured_gps | ( | void | ) | const |
Definition at line 981 of file AP_GPS.cpp.
Referenced by all_configured(), broadcast_first_configuration_failure_reason(), get_lag(), and AP_Arming::gps_checks().
const Vector3f & AP_GPS::get_antenna_offset | ( | uint8_t | instance | ) | const |
Definition at line 1137 of file AP_GPS.cpp.
Referenced by get_lag(), NavEKF2_core::SelectVelPosFusion(), and NavEKF3_core::SelectVelPosFusion().
|
inline |
Definition at line 284 of file AP_GPS.h.
Referenced by AP_Frsky_Telem::calc_gps_status(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), and DataFlash_Class::Log_Write_GPS().
|
inline |
Definition at line 287 of file AP_GPS.h.
Referenced by send_mavlink_gps2_raw(), and send_mavlink_gps_raw().
bool AP_GPS::get_lag | ( | uint8_t | instance, |
float & | lag_sec | ||
) | const |
Definition at line 1107 of file AP_GPS.cpp.
Referenced by calc_blended_state(), get_lag(), AP_AHRS_DCM::get_position(), NavEKF3_core::readGpsData(), and rtk_age_ms().
|
inline |
|
private |
Definition at line 1153 of file AP_GPS.cpp.
Referenced by AP_GPS_UBLOX::_configure_rate(), and calc_blend_weights().
|
inline |
Definition at line 292 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_GPS().
|
inline |
Definition at line 295 of file AP_GPS.h.
Referenced by send_mavlink_gps2_raw(), and send_mavlink_gps_raw().
|
inlinestatic |
|
inline |
Definition at line 245 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_GPS().
|
inline |
Definition at line 248 of file AP_GPS.h.
Referenced by send_mavlink_gps2_raw(), and send_mavlink_gps_raw().
|
inline |
Definition at line 252 of file AP_GPS.h.
Referenced by AP_AHRS_DCM::drift_correction_yaw(), AR_AttitudeControl::get_forward_speed(), AP_AHRS_DCM::get_position(), and loop().
|
inline |
Definition at line 232 of file AP_GPS.h.
Referenced by AP_AHRS_NavEKF::active_EKF_type(), AP_AHRS_DCM::airspeed_estimate(), AP_AHRS::airspeed_estimate(), AP_Frsky_Telem::calc_gps_position(), AP_AHRS_DCM::drift_correction(), AP_AHRS_DCM::drift_correction_yaw(), AR_AttitudeControl::get_forward_speed(), AP_AHRS_DCM::get_position(), AP_AHRS::groundspeed_vector(), DataFlash_Class::Log_Write_GPS(), loop(), AP_DEVO_Telem::send_frames(), AP_AHRS_DCM::use_compass(), and GCS_MAVLINK::vfr_hud_airspeed().
|
inline |
Definition at line 235 of file AP_GPS.h.
Referenced by send_mavlink_gps2_raw(), and send_mavlink_gps_raw().
|
private |
Definition at line 777 of file AP_GPS.cpp.
Referenced by handle_msg().
|
private |
Definition at line 1026 of file AP_GPS.cpp.
Referenced by handle_msg().
void AP_GPS::handle_msg | ( | const mavlink_message_t * | msg | ) |
Definition at line 789 of file AP_GPS.cpp.
Referenced by GCS_MAVLINK::handle_common_gps_message().
|
inline |
Definition at line 326 of file AP_GPS.h.
Referenced by NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), DataFlash_Class::Log_Write_GPS(), NavEKF2_core::readGpsData(), and NavEKF3_core::readGpsData().
|
inline |
Definition at line 329 of file AP_GPS.h.
Referenced by calc_blended_state().
AP_GPS::GPS_Status AP_GPS::highest_supported_status | ( | uint8_t | instance | ) | const |
Definition at line 571 of file AP_GPS.cpp.
Referenced by status().
bool AP_GPS::horizontal_accuracy | ( | uint8_t | instance, |
float & | hacc | ||
) | const |
Definition at line 325 of file AP_GPS.cpp.
Referenced by calc_blend_weights(), calc_blended_state(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), DataFlash_Class::Log_Write_GPS(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), AP_ADSB::send_dynamic_out(), and send_mavlink_gps_raw().
|
inline |
void AP_GPS::init | ( | const AP_SerialManager & | serial_manager | ) |
Startup initialisation.
Definition at line 279 of file AP_GPS.cpp.
Referenced by setup().
|
private |
Definition at line 880 of file AP_GPS.cpp.
Referenced by handle_gps_inject(), and handle_gps_rtcm_data().
|
private |
bool AP_GPS::is_healthy | ( | uint8_t | instance | ) | const |
Definition at line 1532 of file AP_GPS.cpp.
Referenced by AP_Arming::gps_checks().
|
inline |
Definition at line 414 of file AP_GPS.h.
Referenced by is_healthy(), and set_log_gps_bit().
|
inline |
Definition at line 301 of file AP_GPS.h.
Referenced by AP_AdvancedFailsafe::check(), AP_AHRS_DCM::drift_correction(), and AP_AHRS_DCM::drift_correction_yaw().
|
inline |
Definition at line 304 of file AP_GPS.h.
Referenced by calc_blended_state(), send_mavlink_gps2_raw(), and send_mavlink_gps_raw().
|
inline |
Definition at line 318 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_GPS().
|
inline |
Definition at line 321 of file AP_GPS.h.
Referenced by is_healthy().
|
inline |
Definition at line 310 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_GPS(), loop(), NavEKF2_core::readGpsData(), and NavEKF3_core::readGpsData().
|
inline |
Definition at line 313 of file AP_GPS.h.
Referenced by calc_blended_state(), send_mavlink_gps2_raw(), send_mavlink_gps_raw(), and update_instance().
|
inline |
Definition at line 200 of file AP_GPS.h.
Referenced by AP_Frsky_Telem::calc_gps_latlng(), AP_Frsky_Telem::calc_gps_position(), AP_Frsky_Telem::calc_gps_status(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), AP_AdvancedFailsafe::check_altlimit(), AP_AHRS_DCM::drift_correction(), NavEKF2_core::getLLH(), NavEKF3_core::getLLH(), NavEKF2_core::getPosNE(), NavEKF3_core::getPosNE(), AP_Arming::gps_checks(), DataFlash_Class::Log_Write_CameraInfo(), DataFlash_Class::Log_Write_GPS(), loop(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), NavEKF2_core::setOrigin(), and NavEKF3_core::setOrigin().
|
inline |
Definition at line 203 of file AP_GPS.h.
Referenced by all_consistent(), calc_blended_state(), send_mavlink_gps2_raw(), and send_mavlink_gps_raw().
void AP_GPS::lock_port | ( | uint8_t | instance, |
bool | lock | ||
) |
Lock a GPS port, preventing the GPS driver from using it. This can be used to allow a user to control a GPS port via the SERIAL_CONTROL protocol
Definition at line 866 of file AP_GPS.cpp.
Referenced by get_lag(), and GCS_MAVLINK::handle_serial_control().
|
inline |
Definition at line 260 of file AP_GPS.h.
Referenced by AP_Frsky_Telem::calc_gps_status(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), AP_AHRS_DCM::drift_correction(), DataFlash_Class::Log_Write_GPS(), loop(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), and AP_ADSB::send_dynamic_out().
|
inline |
Definition at line 263 of file AP_GPS.h.
Referenced by calc_blended_state(), send_mavlink_gps2_raw(), send_mavlink_gps_raw(), and update().
uint8_t AP_GPS::num_sensors | ( | void | ) | const |
Definition at line 307 of file AP_GPS.cpp.
bool AP_GPS::prepare_for_arming | ( | void | ) |
Definition at line 1538 of file AP_GPS.cpp.
Referenced by is_healthy().
|
inline |
Definition at line 184 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_GPS(), NavEKF2_core::readGpsData(), and NavEKF3_core::readGpsData().
|
inline |
|
inline |
Definition at line 345 of file AP_GPS.h.
Referenced by send_mavlink_gps2_raw().
|
inline |
|
inline |
Definition at line 337 of file AP_GPS.h.
Referenced by send_mavlink_gps2_raw().
void AP_GPS::send_blob_start | ( | uint8_t | instance, |
const char * | _blob, | ||
uint16_t | size | ||
) |
Definition at line 371 of file AP_GPS.cpp.
Referenced by all_configured(), AP_GPS_MTK::AP_GPS_MTK(), AP_GPS_SIRF::AP_GPS_SIRF(), AP_GPS_UBLOX::AP_GPS_UBLOX(), detect_instance(), and AP_GPS_MTK::send_init_blob().
void AP_GPS::send_blob_update | ( | uint8_t | instance | ) |
Definition at line 381 of file AP_GPS.cpp.
Referenced by all_configured(), detect_instance(), and update_instance().
void AP_GPS::send_mavlink_gps2_raw | ( | mavlink_channel_t | chan | ) |
Definition at line 942 of file AP_GPS.cpp.
Referenced by get_lag(), and GCS_MAVLINK::try_send_gps_message().
void AP_GPS::send_mavlink_gps_raw | ( | mavlink_channel_t | chan | ) |
Definition at line 899 of file AP_GPS.cpp.
Referenced by get_lag(), and GCS_MAVLINK::try_send_gps_message().
void AP_GPS::send_mavlink_gps_rtk | ( | mavlink_channel_t | chan, |
uint8_t | inst | ||
) |
Definition at line 971 of file AP_GPS.cpp.
Referenced by get_lag(), and GCS_MAVLINK::try_send_gps_message().
|
inline |
void AP_GPS::setHIL | ( | uint8_t | instance, |
GPS_Status | status, | ||
uint64_t | time_epoch_ms, | ||
const Location & | location, | ||
const Vector3f & | velocity, | ||
uint8_t | num_sats, | ||
uint16_t | hdop | ||
) |
Definition at line 814 of file AP_GPS.cpp.
Referenced by get_lag().
void AP_GPS::setHIL_Accuracy | ( | uint8_t | instance, |
float | vdop, | ||
float | hacc, | ||
float | vacc, | ||
float | sacc, | ||
bool | _have_vertical_velocity, | ||
uint32_t | sample_ms | ||
) |
Definition at line 841 of file AP_GPS.cpp.
Referenced by get_lag().
|
private |
Definition at line 579 of file AP_GPS.cpp.
Referenced by AP_GPS_Backend::should_df_log(), and update_instance().
bool AP_GPS::speed_accuracy | ( | uint8_t | instance, |
float & | sacc | ||
) | const |
Definition at line 316 of file AP_GPS.cpp.
Referenced by calc_blend_weights(), calc_blended_state(), DataFlash_Class::Log_Write_GPS(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), AP_ADSB::send_dynamic_out(), and send_mavlink_gps_raw().
|
inline |
Query GPS status.
Definition at line 189 of file AP_GPS.h.
Referenced by AP_AHRS_NavEKF::active_EKF_type(), AP_Frsky_Telem::calc_gps_status(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), AP_AdvancedFailsafe::check_altlimit(), AP_AHRS_DCM::drift_correction(), AR_AttitudeControl::get_forward_speed(), NavEKF2_core::getLLH(), NavEKF3_core::getLLH(), AP_Arming::gps_checks(), AP_AHRS::groundspeed_vector(), DataFlash_Class::Log_Write_CameraInfo(), DataFlash_Class::Log_Write_GPS(), loop(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), and AP_ADSB::send_dynamic_out().
|
inline |
Definition at line 192 of file AP_GPS.h.
Referenced by calc_blend_weights(), calc_blended_state(), get_lag(), send_mavlink_gps2_raw(), send_mavlink_gps_raw(), update(), update_instance(), and Write_DataFlash_Log_Startup_messages().
|
static |
convert GPS week and milliseconds to unix epoch in milliseconds
Definition at line 347 of file AP_GPS.cpp.
Referenced by time_epoch_usec().
uint64_t AP_GPS::time_epoch_usec | ( | uint8_t | instance | ) | const |
calculate current time since the unix epoch in microseconds
Definition at line 356 of file AP_GPS.cpp.
Referenced by AP_ADSB::genICAO(), and AP_ADSB::send_dynamic_out().
|
inline |
Definition at line 397 of file AP_GPS.h.
Referenced by all_configured().
|
inline |
Definition at line 276 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_CameraInfo(), DataFlash_Class::Log_Write_GPS(), and loop().
|
inline |
Definition at line 279 of file AP_GPS.h.
Referenced by calc_blended_state().
|
inline |
Definition at line 268 of file AP_GPS.h.
Referenced by DataFlash_Class::Log_Write_CameraInfo(), DataFlash_Class::Log_Write_GPS(), and loop().
|
inline |
Definition at line 271 of file AP_GPS.h.
Referenced by calc_blended_state().
void AP_GPS::update | ( | void | ) |
Update GPS state based on possible bytes received from the module. This routine must be called periodically (typically at 10Hz or more) to process incoming data.
Definition at line 678 of file AP_GPS.cpp.
Referenced by loop().
|
private |
Definition at line 598 of file AP_GPS.cpp.
Referenced by update().
|
inline |
Definition at line 224 of file AP_GPS.h.
Referenced by AP_AHRS_DCM::drift_correction(), DataFlash_Class::Log_Write_GPS(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), and AP_ADSB::send_dynamic_out().
|
inline |
Definition at line 227 of file AP_GPS.h.
Referenced by calc_blended_state().
bool AP_GPS::vertical_accuracy | ( | uint8_t | instance, |
float & | vacc | ||
) | const |
Definition at line 334 of file AP_GPS.cpp.
Referenced by calc_blend_weights(), calc_blended_state(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), DataFlash_Class::Log_Write_GPS(), NavEKF2_core::readGpsData(), NavEKF3_core::readGpsData(), AP_ADSB::send_dynamic_out(), and send_mavlink_gps_raw().
|
inline |
void AP_GPS::Write_DataFlash_Log_Startup_messages | ( | ) |
|
friend |
|
friend |
Definition at line 50 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 51 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 52 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 53 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 54 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 55 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 56 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 58 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 59 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 60 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 61 of file AP_GPS.h.
Referenced by detect_instance().
|
friend |
Definition at line 62 of file AP_GPS.h.
Referenced by detect_instance().
|
protected |
Definition at line 436 of file AP_GPS.h.
Referenced by calc_blended_state(), get_antenna_offset(), and update().
|
protected |
Definition at line 435 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_request_next_config(), AP_GPS_SBF::broadcast_configuration_failure_reason(), detect_instance(), AP_GPS_UBLOX::get_lag(), AP_GPS_SBF::is_configured(), AP_GPS_UBLOX::is_configured(), AP_GPS_SBF::read(), and update_instance().
|
protected |
|
staticprivate |
Definition at line 499 of file AP_GPS.h.
Referenced by AP_GPS_Backend::_detection_message(), and detect_instance().
|
private |
Definition at line 544 of file AP_GPS.h.
Referenced by blend_health_check(), and update().
|
protected |
Definition at line 438 of file AP_GPS.h.
Referenced by calc_blend_weights().
|
private |
Definition at line 540 of file AP_GPS.h.
Referenced by calc_blend_weights(), and calc_blended_state().
|
private |
Definition at line 538 of file AP_GPS.h.
Referenced by calc_blended_state(), get_antenna_offset(), and update().
|
private |
Definition at line 539 of file AP_GPS.h.
Referenced by calc_blended_state(), and get_lag().
|
protected |
|
protected |
Definition at line 432 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_parse_gps().
|
private |
Definition at line 537 of file AP_GPS.h.
Referenced by calc_blended_state().
|
staticprivate |
Definition at line 500 of file AP_GPS.h.
Referenced by AP_GPS(), and detect_instance().
|
staticprivate |
|
protected |
Definition at line 427 of file AP_GPS.h.
Referenced by inject_data().
|
protected |
|
private |
Definition at line 541 of file AP_GPS.h.
Referenced by calc_blended_state().
|
protected |
Definition at line 441 of file AP_GPS.h.
Referenced by set_log_gps_bit(), and should_df_log().
|
protected |
Definition at line 430 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_parse_gps().
|
protected |
Definition at line 423 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_parse_gps().
|
private |
Definition at line 536 of file AP_GPS.h.
Referenced by calc_blended_state().
|
private |
Definition at line 542 of file AP_GPS.h.
Referenced by calc_blended_state(), and init().
|
private |
Definition at line 543 of file AP_GPS.h.
Referenced by num_sensors(), and update().
|
private |
Definition at line 466 of file AP_GPS.h.
Referenced by detect_instance(), init(), and send_blob_update().
|
protected |
Definition at line 433 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_parse_gps(), get_rate_ms(), and init().
|
protected |
Definition at line 431 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_parse_gps(), AP_GPS_UBLOX::_request_next_config(), AP_GPS_UBLOX::_verify_rate(), AP_GPS_SBF::prepare_for_arming(), and AP_GPS_SBF::read().
|
protected |
Definition at line 434 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::read().
|
protected |
Definition at line 429 of file AP_GPS.h.
Referenced by AP_GPS_UBLOX::_parse_gps(), and AP_GPS_UBLOX::_request_next_config().
|
protected |
Definition at line 426 of file AP_GPS.h.
Referenced by AP_GPS_SBP::logging_log_raw_sbp(), and AP_GPS_SBP2::logging_log_raw_sbp().
|
staticprivate |
|
protected |
Definition at line 422 of file AP_GPS.h.
Referenced by all_consistent(), calc_blend_weights(), detect_instance(), first_unconfigured_gps(), get_lag(), handle_msg(), setHIL(), and update_instance().
const char* AP_GPS::blob |
Definition at line 495 of file AP_GPS.h.
Referenced by send_blob_update().
|
private |
Referenced by AP_GPS_Backend::_detection_message().
|
private |
Definition at line 465 of file AP_GPS.h.
Referenced by all_consistent(), broadcast_first_configuration_failure_reason(), calc_blend_weights(), detect_instance(), first_unconfigured_gps(), get_lag(), handle_msg(), highest_supported_status(), inject_data(), is_healthy(), prepare_for_arming(), send_mavlink_gps_rtk(), update_instance(), and Write_DataFlash_Log_Startup_messages().
struct { ... } AP_GPS::initblob_state[GPS_MAX_RECEIVERS] |
Referenced by detect_instance(), send_blob_start(), and send_blob_update().
|
private |
Definition at line 475 of file AP_GPS.h.
Referenced by lock_port(), and update_instance().
|
private |
number of GPS instances present
Definition at line 472 of file AP_GPS.h.
Referenced by all_consistent(), calc_blend_weights(), get_rate_ms(), handle_msg(), num_sensors(), send_mavlink_gps2_raw(), update(), and Write_DataFlash_Log_Startup_messages().
|
private |
primary GPS instance
Definition at line 469 of file AP_GPS.h.
Referenced by get_hdop(), get_lag(), get_vdop(), ground_course(), ground_course_cd(), ground_speed(), have_vertical_velocity(), horizontal_accuracy(), init(), is_healthy(), last_fix_time_ms(), last_message_delta_time_ms(), last_message_time_ms(), location(), num_sats(), primary_sensor(), rtk_age_ms(), rtk_num_sats(), speed_accuracy(), status(), time_epoch_usec(), time_week(), time_week_ms(), update(), velocity(), and vertical_accuracy().
uint16_t AP_GPS::remaining |
Definition at line 496 of file AP_GPS.h.
Referenced by detect_instance(), and send_blob_update().
|
private |
|
private |
Definition at line 464 of file AP_GPS.h.
Referenced by all_consistent(), calc_blend_weights(), calc_blended_state(), detect_instance(), get_hdop(), get_lag(), get_vdop(), ground_course(), ground_speed(), have_vertical_velocity(), horizontal_accuracy(), init(), location(), num_sats(), rtk_age_ms(), rtk_num_sats(), setHIL(), setHIL_Accuracy(), speed_accuracy(), status(), time_epoch_usec(), time_week(), time_week_ms(), update(), update_instance(), velocity(), vertical_accuracy(), and Write_DataFlash_Log_Startup_messages().
|
private |
Definition at line 463 of file AP_GPS.h.
Referenced by calc_blended_state(), detect_instance(), last_fix_time_ms(), last_message_delta_time_ms(), last_message_time_ms(), setHIL(), setHIL_Accuracy(), and update_instance().
|
static |