From a665764b0ea3feca23c079b545919bd958411b58 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 20 Jun 2024 15:10:59 +0200 Subject: [PATCH] ekf2: remove unused EKF2_TERR_MASK --- .../init.d/airframes/4061_atl_mantis_edu | 1 - src/modules/ekf2/EKF/common.h | 3 --- src/modules/ekf2/EKF2.cpp | 1 - src/modules/ekf2/EKF2.hpp | 1 - src/modules/ekf2/module.yaml | 16 +--------------- 5 files changed, 1 insertion(+), 21 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu b/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu index d3f48bcc07..95df14d54e 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu +++ b/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu @@ -36,7 +36,6 @@ param set-default COM_RC_LOSS_T 3 # ekf2 -param set-default EKF2_TERR_MASK 1 param set-default EKF2_BARO_NOISE 2 param set-default EKF2_BCOEF_X 31.5 diff --git a/src/modules/ekf2/EKF/common.h b/src/modules/ekf2/EKF/common.h index 70be188572..ae1d185860 100644 --- a/src/modules/ekf2/EKF/common.h +++ b/src/modules/ekf2/EKF/common.h @@ -382,9 +382,6 @@ struct parameters { #endif // CONFIG_EKF2_SIDESLIP #if defined(CONFIG_EKF2_TERRAIN) - int32_t terrain_fusion_mode{static_cast(TerrainFusionMask::TerrainFuseRangeFinder) - | static_cast(TerrainFusionMask::TerrainFuseOpticalFlow)}; ///< aiding source(s) selection bitmask for the terrain estimation - float terrain_p_noise{5.0f}; ///< process noise for terrain offset (m/sec) float terrain_gradient{0.5f}; ///< gradient of terrain used to estimate process noise due to changing position (m/m) const float terrain_timeout{10.f}; ///< maximum time for invalid bottom distance measurements before resetting terrain estimate (s) diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index 430ed52db5..32933b5c86 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -147,7 +147,6 @@ EKF2::EKF2(bool multi_mode, const px4::wq_config_t &config, bool replay_mode): _param_ekf2_min_rng(_params->rng_gnd_clearance), #endif // CONFIG_EKF2_TERRAIN || CONFIG_EKF2_OPTICAL_FLOW || CONFIG_EKF2_RANGE_FINDER #if defined(CONFIG_EKF2_TERRAIN) - _param_ekf2_terr_mask(_params->terrain_fusion_mode), _param_ekf2_terr_noise(_params->terrain_p_noise), _param_ekf2_terr_grad(_params->terrain_gradient), #endif // CONFIG_EKF2_TERRAIN diff --git a/src/modules/ekf2/EKF2.hpp b/src/modules/ekf2/EKF2.hpp index 10a51c9dcd..fc50610fd2 100644 --- a/src/modules/ekf2/EKF2.hpp +++ b/src/modules/ekf2/EKF2.hpp @@ -604,7 +604,6 @@ private: (ParamExtFloat) _param_ekf2_min_rng, #endif // CONFIG_EKF2_TERRAIN || CONFIG_EKF2_OPTICAL_FLOW || CONFIG_EKF2_RANGE_FINDER #if defined(CONFIG_EKF2_TERRAIN) - (ParamExtInt) _param_ekf2_terr_mask, (ParamExtFloat) _param_ekf2_terr_noise, (ParamExtFloat) _param_ekf2_terr_grad, #endif // CONFIG_EKF2_TERRAIN diff --git a/src/modules/ekf2/module.yaml b/src/modules/ekf2/module.yaml index 77a6ab547d..49cceb3fb0 100644 --- a/src/modules/ekf2/module.yaml +++ b/src/modules/ekf2/module.yaml @@ -549,8 +549,7 @@ parameters: unexpected errors. For these reasons, if accurate control of height relative to ground is required, it is recommended to use the MPC_ALT_MODE parameter instead, unless baro errors are severe enough to cause problems with landing - and takeoff. To en-/disable range finder for terrain height estimation, - use EKF2_TERR_MASK instead. If this parameter is enabled then the estimator + and takeoff. If this parameter is enabled then the estimator will make use of the range finder measurements to estimate its height in addition to other height sources (if activated). Range sensor aiding can be enabled (i.e.: always use) or set in "conditional" mode. Conditional @@ -565,19 +564,6 @@ parameters: 1: Enabled (conditional mode) 2: Enabled default: 1 - EKF2_TERR_MASK: - description: - short: Integer bitmask controlling fusion sources of the terrain estimator - long: 'Set bits in the following positions to enable: 0 : Set to true to use - range finder data if available 1 : Set to true to use optical flow data - if available' - type: bitmask - bit: - 0: use range finder - 1: use optical flow - default: 3 - min: 0 - max: 3 EKF2_NOAID_TOUT: description: short: Maximum inertial dead-reckoning time