mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
ground effect: removed dependency on local position
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
+2
-5
@@ -982,12 +982,9 @@ void Ekf::controlHeightFusion()
|
|||||||
_hgt_sensor_offset = 0.0f;
|
_hgt_sensor_offset = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Turn off ground effect compensation if it times out or sufficient height has been gained
|
// Turn off ground effect compensation if it times out
|
||||||
// since takeoff.
|
|
||||||
if (_control_status.flags.gnd_effect) {
|
if (_control_status.flags.gnd_effect) {
|
||||||
if (((_time_last_imu - _time_last_gnd_effect_on) > GNDEFFECT_TIMEOUT) ||
|
if ((_time_last_imu - _time_last_gnd_effect_on > GNDEFFECT_TIMEOUT)) {
|
||||||
(((_last_on_ground_posD - _state.pos(2)) > _params.gnd_effect_max_hgt) &&
|
|
||||||
_control_status.flags.in_air)) {
|
|
||||||
|
|
||||||
_control_status.flags.gnd_effect = false;
|
_control_status.flags.gnd_effect = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user