diff --git a/src/modules/wind_estimator/wind_estimator_main.cpp b/src/modules/wind_estimator/wind_estimator_main.cpp index 01ea736a3e..cc64bfa652 100644 --- a/src/modules/wind_estimator/wind_estimator_main.cpp +++ b/src/modules/wind_estimator/wind_estimator_main.cpp @@ -93,7 +93,9 @@ private: (ParamFloat) wind_p_noise, (ParamFloat) tas_scale_p_noise, (ParamFloat) tas_noise, - (ParamFloat) beta_noise + (ParamFloat) beta_noise, + (ParamInt) airspeed_gate, + (ParamInt) sideslip_gate ) static void cycle_trampoline(void *arg); @@ -274,6 +276,8 @@ void WindEstimatorModule::update_params() _wind_estimator.set_tas_scale_p_noise(tas_scale_p_noise.get()); _wind_estimator.set_tas_noise(tas_noise.get()); _wind_estimator.set_beta_noise(beta_noise.get()); + _wind_estimator.set_tas_gate(airspeed_gate.get()); + _wind_estimator.set_beta_gate(sideslip_gate.get()); } int WindEstimatorModule::custom_command(int argc, char *argv[]) diff --git a/src/modules/wind_estimator/wind_estimator_params.c b/src/modules/wind_estimator/wind_estimator_params.c index 3dd3840904..42ae79f464 100644 --- a/src/modules/wind_estimator/wind_estimator_params.c +++ b/src/modules/wind_estimator/wind_estimator_params.c @@ -36,3 +36,27 @@ PARAM_DEFINE_FLOAT(WEST_TAS_NOISE, 1.4); * @group Wind Estimator */ PARAM_DEFINE_FLOAT(WEST_BETA_NOISE, 0.3); + +/** + * Gate size for true airspeed fusion. + * + * Sets the number of standard deviations used by the innovation consistency test. + * + * @min 1 + * @max 5 + * @unit SD + * @group Wind Estimator + */ +PARAM_DEFINE_INT32(WEST_TAS_GATE, 3); + +/** + * Gate size for true sideslip fusion. + * + * Sets the number of standard deviations used by the innovation consistency test. + * + * @min 1 + * @max 5 + * @unit SD + * @group Wind Estimator + */ +PARAM_DEFINE_INT32(WEST_BETA_GATE, 1);