Browse Source

AP_AHRS: remove HIL support

zr-v5.1
Peter Barker 4 years ago committed by Andrew Tridgell
parent
commit
ee0a373b60
  1. 3
      libraries/AP_AHRS/AP_AHRS.h
  2. 6
      libraries/AP_AHRS/AP_AHRS_DCM.cpp
  3. 3
      libraries/AP_AHRS/AP_AHRS_DCM.h
  4. 20
      libraries/AP_AHRS/AP_AHRS_NavEKF.cpp
  5. 3
      libraries/AP_AHRS/AP_AHRS_NavEKF.h

3
libraries/AP_AHRS/AP_AHRS.h

@ -220,9 +220,6 @@ public: @@ -220,9 +220,6 @@ public:
// reset the current attitude, used on new IMU calibration
virtual void reset(bool recover_eulers=false) = 0;
// reset the current attitude, used on new IMU calibration
virtual void reset_attitude(const float &roll, const float &pitch, const float &yaw) = 0;
// return the average size of the roll/pitch error estimate
// since last call
virtual float get_error_rp(void) const = 0;

6
libraries/AP_AHRS/AP_AHRS_DCM.cpp

@ -239,12 +239,6 @@ AP_AHRS_DCM::reset(bool recover_eulers) @@ -239,12 +239,6 @@ AP_AHRS_DCM::reset(bool recover_eulers)
_last_startup_ms = AP_HAL::millis();
}
// reset the current attitude, used by HIL
void AP_AHRS_DCM::reset_attitude(const float &_roll, const float &_pitch, const float &_yaw)
{
_dcm_matrix.from_euler(_roll, _pitch, _yaw);
}
/*
* check the DCM matrix for pathological values
*/

3
libraries/AP_AHRS/AP_AHRS_DCM.h

@ -69,9 +69,6 @@ public: @@ -69,9 +69,6 @@ public:
void update(bool skip_ins_update=false) override;
void reset(bool recover_eulers = false) override;
// reset the current attitude, used on new IMU calibration
void reset_attitude(const float &roll, const float &pitch, const float &yaw) override;
// dead-reckoning support
virtual bool get_position(struct Location &loc) const override;

20
libraries/AP_AHRS/AP_AHRS_NavEKF.cpp

@ -517,26 +517,6 @@ void AP_AHRS_NavEKF::reset(bool recover_eulers) @@ -517,26 +517,6 @@ void AP_AHRS_NavEKF::reset(bool recover_eulers)
#endif
}
// reset the current attitude, used on new IMU calibration
void AP_AHRS_NavEKF::reset_attitude(const float &_roll, const float &_pitch, const float &_yaw)
{
// support locked access functions to AHRS data
WITH_SEMAPHORE(_rsem);
AP_AHRS_DCM::reset_attitude(_roll, _pitch, _yaw);
_dcm_attitude = {roll, pitch, yaw};
#if HAL_NAVEKF2_AVAILABLE
if (_ekf2_started) {
_ekf2_started = EKF2.InitialiseFilter();
}
#endif
#if HAL_NAVEKF3_AVAILABLE
if (_ekf3_started) {
_ekf3_started = EKF3.InitialiseFilter();
}
#endif
}
// dead-reckoning support
bool AP_AHRS_NavEKF::get_position(struct Location &loc) const
{

3
libraries/AP_AHRS/AP_AHRS_NavEKF.h

@ -78,9 +78,6 @@ public: @@ -78,9 +78,6 @@ public:
void update(bool skip_ins_update=false) override;
void reset(bool recover_eulers = false) override;
// reset the current attitude, used on new IMU calibration
void reset_attitude(const float &roll, const float &pitch, const float &yaw) override;
// dead-reckoning support
bool get_position(struct Location &loc) const override;

Loading…
Cancel
Save