This is how it is also done in ekf2_main. Otherwise, this leads to
multiple integration of the same IMU data due to asynchronous sensor
updates triggering a prediction step between IMU updates.
Fix unit tests that broke because of this fix
The `_deadreckon_time_exceeded` flag is used in
`local_position_is_valid()`. This means that
`_params.valid_timeout_max` after startup, in my observed case 5
seconds, the local position switche from valid to invalid and then after
a while back to valid again.
With this fix, the local position is flagged invalid from boot and gets validated after the first aiding event.
Co-authored-by: Julian Oes <julian@oes.ch>
* 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 is a non-functional change required to select accel bias estimation
per axis selection. The intent is then to disable the learning before
takeoff of the components that are poorly observable.
* Support vision velocity expressed in body frame
* Use switch statement for vision velocity frame
* Robustify vision velocity frame test
* Increase lower bound on vision velocity noise to 0.05 m/s
* EKF: Improve covariance prediction stability
Eliminates collapse of vertical velocity state variance due to rounding errors that can occur under some operating conditions.
* EKF: Fix typo
* test: Fix initialisation test cases
Provide sufficient time for variances to stabilise and fix calculation of reference quaternion for alignment.
* test: Allow for accumulated rounding error in IMU sampling test
* test: Allow sufficient time for quaternion variances to reduce after initial alignment
* test: Increase allowance for tilt alignment delay and inertial nav errors
* test: Increase allowance for tilt alignment delay and inertial nav errors
* adpat reset velocity test
* test: update change indication file
* test: Adjust tests to handle alignment time and prediction errors
* README.md: Add documentation for change indicator test