remove EKF2_GND_EFF_EN flag and use condition EKF2_GND_EFF_DZ > 0 instead

This commit is contained in:
Elia Tarasov
2019-03-05 18:20:58 +03:00
committed by Roman Bapst
parent 5fa0a647e5
commit 84d9820baa
2 changed files with 5 additions and 16 deletions
+1 -3
View File
@@ -337,8 +337,6 @@ private:
(ParamExtFloat<px4::params::EKF2_BARO_NOISE>) _baro_noise, ///< observation noise for barometric height fusion (m)
(ParamExtFloat<px4::params::EKF2_BARO_GATE>)
_baro_innov_gate, ///< barometric height innovation consistency gate size (STD)
(ParamInt<px4::params::EKF2_GND_EFF_EN>)
_enable_gnd_effect, ///< Controls barometric deadzone fusion, 0 disables, 1 enables
(ParamExtFloat<px4::params::EKF2_GND_EFF_DZ>)
_gnd_effect_deadzone, ///< barometric deadzone range for negative innovations (m)
(ParamExtFloat<px4::params::EKF2_GPS_P_GATE>)
@@ -1255,7 +1253,7 @@ void Ekf2::run()
if (vehicle_land_detected_updated) {
if (orb_copy(ORB_ID(vehicle_land_detected), _vehicle_land_detected_sub, &vehicle_land_detected) == PX4_OK) {
_ekf.set_in_air_status(!vehicle_land_detected.landed);
if(_enable_gnd_effect.get())
if(_gnd_effect_deadzone.get() > 0.0f)
_ekf.set_gnd_effect_flag(vehicle_land_detected.in_ground_effect);
}
}
+4 -13
View File
@@ -538,28 +538,19 @@ PARAM_DEFINE_FLOAT(EKF2_MAG_YAWLIM, 0.25f);
*/
PARAM_DEFINE_FLOAT(EKF2_BARO_GATE, 5.0f);
/**
* Boolean determining if barometer deadzone near ground should be accounted.
*
* A value of 1 indicates that deadzone is active
*
* @group EKF2
* @boolean
*/
PARAM_DEFINE_INT32(EKF2_GND_EFF_EN, 0);
/**
* Baro deadzone range for height fusion
*
* Sets the value of deadzone applied to negative baro innovations when ground effect compensation is active
* Sets the value of deadzone applied to negative baro innovations.
* Deadzone is enabled when EKF2_GND_EFF_DZ > 0.
*
* @group EKF2
* @min 0.5
* @min 0.0
* @max 10.0
* @unit M
* @decimal 1
*/
PARAM_DEFINE_FLOAT(EKF2_GND_EFF_DZ, 5.0f);
PARAM_DEFINE_FLOAT(EKF2_GND_EFF_DZ, 0.0f);
/**
* Gate size for GPS horizontal position fusion