EKF: pass imuSample by const reference

This commit is contained in:
Daniel Agar
2020-10-30 09:47:22 -04:00
parent d85e24d3ca
commit defb35d8f5
4 changed files with 43 additions and 42 deletions
+5 -4
View File
@@ -378,7 +378,8 @@ public:
// Innovation Test Ratios - these are the ratio of the innovation to the acceptance threshold.
// A value > 1 indicates that the sensor measurement has exceeded the maximum acceptable level and has been rejected by the EKF
// Where a measurement type is a vector quantity, eg magnetometer, GPS position, etc, the maximum value is returned.
virtual void get_innovation_test_status(uint16_t &status, float &mag, float &vel, float &pos, float &hgt, float &tas, float &hagl, float &beta) = 0;
virtual void get_innovation_test_status(uint16_t &status, float &mag, float &vel, float &pos, float &hgt, float &tas,
float &hagl, float &beta) = 0;
// return a bitmask integer that describes which state estimates can be used for flight control
virtual void get_ekf_soln_status(uint16_t *status) = 0;
@@ -586,10 +587,10 @@ protected:
// this is the previous status of the filter control modes - used to detect mode transitions
filter_control_status_u _control_status_prev{};
inline void setDragData();
inline void setDragData(const imuSample &imu);
inline void computeVibrationMetric();
inline bool checkIfVehicleAtRest(float dt);
inline void computeVibrationMetric(const imuSample &imu);
inline bool checkIfVehicleAtRest(float dt, const imuSample &imu);
virtual float compensateBaroForDynamicPressure(const float baro_alt_uncompensated) = 0;