mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-12 21:40:37 +08:00
ekf2: consolidate and simplify gnd effect logic
This commit is contained in:
@@ -47,10 +47,11 @@ void Ekf::fuseBaroHgt()
|
||||
|
||||
// Compensate for positive static pressure transients (negative vertical position innovations)
|
||||
// caused by rotor wash ground interaction by applying a temporary deadzone to baro innovations.
|
||||
const float deadzone_start = 0.0f;
|
||||
const float deadzone_end = deadzone_start + _params.gnd_effect_deadzone;
|
||||
if (_control_status.flags.gnd_effect && (_params.gnd_effect_deadzone > 0.f)) {
|
||||
|
||||
const float deadzone_start = 0.0f;
|
||||
const float deadzone_end = deadzone_start + _params.gnd_effect_deadzone;
|
||||
|
||||
if (_control_status.flags.gnd_effect) {
|
||||
if (_baro_hgt_innov < -deadzone_start) {
|
||||
if (_baro_hgt_innov <= -deadzone_end) {
|
||||
_baro_hgt_innov += deadzone_end;
|
||||
|
||||
Reference in New Issue
Block a user