HTE: do not update the estimator during fast up/down motions

Drag and prop wash effects produce significant forces at high speed
that can bias the estimator when applied for an extended period of time
This commit is contained in:
bresch
2020-12-16 11:34:31 +01:00
committed by Julian Kent
parent 39251daf28
commit 690c1158ad
@@ -164,7 +164,10 @@ void MulticopterHoverThrustEstimator::Run()
if (PX4_ISFINITE(local_pos_sp.thrust[2])) {
// Inform the hover thrust estimator about the measured vertical
// acceleration (positive acceleration is up) and the current thrust (positive thrust is up)
_hover_thrust_ekf.fuseAccZ(-local_pos.az, -local_pos_sp.thrust[2]);
// Guard against fast up and down motions biasing the estimator due to large drag and prop wash effects
if (fabsf(local_pos.vz) < 2.f) {
_hover_thrust_ekf.fuseAccZ(-local_pos.az, -local_pos_sp.thrust[2]);
}
const bool valid = (_hover_thrust_ekf.getHoverThrustEstimateVar() < 0.001f)
&& (_hover_thrust_ekf.getInnovationTestRatio() < 1.f);