APM:Libraries
|
#include <AP_AHRS_DCM.h>
Public Member Functions | |
AP_AHRS_DCM () | |
AP_AHRS_DCM (const AP_AHRS_DCM &other)=delete | |
AP_AHRS_DCM & | operator= (const AP_AHRS_DCM &)=delete |
const Vector3f & | get_gyro () const override |
const Matrix3f & | get_rotation_body_to_ned () const override |
const Vector3f & | get_gyro_drift () const override |
void | reset_gyro_drift () override |
void | update (bool skip_ins_update=false) override |
void | reset (bool recover_eulers=false) override |
void | reset_attitude (const float &roll, const float &pitch, const float &yaw) override |
virtual bool | get_position (struct Location &loc) const override |
float | get_error_rp () const override |
float | get_error_yaw () const override |
Vector3f | wind_estimate () const override |
void | get_relative_position_D_home (float &posD) const override |
bool | airspeed_estimate (float *airspeed_ret) const override |
bool | use_compass () override |
void | set_home (const Location &loc) override |
void | estimate_wind (void) |
bool | healthy () const override |
uint32_t | uptime_ms () const override |
![]() | |
AP_AHRS () | |
virtual | ~AP_AHRS () |
virtual void | init () |
void | set_fly_forward (bool b) |
bool | get_fly_forward (void) const |
void | set_likely_flying (bool b) |
bool | get_likely_flying (void) const |
uint32_t | get_time_flying_ms (void) const |
AHRS_VehicleClass | get_vehicle_class (void) const |
void | set_vehicle_class (AHRS_VehicleClass vclass) |
void | set_wind_estimation (bool b) |
void | set_compass (Compass *compass) |
const Compass * | get_compass () const |
void | set_optflow (const OpticalFlow *optflow) |
const OpticalFlow * | get_optflow () const |
void | set_orientation () |
void | set_airspeed (AP_Airspeed *airspeed) |
void | set_beacon (AP_Beacon *beacon) |
const AP_Airspeed * | get_airspeed (void) const |
const AP_Beacon * | get_beacon (void) const |
virtual uint8_t | get_primary_accel_index (void) const |
virtual uint8_t | get_primary_gyro_index (void) const |
virtual const Vector3f & | get_accel_ef (uint8_t i) const |
virtual const Vector3f & | get_accel_ef (void) const |
virtual const Vector3f & | get_accel_ef_blended (void) const |
float | get_yaw_rate_earth (void) const |
virtual const char * | prearm_failure_reason (void) const |
virtual bool | have_ekf_logging (void) const |
Vector3f | get_gyro_latest (void) const |
const Matrix3f & | get_rotation_autopilot_body_to_vehicle_body (void) const |
const Matrix3f & | get_rotation_vehicle_body_to_autopilot_body (void) const |
virtual bool | get_hagl (float &height) const |
bool | airspeed_estimate_true (float *airspeed_ret) const |
float | get_EAS2TAS (void) const |
bool | airspeed_sensor_enabled (void) const |
virtual Vector2f | groundspeed_vector (void) |
virtual bool | get_velocity_NED (Vector3f &vec) const |
virtual bool | get_expected_mag_field_NED (Vector3f &ret) const |
virtual bool | get_mag_field_correction (Vector3f &ret) const |
virtual bool | get_relative_position_NED_home (Vector3f &vec) const |
virtual bool | get_relative_position_NED_origin (Vector3f &vec) const |
virtual bool | get_relative_position_NE_home (Vector2f &vecNE) const |
virtual bool | get_relative_position_NE_origin (Vector2f &vecNE) const |
virtual bool | get_relative_position_D_origin (float &posD) const |
float | groundspeed (void) |
bool | yaw_initialised (void) const |
void | set_correct_centrifugal (bool setting) |
bool | get_correct_centrifugal (void) const |
const Vector3f & | get_trim () const |
virtual void | set_trim (Vector3f new_trim) |
virtual void | add_trim (float roll_in_radians, float pitch_in_radians, bool save_to_eeprom=true) |
float | cos_roll () const |
float | cos_pitch () const |
float | cos_yaw () const |
float | sin_roll () const |
float | sin_pitch () const |
float | sin_yaw () const |
virtual bool | get_secondary_attitude (Vector3f &eulers) const |
virtual bool | get_secondary_quaternion (Quaternion &quat) const |
virtual bool | get_secondary_position (struct Location &loc) const |
const struct Location & | get_home (void) const |
void | lock_home () |
bool | home_is_locked () const |
bool | home_is_set (void) const |
virtual bool | set_origin (const Location &loc) |
virtual bool | get_origin (Location &ret) const |
void | Log_Write_Home_And_Origin () |
virtual bool | have_inertial_nav (void) const |
uint8_t | get_active_accel_instance (void) const |
virtual bool | initialised (void) const |
virtual uint32_t | getLastYawResetAngle (float &yawAng) const |
virtual uint32_t | getLastPosNorthEastReset (Vector2f &pos) const |
virtual uint32_t | getLastVelNorthEastReset (Vector2f &vel) const |
virtual uint32_t | getLastPosDownReset (float &posDelta) const |
virtual bool | resetHeightDatum (void) |
virtual bool | get_variances (float &velVar, float &posVar, float &hgtVar, Vector3f &magVar, float &tasVar, Vector2f &offset) const |
int8_t | get_ekf_type (void) const |
virtual void | getCorrectedDeltaVelocityNED (Vector3f &ret, float &dt) const |
AP_AHRS_View * | create_view (enum Rotation rotation) |
float | getAOA (void) |
float | getSSA (void) |
Vector2f | rotate_earth_to_body2D (const Vector2f &ef_vector) const |
Vector2f | rotate_body_to_earth2D (const Vector2f &bf) const |
virtual void | update_AOA_SSA (void) |
virtual bool | get_hgt_ctrl_limit (float &limit) const |
virtual void | writeExtNavData (const Vector3f &sensOffset, const Vector3f &pos, const Quaternion &quat, float posErr, float angErr, uint32_t timeStamp_ms, uint32_t resetTime_ms) |
Private Member Functions | |
void | matrix_update (float _G_Dt) |
void | normalize (void) |
void | check_matrix (void) |
bool | renorm (Vector3f const &a, Vector3f &result) |
void | drift_correction (float deltat) |
void | drift_correction_yaw (void) |
float | yaw_error_compass () |
void | euler_angles (void) |
bool | have_gps (void) const |
bool | use_fast_gains (void) const |
Vector3f | ra_delayed (uint8_t instance, const Vector3f &ra) |
float | _P_gain (float spin_rate) |
float | _yaw_gain (void) const |
Private Attributes | |
float | _ki |
float | _ki_yaw |
Matrix3f | _dcm_matrix |
Matrix3f | _body_dcm_matrix |
Vector3f | _omega_P |
Vector3f | _omega_yaw_P |
Vector3f | _omega_I |
Vector3f | _omega_I_sum |
float | _omega_I_sum_time |
Vector3f | _omega |
Vector3f | _ra_delay_buffer [INS_MAX_INSTANCES] |
float | _renorm_val_sum |
uint16_t | _renorm_val_count |
float | _error_rp |
float | _error_yaw |
uint32_t | _gps_last_update |
Vector3f | _ra_sum [INS_MAX_INSTANCES] |
Vector3f | _last_velocity |
float | _ra_deltat |
uint32_t | _ra_sum_start |
float | _last_declination |
Vector2f | _mag_earth |
bool | _have_gps_lock |
int32_t | _last_lat |
int32_t | _last_lng |
float | _position_offset_north |
float | _position_offset_east |
bool | _have_position |
Vector3f | _last_fuse |
Vector3f | _last_vel |
uint32_t | _last_wind_time |
float | _last_airspeed |
uint32_t | _last_consistent_heading |
Vector3f | _wind |
float | _imu1_weight |
uint32_t | _last_failure_ms |
uint32_t | _last_startup_ms |
Definition at line 24 of file AP_AHRS_DCM.h.
|
inline |
|
delete |
|
private |
Definition at line 339 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction(), and drift_correction_yaw().
|
private |
Definition at line 358 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction_yaw().
|
overridevirtual |
Reimplemented from AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 980 of file AP_AHRS_DCM.cpp.
Referenced by AP_AHRS_NavEKF::airspeed_estimate(), and wind_estimate().
|
private |
Definition at line 201 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction(), and update().
|
private |
Definition at line 575 of file AP_AHRS_DCM.cpp.
Referenced by update().
|
private |
Definition at line 431 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction().
void AP_AHRS_DCM::estimate_wind | ( | void | ) |
Definition at line 885 of file AP_AHRS_DCM.cpp.
Referenced by wind_estimate().
|
private |
Definition at line 952 of file AP_AHRS_DCM.cpp.
Referenced by update().
|
inlineoverridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 76 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_NavEKF::get_error_rp().
|
inlineoverridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 79 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_NavEKF::get_error_yaw().
|
inlineoverridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 47 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_NavEKF::get_gyro().
|
inlineoverridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 57 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_NavEKF::get_gyro_drift().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 962 of file AP_AHRS_DCM.cpp.
Referenced by get_gyro_drift(), AP_AHRS_NavEKF::get_position(), and AP_AHRS_NavEKF::get_secondary_position().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 1019 of file AP_AHRS_DCM.cpp.
Referenced by wind_estimate().
|
inlineoverridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 52 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_NavEKF::get_rotation_body_to_ned(), and AP_AHRS_NavEKF::get_secondary_quaternion().
|
private |
Definition at line 370 of file AP_AHRS_DCM.cpp.
Referenced by airspeed_estimate(), drift_correction(), drift_correction_yaw(), and use_compass().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 1027 of file AP_AHRS_DCM.cpp.
Referenced by AP_AHRS_NavEKF::healthy(), and wind_estimate().
|
private |
Definition at line 101 of file AP_AHRS_DCM.cpp.
Referenced by update().
|
private |
Definition at line 285 of file AP_AHRS_DCM.cpp.
Referenced by check_matrix(), and update().
|
delete |
return an accel vector delayed by AHRS_ACCEL_DELAY samples for a specific accelerometer instance
Definition at line 552 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction().
Definition at line 231 of file AP_AHRS_DCM.cpp.
Referenced by normalize().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 142 of file AP_AHRS_DCM.cpp.
Referenced by check_matrix(), get_gyro_drift(), normalize(), and AP_AHRS_NavEKF::reset().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 192 of file AP_AHRS_DCM.cpp.
Referenced by get_gyro_drift(), and AP_AHRS_NavEKF::reset_attitude().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 41 of file AP_AHRS_DCM.cpp.
Referenced by get_gyro_drift(), and AP_AHRS_NavEKF::reset_gyro_drift().
|
overridevirtual |
Implements AP_AHRS.
Definition at line 1011 of file AP_AHRS_DCM.cpp.
Referenced by wind_estimate().
|
overridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 50 of file AP_AHRS_DCM.cpp.
Referenced by get_gyro_drift(), loop(), and AP_AHRS_NavEKF::update_DCM().
|
overridevirtual |
Implements AP_AHRS.
Definition at line 1036 of file AP_AHRS_DCM.cpp.
Referenced by wind_estimate().
|
overridevirtual |
Reimplemented from AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 393 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction(), drift_correction_yaw(), AP_AHRS_NavEKF::use_compass(), and wind_estimate().
|
private |
Definition at line 386 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction(), and drift_correction_yaw().
|
inlineoverridevirtual |
Implements AP_AHRS.
Reimplemented in AP_AHRS_NavEKF.
Definition at line 84 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_NavEKF::wind_estimate().
|
private |
Definition at line 307 of file AP_AHRS_DCM.cpp.
Referenced by drift_correction_yaw().
|
private |
Definition at line 125 of file AP_AHRS_DCM.h.
Referenced by euler_angles(), and get_rotation_body_to_ned().
|
private |
Definition at line 122 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_DCM(), check_matrix(), drift_correction(), drift_correction_yaw(), estimate_wind(), euler_angles(), matrix_update(), normalize(), reset(), reset_attitude(), and yaw_error_compass().
|
private |
Definition at line 147 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and get_error_rp().
|
private |
Definition at line 148 of file AP_AHRS_DCM.h.
Referenced by drift_correction_yaw(), and get_error_yaw().
|
private |
Definition at line 151 of file AP_AHRS_DCM.h.
Referenced by drift_correction_yaw().
|
private |
Definition at line 164 of file AP_AHRS_DCM.h.
Referenced by drift_correction().
|
private |
Definition at line 175 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and get_position().
|
private |
Definition at line 187 of file AP_AHRS_DCM.h.
Referenced by drift_correction().
|
private |
Definition at line 106 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_DCM(), and drift_correction().
|
private |
Definition at line 107 of file AP_AHRS_DCM.h.
Referenced by AP_AHRS_DCM(), and drift_correction_yaw().
|
private |
Definition at line 181 of file AP_AHRS_DCM.h.
Referenced by airspeed_estimate(), and drift_correction().
|
private |
Definition at line 182 of file AP_AHRS_DCM.h.
Referenced by use_compass().
|
private |
Definition at line 160 of file AP_AHRS_DCM.h.
Referenced by yaw_error_compass().
|
private |
Definition at line 190 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), healthy(), and normalize().
|
private |
Definition at line 178 of file AP_AHRS_DCM.h.
Referenced by estimate_wind().
|
private |
Definition at line 167 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and get_position().
|
private |
Definition at line 168 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and get_position().
|
private |
Definition at line 193 of file AP_AHRS_DCM.h.
Referenced by reset(), update(), uptime_ms(), and use_fast_gains().
|
private |
Definition at line 179 of file AP_AHRS_DCM.h.
Referenced by estimate_wind().
|
private |
Definition at line 155 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and estimate_wind().
|
private |
Definition at line 180 of file AP_AHRS_DCM.h.
Referenced by estimate_wind().
|
private |
Definition at line 161 of file AP_AHRS_DCM.h.
Referenced by yaw_error_compass().
|
private |
Definition at line 132 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), drift_correction_yaw(), get_gyro(), matrix_update(), and reset().
|
private |
Definition at line 129 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), get_gyro_drift(), matrix_update(), reset(), and reset_gyro_drift().
|
private |
Definition at line 130 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), drift_correction_yaw(), and reset_gyro_drift().
|
private |
Definition at line 131 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and reset_gyro_drift().
|
private |
Definition at line 127 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), matrix_update(), and reset().
|
private |
Definition at line 128 of file AP_AHRS_DCM.h.
Referenced by drift_correction_yaw(), matrix_update(), and reset().
|
private |
Definition at line 172 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and get_position().
|
private |
Definition at line 171 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and get_position().
|
private |
Definition at line 136 of file AP_AHRS_DCM.h.
Referenced by ra_delayed().
|
private |
Definition at line 156 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and update().
|
private |
Definition at line 154 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), and update().
|
private |
Definition at line 157 of file AP_AHRS_DCM.h.
Referenced by drift_correction().
|
private |
Definition at line 146 of file AP_AHRS_DCM.h.
Referenced by renorm().
|
private |
Definition at line 145 of file AP_AHRS_DCM.h.
Referenced by renorm().
|
private |
Definition at line 185 of file AP_AHRS_DCM.h.
Referenced by drift_correction(), estimate_wind(), use_compass(), and wind_estimate().