mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 19:23:34 +08:00
ekf2_main.cpp: fixed bug in the calculation of the mag bias calibration time
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
committed by
Mathieu Bresciani
parent
e43aa4e287
commit
4ddf0f9dc1
@@ -1551,6 +1551,11 @@ void Ekf2::Run()
|
||||
for (bool &cal_available : _valid_cal_available) {
|
||||
cal_available = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
// conditions are NOT OK for learning magnetometer bias, reset timestamp
|
||||
// but keep the accumulated calibration time
|
||||
_last_magcal_us = now;
|
||||
}
|
||||
|
||||
// Start checking mag bias estimates when we have accumulated sufficient calibration time
|
||||
|
||||
Reference in New Issue
Block a user