* added support for resetting wind states to external observation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* moved wind related functions into separate file
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* added VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* correctly compute variances
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* ekf2: implement wind reset
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* only allow VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE during wind dead-reckoning
and increase horizontal velocity variance to allow velocity states to move
towards solution that is aligned with the newly set wind
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* only reset wind on ground
* still use wind reset using airspeed when it wasn't initialized
* exclude func for rover, change reset interface
* handle wind reset in drag-fusion
* replace state reset with variance reset in sideslip/drag fusion
* remove resetWind function
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
- split mag_3d into new standalone mag fusion and mag fusion allowed to update all states (full mag_3d)
- new dedicated control logic for mag/mag_3d fusion and standalone mag heading fusion
- if WMM available use for mag_I and mag_B init
- mag states reset if external yaw reset (yaw estimator, GPS yaw, etc)
- mag reset if declination changed (eliminate _mag_yaw_reset_req)
- mag fusion (but not mag_hdg or mag_3d) can be active during gps_yaw or ev_yaw (if yaw aligned north)
Co-authored-by: bresch <brescianimathieu@gmail.com>
When at rest, directly fuse the gyro data as an observation of its bias.
This allows to strongly observe the gyro biases without having to fuse a
constant heading that makes the ekf too confident about its heading.
- refactor all EKF backend output predictor pieces into new OutputPredictor class
- output states are now calculated immediately with new high rate IMU rather than after EKF update
- IMU delayed sample is passed as around as control data to avoid storing an extra copy and make the requirement clear
- move EV yaw and EV position to new state machines
- EV yaw and EV pos now configured via EKF2_EV_CTRL (migrated from EKF2_AID_MASK)
- new EV position offset estimator to enable EV position while GPS position is active (no more EV pos delta fusion)
- yaw_align now strictly means north (no more rotate external vision aid mask)
- automatic switching between EV yaw, and yaw align north based on GPS quality