mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 22:23:33 +08:00
ekf: disable xy accel bias learning before takeoff (#818)
* ekf: disable xy accel bias learning before takeoff As those biases are usually poorly observable before takeoff because they are almost perpendicular to the gravity vector, learning is often driven by noise and numerical issues. This results in incorrect bias learning before takeoff when the drone is static on ground for a long period of time. * ekf: update unit test and change indicator
This commit is contained in:
+2
-3
@@ -163,9 +163,8 @@ void Ekf::predictCovariance()
|
||||
for (unsigned stateIndex = 13; stateIndex <= 15; stateIndex++) {
|
||||
const unsigned index = stateIndex - 13;
|
||||
|
||||
// TODO: When on ground, only consider an accel bias observable if aligned with the gravity vector
|
||||
// const bool is_bias_observable = (fabsf(_R_to_earth(2, index)) > 0.8f) || _control_status.flags.in_air;
|
||||
const bool is_bias_observable = true;
|
||||
// When on ground, only consider an accel bias observable if aligned with the gravity vector
|
||||
const bool is_bias_observable = (fabsf(_R_to_earth(2, index)) > 0.8f) || _control_status.flags.in_air;
|
||||
const bool do_inhibit_axis = do_inhibit_all_axes || !is_bias_observable;
|
||||
|
||||
if (do_inhibit_axis) {
|
||||
|
||||
Reference in New Issue
Block a user