EKF2 IMU biases

I’m opening this topic to continue a discussion that started on Slack about accelerometer and gyro biases estimated by EKF2:

Original question:

Is there an state in the kalman filter to estimate the accelerometer bias? I thought that the bias is corrected offline (with calibration)
In code I see that the error is related to status.states[13], status.states[14] and status.states[15]
But in Documentation I see: [13 … 15] IMU delta velocity bias XYZ (m/s)
It seems that this states are related to linear velocities, not to accelerations…

Answer

Delta velocities are the integrated accelerations
Similarly, EKF2 uses delta angles that are integrated gyro measurements

Question 2

So, is state[23] a bias in velocity?

Answer 2

[0 ... 3] Quaternions
[4 ... 6] Velocity NED (m/s)
[7 ... 9] Position NED (m)
[10 ... 12] IMU delta angle bias XYZ (rad)
[13 ... 15] IMU delta velocity bias XYZ (m/s)
[16 ... 18] Earth magnetic field NED (gauss)
[19 ... 21] Body magnetic field XYZ (gauss)
[22 ... 23] Wind velocity NE (m/s)
[24 ... 32] Not Used
state[13] is a state in **delta** velocity (integrated accelerometer measurements between two updates of the EKF). It then has to be converted back to acceleration to obtain the accelerometer bias.

**Further open questions**
>It seems to me that this state computes a bias in linear velocity, which is used to compensate sensor errors. If yes, a large error is obtained if sensors are inconsistent, but I'm not sure that it is always a problem with accelerometer. Am I right?

>And, how long is EKF running before the pre-flight check? Is there time enough for the filter converge, before the pre-flight test is run?

@tumbili Can you help for the remaining open questions please?