APM:Libraries
|
#include <AP_Compass.h>
Classes | |
struct | mag_state |
Public Types | |
enum | LearnType { LEARN_NONE =0, LEARN_INTERNAL =1, LEARN_EKF =2, LEARN_INFLIGHT =3 } |
Public Member Functions | |
Compass () | |
Compass (const Compass &other)=delete | |
Compass & | operator= (const Compass &)=delete |
bool | init () |
bool | read () |
void | accumulate () |
float | calculate_heading (const Matrix3f &dcm_matrix) const |
float | calculate_heading (const Matrix3f &dcm_matrix, uint8_t i) const |
void | set_offsets (uint8_t i, const Vector3f &offsets) |
void | set_and_save_offsets (uint8_t i, const Vector3f &offsets) |
void | set_and_save_diagonals (uint8_t i, const Vector3f &diagonals) |
void | set_and_save_offdiagonals (uint8_t i, const Vector3f &diagonals) |
void | save_offsets (uint8_t i) |
void | save_offsets (void) |
uint8_t | get_count (void) const |
const Vector3f & | get_field (uint8_t i) const |
Return the current field as a Vector3f in milligauss. More... | |
const Vector3f & | get_field (void) const |
void | compass_cal_update () |
void | per_motor_calibration_start (void) |
void | per_motor_calibration_update (void) |
void | per_motor_calibration_end (void) |
void | start_calibration_all (bool retry=false, bool autosave=false, float delay_sec=0.0f, bool autoreboot=false) |
void | cancel_calibration_all () |
bool | compass_cal_requires_reboot () |
bool | is_calibrating () const |
MAV_RESULT | handle_mag_cal_command (const mavlink_command_long_t &packet) |
void | send_mag_cal_progress (mavlink_channel_t chan) |
void | send_mag_cal_report (mavlink_channel_t chan) |
bool | consistent () const |
bool | healthy (uint8_t i) const |
Return the health of a compass. More... | |
bool | healthy (void) const |
uint8_t | get_healthy_mask () const |
const Vector3f & | get_offsets (uint8_t i) const |
const Vector3f & | get_offsets (void) const |
const Vector3f & | get_diagonals (uint8_t i) const |
const Vector3f & | get_diagonals (void) const |
const Vector3f & | get_offdiagonals (uint8_t i) const |
const Vector3f & | get_offdiagonals (void) const |
void | set_initial_location (int32_t latitude, int32_t longitude) |
void | set_and_save_offsets (uint8_t i, int x, int y, int z) |
bool | learn_offsets_enabled () const |
bool | use_for_yaw (uint8_t i) const |
return true if the compass should be used for yaw calculations More... | |
bool | use_for_yaw (void) const |
return true if the compass should be used for yaw calculations More... | |
void | set_use_for_yaw (uint8_t i, bool use) |
void | set_declination (float radians, bool save_to_eeprom=true) |
float | get_declination () const |
void | set_board_orientation (enum Rotation orientation, Matrix3f *custom_rotation=nullptr) |
void | motor_compensation_type (const uint8_t comp_type) |
uint8_t | get_motor_compensation_type () const |
get the motor compensation value. More... | |
void | set_motor_compensation (uint8_t i, const Vector3f &motor_comp_factor) |
const Vector3f & | get_motor_compensation (uint8_t i) const |
get motor compensation factors as a vector More... | |
const Vector3f & | get_motor_compensation (void) const |
void | save_motor_compensation () |
const Vector3f & | get_motor_offsets (uint8_t i) const |
const Vector3f & | get_motor_offsets (void) const |
void | set_throttle (float thr_pct) |
void | set_voltage (float voltage) |
Set the battery voltage for per-motor compensation. More... | |
bool | configured (uint8_t i) |
bool | configured (void) |
uint8_t | get_primary (void) const |
void | setHIL (uint8_t instance, float roll, float pitch, float yaw) |
void | setHIL (uint8_t instance, const Vector3f &mag, uint32_t last_update_usec) |
const Vector3f & | getHIL (uint8_t instance) const |
void | _setup_earth_field () |
void | set_hil_mode (void) |
uint32_t | last_update_usec (void) const |
uint32_t | last_update_usec (uint8_t i) const |
uint32_t | last_update_ms (void) const |
uint32_t | last_update_ms (uint8_t i) const |
enum LearnType | get_learn_type (void) const |
void | set_learn_type (enum LearnType type, bool save) |
uint16_t | get_offsets_max (void) const |
uint8_t | get_filter_range () const |
Static Public Member Functions | |
static Compass * | get_singleton () |
Public Attributes | |
struct { | |
Vector3f Bearth | |
float last_declination | |
bool healthy [COMPASS_MAX_INSTANCES] | |
Vector3f field [COMPASS_MAX_INSTANCES] | |
} | _hil |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Private Types | |
enum | DriverType { DRIVER_HMC5883 =0, DRIVER_LSM303D =1, DRIVER_AK8963 =2, DRIVER_BMM150 =3, DRIVER_LSM9DS1 =4, DRIVER_LIS3MDL =5, DRIVER_AK09916 =6, DRIVER_IST8310 =7, DRIVER_ICM20948 =8, DRIVER_MMC3416 =9, DRIVER_UAVCAN =11, DRIVER_QMC5883 =12, DRIVER_SITL =13, DRIVER_MAG3110 =14 } |
Private Member Functions | |
uint8_t | register_compass (void) |
bool | _add_backend (AP_Compass_Backend *backend, const char *name, bool external) |
void | _detect_backends (void) |
bool | _accept_calibration (uint8_t i) |
bool | _accept_calibration_mask (uint8_t mask) |
void | _cancel_calibration (uint8_t i) |
void | _cancel_calibration_mask (uint8_t mask) |
uint8_t | _get_cal_mask () const |
bool | _start_calibration (uint8_t i, bool retry=false, float delay_sec=0.0f) |
bool | _start_calibration_mask (uint8_t mask, bool retry=false, bool autosave=false, float delay_sec=0.0f, bool autoreboot=false) |
bool | _auto_reboot () |
bool | _have_driver (AP_HAL::Device::BusType bus_type, uint8_t bus_num, uint8_t address, uint8_t devtype) const |
bool | _driver_enabled (enum DriverType driver_type) |
Private Attributes | |
bool | _cal_saved [COMPASS_MAX_INSTANCES] |
bool | _cal_autosave |
bool | _compass_cal_autoreboot |
bool | _cal_complete_requires_reboot |
bool | _cal_has_run |
AP_Compass_Backend * | _backends [COMPASS_MAX_BACKEND] |
uint8_t | _backend_count |
uint8_t | _compass_count |
AP_Int8 | _learn |
enum Rotation | _board_orientation |
Matrix3f * | _custom_rotation |
AP_Int8 | _primary |
AP_Float | _declination |
AP_Int8 | _auto_declination |
bool | _null_init_done |
AP_Int8 | _motor_comp_type |
float | _thr |
struct Compass::mag_state | _state [COMPASS_MAX_INSTANCES] |
AP_Int16 | _offset_max |
CompassCalibrator | _calibrator [COMPASS_MAX_INSTANCES] |
Compass_PerMotor | _per_motor {*this} |
bool | _hil_mode:1 |
AP_Float | _calibration_threshold |
AP_Int32 | _driver_type_mask |
AP_Int8 | _filter_range |
Static Private Attributes | |
static Compass * | _singleton |
static const uint8_t | _mag_history_size = 20 |
Friends | |
class | AP_Compass_Backend |
class | CompassLearn |
Definition at line 49 of file AP_Compass.h.
|
private |
Definition at line 368 of file AP_Compass.h.
enum Compass::LearnType |
Enumerator | |
---|---|
LEARN_NONE | |
LEARN_INTERNAL | |
LEARN_EKF | |
LEARN_INFLIGHT |
Definition at line 305 of file AP_Compass.h.
Compass::Compass | ( | void | ) |
|
delete |
|
private |
Definition at line 132 of file AP_Compass_Calibration.cpp.
Referenced by _accept_calibration_mask(), and compass_cal_update().
|
private |
Definition at line 160 of file AP_Compass_Calibration.cpp.
Referenced by handle_mag_cal_command().
|
private |
Definition at line 511 of file AP_Compass.cpp.
Referenced by _detect_backends().
|
inlineprivate |
Definition at line 352 of file AP_Compass.h.
Referenced by compass_cal_update().
|
private |
Definition at line 104 of file AP_Compass_Calibration.cpp.
Referenced by _cancel_calibration_mask().
|
private |
Definition at line 116 of file AP_Compass_Calibration.cpp.
Referenced by _start_calibration_mask(), cancel_calibration_all(), and handle_mag_cal_command().
|
private |
Definition at line 552 of file AP_Compass.cpp.
Referenced by init().
|
private |
Definition at line 529 of file AP_Compass.cpp.
Referenced by _detect_backends().
|
private |
Definition at line 255 of file AP_Compass_Calibration.cpp.
Referenced by send_mag_cal_progress(), and send_mag_cal_report().
|
private |
Definition at line 538 of file AP_Compass.cpp.
Referenced by _auto_reboot(), and _detect_backends().
void Compass::_setup_earth_field | ( | void | ) |
Definition at line 1246 of file AP_Compass.cpp.
Referenced by AP_Compass_HIL::AP_Compass_HIL(), AP_Compass_SITL::AP_Compass_SITL(), get_primary(), and setHIL().
|
private |
Definition at line 45 of file AP_Compass_Calibration.cpp.
Referenced by _start_calibration_mask(), and start_calibration_all().
|
private |
Definition at line 74 of file AP_Compass_Calibration.cpp.
Referenced by handle_mag_cal_command().
void Compass::accumulate | ( | void | ) |
use spare CPU cycles to accumulate values from the compass if possible (this method should also be implemented in the backends)
Definition at line 970 of file AP_Compass.cpp.
Referenced by loop().
|
inline |
Calculate the tilt-compensated heading_ variables.
dcm_matrix | The current orientation rotation matrix |
Definition at line 87 of file AP_Compass.h.
Referenced by AP_AHRS_DCM::drift_correction_yaw(), and loop().
float Compass::calculate_heading | ( | const Matrix3f & | dcm_matrix, |
uint8_t | i | ||
) | const |
void Compass::cancel_calibration_all | ( | ) |
Definition at line 126 of file AP_Compass_Calibration.cpp.
Referenced by compass_cal_update(), handle_mag_cal_command(), and per_motor_calibration_end().
|
inline |
Definition at line 143 of file AP_Compass.h.
Referenced by AP_Arming::compass_checks().
void Compass::compass_cal_update | ( | ) |
Definition at line 10 of file AP_Compass_Calibration.cpp.
Referenced by get_field().
bool Compass::configured | ( | uint8_t | i | ) |
Returns True if the compasses have been configured (i.e. offsets saved)
Definition at line 1156 of file AP_Compass.cpp.
Referenced by AP_Arming::compass_checks().
bool Compass::configured | ( | void | ) |
Definition at line 1186 of file AP_Compass.cpp.
Referenced by set_voltage().
bool Compass::consistent | ( | ) | const |
Definition at line 1272 of file AP_Compass.cpp.
Referenced by compass_cal_requires_reboot(), AP_Arming::compass_checks(), NavEKF2_core::readMagData(), and NavEKF3_core::readMagData().
|
inline |
Definition at line 119 of file AP_Compass.h.
Referenced by configured(), consistent(), DataFlash_Class::Log_Write_Compass(), loop(), NavEKF2_core::readMagData(), NavEKF3_core::readMagData(), GCS_MAVLINK::send_raw_imu(), and setup().
float Compass::get_declination | ( | ) | const |
Definition at line 1114 of file AP_Compass.cpp.
Referenced by _setup_earth_field(), NavEKF2_core::alignMagStateDeclination(), NavEKF3_core::alignMagStateDeclination(), SoloGimbalEKF::calcMagHeadingInnov(), NavEKF2_core::calcQuatAndFieldStates(), NavEKF3_core::calcQuatAndFieldStates(), NavEKF2_core::FuseDeclination(), NavEKF3_core::FuseDeclination(), NavEKF2_core::fuseEulerYaw(), NavEKF3_core::fuseEulerYaw(), GCS_MAVLINK::send_sensor_offsets(), set_use_for_yaw(), setHIL(), and AP_AHRS_DCM::yaw_error_compass().
|
inline |
Definition at line 169 of file AP_Compass.h.
Referenced by CompassLearn::update().
|
inline |
Definition at line 170 of file AP_Compass.h.
Referenced by get_diagonals().
|
inline |
Return the current field as a Vector3f in milligauss.
Definition at line 122 of file AP_Compass.h.
Referenced by Compass_PerMotor::calibration_start(), Compass_PerMotor::calibration_update(), AP_Arming::compass_checks(), DataFlash_Class::Log_Write_Compass_instance(), loop(), SoloGimbalEKF::readMagData(), NavEKF2_core::readMagData(), NavEKF3_core::readMagData(), GCS_MAVLINK::send_raw_imu(), CompassLearn::update(), and AP_AHRS_DCM::yaw_error_compass().
|
inline |
Definition at line 123 of file AP_Compass.h.
Referenced by calculate_heading(), consistent(), and get_field().
|
inline |
Definition at line 331 of file AP_Compass.h.
Referenced by AP_Compass_Backend::field_ok().
uint8_t Compass::get_healthy_mask | ( | ) | const |
Definition at line 993 of file AP_Compass.cpp.
Referenced by healthy().
|
inline |
Definition at line 313 of file AP_Compass.h.
Referenced by CompassLearn::update().
|
inline |
get motor compensation factors as a vector
Definition at line 237 of file AP_Compass.h.
|
inline |
Definition at line 238 of file AP_Compass.h.
Referenced by get_motor_compensation().
|
inline |
get the motor compensation value.
Definition at line 225 of file AP_Compass.h.
|
inline |
Returns the current motor compensation offset values
Definition at line 250 of file AP_Compass.h.
Referenced by DataFlash_Class::Log_Write_Compass_instance().
|
inline |
Definition at line 251 of file AP_Compass.h.
Referenced by get_motor_offsets().
|
inline |
Definition at line 172 of file AP_Compass.h.
Referenced by CompassLearn::update().
|
inline |
Definition at line 173 of file AP_Compass.h.
Referenced by get_offdiagonals().
|
inline |
Returns the current offset values
Definition at line 166 of file AP_Compass.h.
Referenced by AP_Arming::compass_checks(), NavEKF2_core::getMagOffsets(), NavEKF3_core::getMagOffsets(), DataFlash_Class::Log_Write_Compass_instance(), NavEKF2_core::readMagData(), NavEKF3_core::readMagData(), GCS_MAVLINK::send_sensor_offsets(), and CompassLearn::update().
|
inline |
Definition at line 167 of file AP_Compass.h.
Referenced by configured(), and get_offsets().
|
inline |
Definition at line 327 of file AP_Compass.h.
Referenced by _start_calibration(), and AP_Arming::compass_checks().
|
inline |
Returns the instance of the primary compass
Definition at line 277 of file AP_Compass.h.
Referenced by _start_calibration(), calculate_heading(), get_diagonals(), get_field(), get_motor_compensation(), get_motor_offsets(), get_offdiagonals(), get_offsets(), healthy(), NavEKF2_core::InitialiseVariables(), NavEKF3_core::InitialiseVariables(), last_update_ms(), last_update_usec(), and use_for_yaw().
|
inlinestatic |
Definition at line 60 of file AP_Compass.h.
Referenced by AP::compass().
const Vector3f & Compass::getHIL | ( | uint8_t | instance | ) | const |
Definition at line 1240 of file AP_Compass.cpp.
Referenced by get_primary().
MAV_RESULT Compass::handle_mag_cal_command | ( | const mavlink_command_long_t & | packet | ) |
Definition at line 270 of file AP_Compass_Calibration.cpp.
Referenced by compass_cal_requires_reboot(), and GCS_MAVLINK::handle_command_mag_cal().
|
inline |
Return the health of a compass.
Definition at line 158 of file AP_Compass.h.
|
inline |
Definition at line 159 of file AP_Compass.h.
Referenced by _start_calibration(), get_healthy_mask(), healthy(), read(), and use_for_yaw().
bool Compass::init | ( | void | ) |
Initialize the compass device.
Definition at line 487 of file AP_Compass.cpp.
Referenced by setup().
bool Compass::is_calibrating | ( | ) | const |
Definition at line 239 of file AP_Compass_Calibration.cpp.
Referenced by _accept_calibration(), _start_calibration(), compass_cal_requires_reboot(), compass_cal_update(), and AP_Arming::compass_checks().
|
inline |
|
inline |
Definition at line 293 of file AP_Compass.h.
|
inline |
Definition at line 289 of file AP_Compass.h.
Referenced by AP_AHRS_DCM::drift_correction_yaw(), get_primary(), DataFlash_Class::Log_Write_Compass_instance(), AP_Compass_HIL::read(), SoloGimbalEKF::readMagData(), NavEKF2_core::readMagData(), and NavEKF3_core::readMagData().
|
inline |
Definition at line 290 of file AP_Compass.h.
|
inline |
Definition at line 194 of file AP_Compass.h.
Referenced by AP_Arming::compass_checks().
void Compass::motor_compensation_type | ( | const uint8_t | comp_type | ) |
Set the motor compensation type
comp_type | 0 = disabled, 1 = enabled use throttle, 2 = enabled use current |
Definition at line 1261 of file AP_Compass.cpp.
Referenced by set_board_orientation().
|
inline |
|
inline |
|
inline |
bool Compass::read | ( | void | ) |
Read the compass and update the mag_ variables.
Definition at line 979 of file AP_Compass.cpp.
Referenced by Compass_PerMotor::calibration_start(), AP_AHRS_DCM::drift_correction_yaw(), init(), and loop().
|
private |
Register a new compas driver, allocating an instance number
Definition at line 503 of file AP_Compass.cpp.
Referenced by AP_Compass_Backend::register_compass().
void Compass::save_motor_compensation | ( | ) |
Saves the current motor compensation x/y/z values.
This should be invoked periodically to save the offset values calculated by the motor compensation auto learning
Definition at line 1063 of file AP_Compass.cpp.
Referenced by get_motor_compensation().
void Compass::save_offsets | ( | uint8_t | i | ) |
Saves the current offset x/y/z values for one or all compasses
i | compass instance |
This should be invoked periodically to save the offset values maintained by ::learn_offsets.
Definition at line 1042 of file AP_Compass.cpp.
Referenced by CompassLearn::update().
void Compass::save_offsets | ( | void | ) |
Definition at line 1049 of file AP_Compass.cpp.
Referenced by calculate_heading(), and set_and_save_offsets().
void Compass::send_mag_cal_progress | ( | mavlink_channel_t | chan | ) |
Definition at line 176 of file AP_Compass_Calibration.cpp.
Referenced by compass_cal_requires_reboot(), and GCS_MAVLINK::try_send_compass_message().
void Compass::send_mag_cal_report | ( | mavlink_channel_t | chan | ) |
Definition at line 207 of file AP_Compass_Calibration.cpp.
Referenced by compass_cal_requires_reboot(), and GCS_MAVLINK::try_send_compass_message().
void Compass::set_and_save_diagonals | ( | uint8_t | i, |
const Vector3f & | diagonals | ||
) |
Definition at line 1024 of file AP_Compass.cpp.
Referenced by _accept_calibration(), and calculate_heading().
void Compass::set_and_save_offdiagonals | ( | uint8_t | i, |
const Vector3f & | diagonals | ||
) |
Definition at line 1033 of file AP_Compass.cpp.
Referenced by _accept_calibration(), and calculate_heading().
void Compass::set_and_save_offsets | ( | uint8_t | i, |
const Vector3f & | offsets | ||
) |
Sets and saves the compass offset x/y/z values.
i | compass instance |
offsets | Offsets to the raw mag_ values in milligauss. |
Definition at line 1014 of file AP_Compass.cpp.
Referenced by _accept_calibration(), calculate_heading(), GCS_MAVLINK::handle_command_preflight_set_sensor_offsets(), set_and_save_offsets(), and setup().
|
inline |
Program new offset values.
i | compass instance |
x | Offset to the raw mag_x value in milligauss. |
y | Offset to the raw mag_y value in milligauss. |
z | Offset to the raw mag_z value in milligauss. |
Definition at line 189 of file AP_Compass.h.
|
inline |
Definition at line 213 of file AP_Compass.h.
Referenced by AP_AHRS::set_orientation().
void Compass::set_declination | ( | float | radians, |
bool | save_to_eeprom = true |
||
) |
Sets the local magnetic field declination.
radians | Local field declination. |
save_to_eeprom | true to save to eeprom (false saves only to memory) |
Definition at line 1104 of file AP_Compass.cpp.
Referenced by set_use_for_yaw(), and setup().
|
inline |
Definition at line 286 of file AP_Compass.h.
void Compass::set_initial_location | ( | int32_t | latitude, |
int32_t | longitude | ||
) |
Sets the initial location used to get declination
latitude | GPS Latitude. |
longitude | GPS Longitude. |
Definition at line 1072 of file AP_Compass.cpp.
Referenced by get_offdiagonals().
|
inline |
Definition at line 318 of file AP_Compass.h.
Referenced by CompassLearn::update().
void Compass::set_motor_compensation | ( | uint8_t | i, |
const Vector3f & | motor_comp_factor | ||
) |
Set the motor compensation factor x/y/z values.
i | instance of compass |
offsets | Offsets multiplied by the throttle value and added to the raw mag_ values. |
Definition at line 1057 of file AP_Compass.cpp.
Referenced by get_motor_compensation_type(), and motor_compensation_type().
void Compass::set_offsets | ( | uint8_t | i, |
const Vector3f & | offsets | ||
) |
Sets offset x/y/z values.
i | compass instance |
offsets | Offsets to the raw mag_ values in milligauss. |
Definition at line 1005 of file AP_Compass.cpp.
Referenced by calculate_heading(), and CompassLearn::update().
|
inline |
Set the throttle as a percentage from 0.0 to 1.0
thr_pct | throttle expressed as a percentage from 0 to 1.0 |
Definition at line 255 of file AP_Compass.h.
|
inline |
Definition at line 200 of file AP_Compass.h.
Referenced by CompassLearn::update().
|
inline |
Set the battery voltage for per-motor compensation.
Definition at line 262 of file AP_Compass.h.
void Compass::setHIL | ( | uint8_t | instance, |
float | roll, | ||
float | pitch, | ||
float | yaw | ||
) |
Definition at line 1197 of file AP_Compass.cpp.
Referenced by get_primary().
void Compass::setHIL | ( | uint8_t | instance, |
const Vector3f & | mag, | ||
uint32_t | last_update_usec | ||
) |
Definition at line 1233 of file AP_Compass.cpp.
void Compass::start_calibration_all | ( | bool | retry = false , |
bool | autosave = false , |
||
float | delay_sec = 0.0f , |
||
bool | autoreboot = false |
||
) |
Definition at line 91 of file AP_Compass_Calibration.cpp.
Referenced by handle_mag_cal_command(), and per_motor_calibration_end().
bool Compass::use_for_yaw | ( | uint8_t | i | ) | const |
return true if the compass should be used for yaw calculations
return true if the specified compass can be used for yaw calculations
Definition at line 1095 of file AP_Compass.cpp.
Referenced by AP_AHRS_NavEKF::active_EKF_type(), AP_Arming::compass_checks(), loop(), SoloGimbalEKF::readMagData(), NavEKF2_core::readMagData(), NavEKF3_core::readMagData(), AP_AHRS_DCM::use_compass(), NavEKF2_core::use_compass(), NavEKF3_core::use_compass(), and AP_AHRS::use_compass().
bool Compass::use_for_yaw | ( | void | ) | const |
return true if the compass should be used for yaw calculations
Definition at line 1087 of file AP_Compass.cpp.
Referenced by _start_calibration(), configured(), consistent(), and learn_offsets_enabled().
|
friend |
Definition at line 51 of file AP_Compass.h.
|
friend |
Definition at line 64 of file AP_Compass.h.
|
private |
Definition at line 408 of file AP_Compass.h.
Referenced by set_initial_location().
|
private |
Definition at line 389 of file AP_Compass.h.
Referenced by _add_backend(), _detect_backends(), accumulate(), and read().
|
private |
Definition at line 388 of file AP_Compass.h.
Referenced by _add_backend(), accumulate(), Compass(), and read().
|
private |
Definition at line 398 of file AP_Compass.h.
Referenced by AP_Compass_Backend::rotate_field(), set_board_orientation(), and setHIL().
|
private |
Definition at line 360 of file AP_Compass.h.
Referenced by _start_calibration_mask(), compass_cal_update(), and start_calibration_all().
|
private |
Definition at line 364 of file AP_Compass.h.
Referenced by _accept_calibration(), and compass_cal_requires_reboot().
|
private |
Definition at line 365 of file AP_Compass.h.
Referenced by compass_cal_update().
|
private |
Definition at line 359 of file AP_Compass.h.
Referenced by _accept_calibration(), _cancel_calibration(), _start_calibration(), compass_cal_update(), and send_mag_cal_report().
|
private |
Definition at line 468 of file AP_Compass.h.
Referenced by _start_calibration().
|
private |
Definition at line 460 of file AP_Compass.h.
Referenced by _accept_calibration(), _accept_calibration_mask(), _cancel_calibration(), _get_cal_mask(), _start_calibration(), compass_cal_update(), is_calibrating(), AP_Compass_Backend::publish_raw_field(), send_mag_cal_progress(), and send_mag_cal_report().
|
private |
Definition at line 363 of file AP_Compass.h.
Referenced by _auto_reboot(), _start_calibration_mask(), and start_calibration_all().
|
private |
Definition at line 392 of file AP_Compass.h.
Referenced by _detect_backends(), _have_driver(), get_count(), init(), and register_compass().
|
private |
Definition at line 399 of file AP_Compass.h.
Referenced by AP_Compass_Backend::rotate_field(), set_board_orientation(), and setHIL().
|
private |
Definition at line 405 of file AP_Compass.h.
Referenced by calculate_heading(), get_declination(), set_declination(), and set_initial_location().
|
private |
Definition at line 471 of file AP_Compass.h.
Referenced by _detect_backends(), and _driver_enabled().
|
private |
Definition at line 473 of file AP_Compass.h.
Referenced by get_filter_range().
struct { ... } Compass::_hil |
Referenced by _setup_earth_field(), getHIL(), AP_Compass_HIL::read(), and setHIL().
|
private |
Definition at line 466 of file AP_Compass.h.
Referenced by _detect_backends(), and set_hil_mode().
|
private |
Definition at line 395 of file AP_Compass.h.
Referenced by _start_calibration(), get_learn_type(), learn_offsets_enabled(), set_learn_type(), and use_for_yaw().
|
staticprivate |
Definition at line 414 of file AP_Compass.h.
|
private |
Definition at line 418 of file AP_Compass.h.
Referenced by AP_Compass_Backend::correct_field(), get_motor_compensation_type(), motor_compensation_type(), save_motor_compensation(), and set_throttle().
|
private |
Definition at line 411 of file AP_Compass.h.
|
private |
Definition at line 458 of file AP_Compass.h.
Referenced by get_offsets_max().
|
private |
Definition at line 463 of file AP_Compass.h.
Referenced by AP_Compass_Backend::correct_field(), per_motor_calibration_end(), per_motor_calibration_start(), per_motor_calibration_update(), and set_voltage().
|
private |
Definition at line 402 of file AP_Compass.h.
Referenced by get_primary().
|
staticprivate |
Definition at line 334 of file AP_Compass.h.
Referenced by Compass(), consistent(), and get_singleton().
|
private |
Referenced by _have_driver(), _start_calibration(), Compass(), configured(), AP_Compass_Backend::correct_field(), get_diagonals(), get_field(), get_motor_compensation(), get_motor_offsets(), get_offdiagonals(), get_offsets(), healthy(), AP_Compass_Backend::is_external(), last_update_ms(), last_update_usec(), AP_Compass_Backend::publish_filtered_field(), AP_Compass_Backend::publish_raw_field(), read(), AP_Compass_Backend::rotate_field(), save_motor_compensation(), save_offsets(), set_and_save_diagonals(), set_and_save_offdiagonals(), set_and_save_offsets(), AP_Compass_Backend::set_dev_id(), AP_Compass_Backend::set_external(), AP_Compass_Backend::set_last_update_usec(), set_motor_compensation(), set_offsets(), AP_Compass_Backend::set_rotation(), set_use_for_yaw(), setHIL(), and use_for_yaw().
|
private |
Definition at line 421 of file AP_Compass.h.
Referenced by AP_Compass_Backend::correct_field(), motor_compensation_type(), and set_throttle().
Vector3f Compass::Bearth |
Definition at line 299 of file AP_Compass.h.
Vector3f Compass::field[COMPASS_MAX_INSTANCES] |
Definition at line 302 of file AP_Compass.h.
Referenced by calculate_heading(), and AP_Compass_HIL::read().
bool Compass::healthy[COMPASS_MAX_INSTANCES] |
Definition at line 301 of file AP_Compass.h.
Referenced by AP_Arming::compass_checks(), NavEKF2_core::getMagOffsets(), NavEKF3_core::getMagOffsets(), DataFlash_Class::Log_Write_Compass_instance(), loop(), and AP_Compass_HIL::read().
float Compass::last_declination |
Definition at line 300 of file AP_Compass.h.
|
static |
Definition at line 295 of file AP_Compass.h.
Referenced by Compass().