From f00f6e6eff8f46228700c3885f4f16f33f04d65a Mon Sep 17 00:00:00 2001 From: CarlOlsson Date: Wed, 8 Jun 2016 19:46:02 +0200 Subject: [PATCH] added parameter for when to fuse sideslip --- src/modules/ekf2/ekf2_main.cpp | 2 ++ src/modules/ekf2/ekf2_params.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index c558a71513..ddb869a8f0 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -270,6 +270,7 @@ private: control::BlockParamFloat _arspFusionThreshold; // a value of zero will disabled airspeed fusion. Any another positive value will determine // the minimum airspeed which will still be fused + control::BlockParamInt _fuseBeta; // 0 disables synthetic sideslip fusion, 1 activates it // output predictor filter time constants control::BlockParamExtFloat _tau_vel; // time constant used by the output velocity complementary filter (s) @@ -376,6 +377,7 @@ Ekf2::Ekf2(): _ev_pos_y(this, "EKF2_EV_POS_Y", false, _params->ev_pos_body(1)), _ev_pos_z(this, "EKF2_EV_POS_Z", false, _params->ev_pos_body(2)), _arspFusionThreshold(this, "EKF2_ARSP_THR", false), + _fuseBeta(this, "EKF2_FUSE_BETA",false), _tau_vel(this, "EKF2_TAU_VEL", false, _params->vel_Tau), _tau_pos(this, "EKF2_TAU_POS", false, _params->pos_Tau), _gyr_bias_init(this, "EKF2_GBIAS_INIT", false, _params->switch_on_gyro_bias), diff --git a/src/modules/ekf2/ekf2_params.c b/src/modules/ekf2/ekf2_params.c index d9952e237d..096d7bb023 100644 --- a/src/modules/ekf2/ekf2_params.c +++ b/src/modules/ekf2/ekf2_params.c @@ -820,6 +820,16 @@ PARAM_DEFINE_FLOAT(EKF2_EV_POS_Z, 0.0f); */ PARAM_DEFINE_FLOAT(EKF2_ARSP_THR, 0.0f); + /** + * Boolean determining if synthetic sideslip measurements should fused. + * + * A value of 1 indicates that fusion is active + * + * @group EKF2 + * @boolean + */ +PARAM_DEFINE_INT32(EKF2_FUSE_BETA, 0); + /** * Time constant of the velocity output prediction and smoothing filter