Browse Source

ekf2: reset the timeout timer in the reset function directly

master
bresch 3 years ago committed by Mathieu Bresciani
parent
commit
5e790da634
  1. 2
      src/modules/ekf2/EKF/control.cpp
  2. 3
      src/modules/ekf2/EKF/ekf_helper.cpp

2
src/modules/ekf2/EKF/control.cpp

@ -734,8 +734,6 @@ void Ekf::controlHeightSensorTimeouts() @@ -734,8 +734,6 @@ void Ekf::controlHeightSensorTimeouts()
// Reset vertical position and velocity states to the last measurement
if (request_height_reset) {
resetHeight();
// Reset the timout timer
_time_last_hgt_fuse = _time_last_imu;
}
}
}

3
src/modules/ekf2/EKF/ekf_helper.cpp

@ -345,6 +345,9 @@ void Ekf::resetHeight() @@ -345,6 +345,9 @@ void Ekf::resetHeight()
// that does not destabilise the filter
P.uncorrelateCovarianceSetVariance<1>(6, 10.0f);
}
// Reset the timout timer
_time_last_hgt_fuse = _time_last_imu;
}
// align output filter states to match EKF states at the fusion time horizon

Loading…
Cancel
Save