mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 09:03:34 +08:00
ekf2: delete obsolete _bad_vert_accel_detected
This commit is contained in:
@@ -550,7 +550,6 @@ private:
|
||||
// imu fault status
|
||||
uint64_t _time_bad_vert_accel{0}; ///< last time a bad vertical accel was detected (uSec)
|
||||
uint64_t _time_good_vert_accel{0}; ///< last time a good vertical accel was detected (uSec)
|
||||
bool _bad_vert_accel_detected{false}; ///< true when bad vertical accelerometer data has been detected
|
||||
uint16_t _clip_counter{0}; ///< counter that increments when clipping ad decrements when not
|
||||
|
||||
// variables used to control range aid functionality
|
||||
|
||||
@@ -86,7 +86,7 @@ bool Ekf::fuseVerticalVelocity(const Vector3f &innov, const Vector2f &innov_gate
|
||||
// but limit innovation to prevent spikes that could destabilise the filter
|
||||
float innovation;
|
||||
|
||||
if (_bad_vert_accel_detected && !innov_check_pass) {
|
||||
if (_fault_status.flags.bad_acc_vertical && !innov_check_pass) {
|
||||
const float innov_limit = innov_gate(1) * sqrtf(innov_var(2));
|
||||
innovation = math::constrain(innov(2), -innov_limit, innov_limit);
|
||||
innov_check_pass = true;
|
||||
@@ -160,7 +160,7 @@ bool Ekf::fuseVerticalPosition(const Vector3f &innov, const Vector2f &innov_gate
|
||||
// but limit innovation to prevent spikes that could destabilise the filter
|
||||
float innovation;
|
||||
|
||||
if (_bad_vert_accel_detected && !innov_check_pass) {
|
||||
if (_fault_status.flags.bad_acc_vertical && !innov_check_pass) {
|
||||
const float innov_limit = innov_gate(1) * sqrtf(innov_var(2));
|
||||
innovation = math::constrain(innov(2), -innov_limit, innov_limit);
|
||||
innov_check_pass = true;
|
||||
|
||||
Reference in New Issue
Block a user