Browse Source

AP_NavEKF3: add accessor for GSF yaw estimator

gps-1.3.1
Andrew Tridgell 3 years ago
parent
commit
282209e3e6
  1. 9
      libraries/AP_NavEKF3/AP_NavEKF3.cpp
  2. 4
      libraries/AP_NavEKF3/AP_NavEKF3.h
  3. 3
      libraries/AP_NavEKF3/AP_NavEKF3_core.h

9
libraries/AP_NavEKF3/AP_NavEKF3.cpp

@ -2015,3 +2015,12 @@ bool NavEKF3::isVibrationAffected(int8_t instance) const @@ -2015,3 +2015,12 @@ bool NavEKF3::isVibrationAffected(int8_t instance) const
}
return false;
}
// get a yaw estimator instance
const EKFGSF_yaw *NavEKF3::get_yawEstimator(void) const
{
if (core) {
return core[primary].get_yawEstimator();
}
return nullptr;
}

4
libraries/AP_NavEKF3/AP_NavEKF3.h

@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
#include <AP_NavEKF/AP_NavEKF_Source.h>
class NavEKF3_core;
class EKFGSF_yaw;
class NavEKF3 {
friend class NavEKF3_core;
@ -358,6 +359,9 @@ public: @@ -358,6 +359,9 @@ public:
// if instance < 0, the primary instance will be used
bool isVibrationAffected(int8_t instance) const;
// get a yaw estimator instance
const EKFGSF_yaw *get_yawEstimator(void) const;
private:
uint8_t num_cores; // number of allocated cores
uint8_t primary; // current primary core

3
libraries/AP_NavEKF3/AP_NavEKF3_core.h

@ -421,6 +421,9 @@ public: @@ -421,6 +421,9 @@ public:
// returns true when the state estimates are significantly degraded by vibration
bool isVibrationAffected() const { return badIMUdata; }
// get a yaw estimator instance
const EKFGSF_yaw *get_yawEstimator(void) const { return yawEstimator; }
private:
EKFGSF_yaw *yawEstimator;
AP_DAL &dal;

Loading…
Cancel
Save