mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 07:09:48 +08:00
ekf2-gravity: do not estimate accel bias when gravity fusion is active
Gravity fusion uses the bias corrected accelerometer data to correct the tilt estimate. We should not continue to estimate the accel bias when this is active as it creates an unwanted feedback loop.
This commit is contained in:
committed by
Mathieu Bresciani
parent
ee30b70a3c
commit
c59101e8ed
@@ -1017,8 +1017,8 @@ void Ekf::updateIMUBiasInhibit(const imuSample &imu_delayed)
|
||||
} else if (_control_status.flags.fake_hgt) {
|
||||
is_bias_observable = false;
|
||||
|
||||
} else if (_control_status.flags.fake_pos) {
|
||||
// when using fake position (but not fake height) only consider an accel bias observable if aligned with the gravity vector
|
||||
} else if (_control_status.flags.fake_pos || _control_status.flags.gravity_vector) {
|
||||
// only consider an accel bias observable if aligned with the gravity vector
|
||||
is_bias_observable = (fabsf(_R_to_earth(2, index)) > 0.966f); // cos 15 degrees ~= 0.966
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user