Daniel Agar
4084beaa53
ekf2: wrap_pi fixes and fuseYaw() renaming
...
- to stay consistent with https://github.com/PX4/PX4-Autopilot/pull/19434
2022-04-06 10:50:20 -04:00
Daniel Agar
becffa3441
ekf2: cleanup zero innovation heading fusion
2022-04-04 10:42:57 -04:00
Daniel Agar
0df8443f2f
ekf2: simplify mag auto (3d select)
2022-04-04 10:42:57 -04:00
Daniel Agar
ad1a35f7a4
ekf2: mag fusion don't update all states if mag_fault or mag_field_disturbed
2022-04-04 10:42:57 -04:00
Daniel Agar
0546f4082b
ekf2: replace mag reset request flags with timeout checks
2022-04-04 10:42:56 -04:00
Daniel Agar
ca893e55a5
ekf2: allow yaw estimator to run on ground (not at rest) and init yaw align
...
- add a common resetMagStates() that uses the WMM to reinit mag states (I & B) if possible
2022-04-04 10:42:56 -04:00
Daniel Agar
cdf9e6d35a
ekf2: merge runOnGroundYawReset() and runInAirYawReset()
2022-04-04 10:42:55 -04:00
Daniel Agar
9a929e0857
ekf2: mag in air reset fall back to regular resetMagHeading() if realignYawGPS() fails
2022-04-04 10:42:54 -04:00
Daniel Agar
521fefc155
ekf2: mag fusion don't update all states if mag_fault or mag_field_disturbed
2022-04-04 10:42:53 -04:00
Daniel Agar
25a3ee0232
ekf2: move checkMagFieldStrength() to magFieldStrengthDisturbed() const method
2022-04-04 10:42:53 -04:00
Daniel Agar
9ee4bf9bf5
ekf2: delete isStrongMagneticDisturbance()
2022-04-04 10:42:53 -04:00
Daniel Agar
8643a8b4b3
ekf2: delete isYawResetAuthorized()
2022-04-04 10:42:52 -04:00
Daniel Agar
d71d6568e5
ekf2: delete isMagBiasObservable()
2022-04-04 10:42:52 -04:00
Daniel Agar
e898e29af3
ekf2: delete isYawAngleObservable()
2022-04-04 10:42:52 -04:00
Daniel Agar
2916ae4030
ekf2: simplify mag yaw reset request when transitioning to mag enabled
2022-04-04 10:42:51 -04:00
Daniel Agar
dedecce39f
ekf2: add mag fusion timestamps
2022-04-04 10:42:51 -04:00
Daniel Agar
b7e0f17c6a
ekf2: minor position/velocity reset cleanup
...
- try to use avoid resetVelocity() call where possible
- reset timeouts centrally
2022-03-08 11:16:35 -05:00
Daniel Agar
999737ddd5
ekf2: refactor mag control
...
- remove class _mag_sample_delayed
- update mag fusion call graph to use mag sample delayed functionally
- Ekf::resetMagHeading()
- use low pass mag directly, but check if valid (magnitude)
- MAG_FUSE_TYPE_INDOOR treat like auto if heading required
2022-01-31 11:47:10 -05:00
Daniel Agar
f499749c23
ekf2: mag field strength check respect requirements
...
- requires valid mag data (_mag_data_ready)
- respect mag_fusion_type (including MAG_FUSE_TYPE_INDOOR)
2022-01-27 09:05:13 -05:00
Daniel Agar
ae3070bbf1
ekf2: make filter update period configurable
...
- introduces new parameter EKF2_PREDICT_US to configure the filter
update period in microseconds
- actual filter update period will be an integer multiple of IMU
2022-01-26 10:57:09 -05:00
Mathieu Bresciani
17ebcd2456
mag_control: fuse fake heading during leveling fine alignment ( #17964 )
...
Co-authored-by: Daniel Agar <daniel@agar.ca >
2021-07-27 11:50:50 +02:00
Daniel Agar
c8e6d93cc0
ekf2: backend apply code style (generated code still exempt)
2021-07-15 21:15:41 -04:00
Daniel Agar
2cf66a5d8f
ekf2: move EKF out of ecl
2021-07-15 10:38:24 -04:00