Browse Source

Ekf2: Add bitmask to select terrain estimator aiding sources

sbg
bresch 5 years ago committed by Roman Bapst
parent
commit
0f2f72a757
  1. 3
      src/modules/ekf2/ekf2_main.cpp
  2. 15
      src/modules/ekf2/ekf2_params.c

3
src/modules/ekf2/ekf2_main.cpp

@ -387,6 +387,8 @@ private: @@ -387,6 +387,8 @@ private:
(ParamExtInt<px4::params::EKF2_AID_MASK>)
_param_ekf2_aid_mask, ///< bitmasked integer that selects which of the GPS and optical flow aiding sources will be used
(ParamExtInt<px4::params::EKF2_HGT_MODE>) _param_ekf2_hgt_mode, ///< selects the primary source for height data
(ParamExtInt<px4::params::EKF2_TERR_MASK>)
_param_ekf2_terr_mask, ///< bitmasked integer that selects which of range finder and optical flow aiding sources will be used for terrain estimation
(ParamExtInt<px4::params::EKF2_NOAID_TOUT>)
_param_ekf2_noaid_tout, ///< maximum lapsed time from last fusion of measurements that constrain drift before the EKF will report the horizontal nav solution invalid (uSec)
@ -594,6 +596,7 @@ Ekf2::Ekf2(bool replay_mode): @@ -594,6 +596,7 @@ Ekf2::Ekf2(bool replay_mode):
_param_ekf2_req_vdrift(_params->req_vdrift),
_param_ekf2_aid_mask(_params->fusion_mode),
_param_ekf2_hgt_mode(_params->vdist_sensor_type),
_param_ekf2_terr_mask(_params->terrain_fusion_mode),
_param_ekf2_noaid_tout(_params->valid_timeout_max),
_param_ekf2_rng_noise(_params->range_noise),
_param_ekf2_rng_sfe(_params->range_noise_scaler),

15
src/modules/ekf2/ekf2_params.c

@ -644,6 +644,21 @@ PARAM_DEFINE_INT32(EKF2_AID_MASK, 1); @@ -644,6 +644,21 @@ PARAM_DEFINE_INT32(EKF2_AID_MASK, 1);
*/
PARAM_DEFINE_INT32(EKF2_HGT_MODE, 0);
/**
* Integer bitmask controlling fusion sources of the terrain estimator
*
* 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
*
* @group EKF2
* @min 0
* @max 3
* @bit 0 use range finder
* @bit 1 use optical flow
*/
PARAM_DEFINE_INT32(EKF2_TERR_MASK, 3);
/**
* Maximum lapsed time from last fusion of measurements that constrain velocity drift before the EKF will report the horizontal nav solution as invalid.
*

Loading…
Cancel
Save