mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 18:40:35 +08:00
ekf control: move time_last_in_air/on_ground out of GPS control logic
This commit is contained in:
committed by
Mathieu Bresciani
parent
b00d4a9237
commit
04844a04ed
@@ -120,8 +120,6 @@ void Ekf::controlFusionModes()
|
||||
_delta_time_baro_us = _baro_sample_delayed.time_us - _delta_time_baro_us;
|
||||
}
|
||||
|
||||
|
||||
|
||||
{
|
||||
// Get range data from buffer and check validity
|
||||
const bool is_rng_data_ready = _range_buffer.pop_first_older_than(_imu_sample_delayed.time_us, _range_sensor.getSampleAddress());
|
||||
@@ -599,13 +597,6 @@ void Ekf::controlGpsFusion()
|
||||
could have been caused by bad GPS.
|
||||
*/
|
||||
|
||||
if (!_control_status.flags.in_air) {
|
||||
_time_last_on_ground_us = _time_last_imu;
|
||||
|
||||
} else {
|
||||
_time_last_in_air = _time_last_imu;
|
||||
}
|
||||
|
||||
const bool recent_takeoff_nav_failure = _control_status.flags.in_air &&
|
||||
!isTimedOut(_time_last_on_ground_us, 30000000) &&
|
||||
isTimedOut(_time_last_hor_vel_fuse, _params.EKFGSF_reset_delay) &&
|
||||
|
||||
Reference in New Issue
Block a user