From 49946495008f89da7dbfe2bdd496651d11faca3a Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 23 Mar 2022 16:52:50 +0100 Subject: [PATCH] ekf rng kin: increase default gate size The user needs to tune the range finder noise parameters properly and we shouldn't need such a small gate --- src/modules/ekf2/EKF/common.h | 2 +- src/modules/ekf2/ekf2_params.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/ekf2/EKF/common.h b/src/modules/ekf2/EKF/common.h index d940d40220..8f5cfead8d 100644 --- a/src/modules/ekf2/EKF/common.h +++ b/src/modules/ekf2/EKF/common.h @@ -307,7 +307,7 @@ struct parameters { float range_aid_innov_gate{1.0f}; ///< gate size used for innovation consistency checks for range aid fusion float range_valid_quality_s{1.0f}; ///< minimum duration during which the reported range finder signal quality needs to be non-zero in order to be declared valid (s) float range_cos_max_tilt{0.7071f}; ///< cosine of the maximum tilt angle from the vertical that permits use of range finder and flow data - float range_kin_consistency_gate{0.2f}; ///< gate size used by the range finder kinematic consistency check + float range_kin_consistency_gate{1.0f}; ///< gate size used by the range finder kinematic consistency check // vision position fusion float ev_vel_innov_gate{3.0f}; ///< vision velocity fusion innovation consistency gate size (STD) diff --git a/src/modules/ekf2/ekf2_params.c b/src/modules/ekf2/ekf2_params.c index f7565b2106..125c61399e 100644 --- a/src/modules/ekf2/ekf2_params.c +++ b/src/modules/ekf2/ekf2_params.c @@ -1122,12 +1122,14 @@ PARAM_DEFINE_FLOAT(EKF2_RNG_QLTY_T, 1.0f); * * Decrease this value to make the filter more robust against range finder faulty data (stuck, reflections, ...). * + * Note: tune the range finder noise parameters (EKF2_RNG_NOISE and EKF2_RNG_SFE) before tuning this gate. + * * @group EKF2 * @unit SD - * @min 0.01 + * @min 0.1 * @max 5.0 */ -PARAM_DEFINE_FLOAT(EKF2_RNG_K_GATE, 0.2f); +PARAM_DEFINE_FLOAT(EKF2_RNG_K_GATE, 1.0f); /** * Gate size for vision velocity estimate fusion