mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:03:34 +08:00
gps: fixed filter initialization bug around gps
- do not gps reference altitude to zero in case gps checks pass before the filter initialized - reset the filtered gps position and position derivative filters in case we are in air or there is movement on the ground Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
committed by
Mathieu Bresciani
parent
8f533cb878
commit
b7d54b5477
@@ -194,10 +194,13 @@ bool Ekf::gps_is_good(const gps_message &gps)
|
||||
_gps_check_fail_status.flags.hspeed = false;
|
||||
_gps_drift_updated = false;
|
||||
|
||||
resetGpsDriftCheckFilters();
|
||||
|
||||
} else {
|
||||
// This is the case where the vehicle is on ground and IMU movement is blocking the drift calculation
|
||||
_gps_drift_updated = true;
|
||||
|
||||
resetGpsDriftCheckFilters();
|
||||
}
|
||||
|
||||
// save GPS fix for next time
|
||||
|
||||
Reference in New Issue
Block a user