Hamish Willee
30e2490d5b
Docs are now in user guide and main ( #19977 )
...
* Fix links to docs in source to point to docs on main not master
* More docs and scripts that need to point to main
2022-08-01 11:39:39 +10:00
Daniel Agar
41d9c3dd2a
ekf2: add AUX velocity aid src status
...
- also includes velocity and position helpers for using estimator aid
source status messages that will later be used for GPS, EV, etc
2022-07-29 12:02:31 -04:00
Daniel Agar
a397c09e59
ekf2: use estimator_aid_src for all yaw sources (mag, gnss, ev)
2022-07-29 11:20:48 -04:00
Hamish Willee
e6eed43648
Spelling errors ( #19935 )
2022-07-27 14:33:16 +10:00
Daniel Agar
70e95812e7
ekf2: reset mag_lpf (by zeroing _mag_counter) when resetting mag bias (or changing mags)
...
- so that there's new filtered data avaiable for reset
2022-07-21 09:24:28 -04:00
Daniel Agar
ecdade3638
ekf2: mag in air reset fall back to regular resetMagHeading() if realignYawGPS() fails
2022-07-21 09:24:28 -04:00
Daniel Agar
05133aed27
ekf2: clear test ratios, flags, etc when stopping mag fusion
2022-07-21 09:24:28 -04:00
Daniel Agar
65a587e56a
ekf2: mag fusion don't update all states if mag_fault or mag_field_disturbed
2022-07-21 09:24:28 -04:00
Daniel Agar
a41a0e7e80
ekf2: resetMagHeading() split out simple init case
2022-07-21 09:24:28 -04:00
Daniel Agar
9efadad06a
ekf2: move checkMagFieldStrength() to magFieldStrengthDisturbed() const method
2022-07-21 09:24:28 -04:00
Daniel Agar
a7f573e150
ekf2: delete isStrongMagneticDisturbance()
2022-07-21 09:24:28 -04:00
Daniel Agar
e6e27e694e
ekf2: delete isYawResetAuthorized()
2022-07-21 09:24:28 -04:00
Daniel Agar
0f1f6daa1a
ekf2: delete isMagBiasObservable()
2022-07-21 09:24:28 -04:00
Daniel Agar
d160229f47
ekf2: delete isYawAngleObservable()
2022-07-21 09:24:28 -04:00
Daniel Agar
b0c979f745
ekf2: add copyright header to EKFGSF_yaw and utils
2022-07-21 09:24:28 -04:00
Daniel Agar
4fee059696
ekf2: simplify mag yaw reset request when transitioning to mag enabled
2022-07-21 09:24:28 -04:00
Daniel Agar
f254b55523
ekf2: add mag fusion timestamps
2022-07-21 09:24:28 -04:00
Daniel Agar
e5be0e776e
ekf2: if multi-mag disabled (EKF2_MULTI_MAG <= 1) properly re-enable sensors hub selection (SENS_MAG_MODE)
...
- this prevents potential misconfiguration if trying to disable ekf2 multi mag
2022-07-20 01:16:55 -04:00
Beat Küng
ea136e73be
ekf2: remove unused variables
2022-07-20 01:14:04 -04:00
bresch
f962399ba1
ekf2: rename BaroBiasEstimator -> BiasEstimator
2022-07-19 20:46:53 -04:00
Daniel Agar
39453405a0
ekf2: cleanup zero innovation heading fusion
...
- refactor updateQuaternion() to compute the yaw jacobian directly (respecting the rotation sequence determination)
- fuseHeading()/fuseYaw321()/fuseYaw312() helpers are eliminated and now mag heading fusion and EV yaw fusion compute the innovation in place
- clear up logic for performing zero innovation heading fusion when quaternion variance exceeds threshold (no more _is_yaw_fusion_inhibited flag manipulation)
- when at rest continue fusing last static heading with very low variance even if other heading sources are active
2022-07-19 11:58:27 -04:00
Daniel Agar
1a513153be
ekf2: update range sample fix ekf2_timestamps
...
- this is necessary to use distance_sensor data in replay
2022-07-18 14:39:12 -04:00
bresch
8cc6d02af3
ekf2: add missing mag fuse type in enum
2022-07-15 15:57:17 +02:00
Daniel Agar
ac209c2e78
ekf2: vehicle_local_position add dead_reckoning flag
2022-07-13 09:01:33 +02:00
bresch
de74f45e2d
ekf2: do not run rng kinematic consistency check for fixed-wings
...
As they are always moving horizontally, the check doesn't make sense
for fixed-wings.
Also don't run the check while on ground to prevent getting a failed
check during pre-takeoff manipulation.
2022-07-12 13:45:59 -04:00
Daniel Agar
a73efd9c4f
NuttX carry minimal c++ cmath (replacing Matrix stdlib_imports.hpp)
2022-07-12 08:05:06 -04:00
bresch
2f486c37fc
ekf2: start airspeed fusion when test ratio is passing only
...
When wind is already estimated, we don't reset the states using airspeed
data, so it could be that the fusion fails if the airspeed isn't
consistent with the filter (test ratio > 1). In this case, don't start
the fusion.
When wind isn't already estimated, the wind states are reset using
airspeed so the fusion can start regardless of the current test ratio.
2022-07-07 17:39:06 -04:00
Daniel Agar
15223009d2
combine sensor_gps + vehicle_gps_position msgs (keeping separate topics)
2022-07-07 10:24:11 -04:00
bresch
af4038aa7e
ekf2: publish estimator_aid_src_airspeed
2022-07-07 09:42:54 -04:00
bresch
2fd87c47e8
ekf2: use estimator_aid_source_1d message for airspeed fusion
...
split the fusion process into:
1. updateAirspeed: computes innov, innov_var, obs_var, ...
2. fuseAirspeed: uses data computed in 1. to generate K, H and fuse the
observation
2022-07-07 09:42:54 -04:00
bresch
503aa87957
ekf2_derivation: create functions to generate innov_var or HK only
...
This is required when the innovation variance computation and the fusion
are performed in two different functions.
2022-07-07 09:42:54 -04:00
bresch
3d01b5aa11
ekf2_derivation: use unsimplified q->rot for observation equations
2022-07-05 14:25:35 +02:00
bresch
28b34a634b
ekf2_derivation: do not print null equations
2022-07-05 14:25:35 +02:00
bresch
78dd557b26
ekf2_derivation: automatically replace pow function
2022-07-05 14:25:35 +02:00
bresch
11f78a3686
ekf2_derivation: update generated equations with SymPy 1.10.1
2022-07-05 14:25:35 +02:00
Daniel Agar
efde738826
ekf2: update EKF2_EV_DELAY default to 0
2022-07-04 11:44:53 -04:00
Daniel Agar
dc8ed97809
ekf2: optical flow control limits constrain speed using HAGL max
2022-06-21 12:52:25 -04:00
Daniel Agar and alexklimaj
d5839e2dd5
optical flow sensor pipeline overhaul
...
- all sources of optical flow publish sensor_optical_flow
- sensor_optical_flow is aggregated by the sensors module, aligned with integrated gyro, and published as vehicle_optical_flow
Co-authored-by: alexklimaj <alex@arkelectron.com >
2022-06-20 20:56:56 -04:00
Daniel Agar
b81a5b3efa
ekf2: request mag yaw reset after calibration or sensor change
2022-06-17 21:04:05 -04:00
Daniel Agar
1980b5c5e8
ekf2: setEkfGlobalOrigin() reset baro and hgt sensor offsets if necessary
...
- handle uninitalized _gps_alt_ref
- add basic lat/lon/alt sanity checks
2022-06-16 00:59:54 -04:00
bresch
0d256b8ff6
ekf2 wind: use noise spectral density for process noise tuning
...
The noise spectral density, NSD, (square root of power spectral density) is a
continuous-time parameter that makes the tuning independent from the EKF
prediction rate.
NSD corresponds to the rate at which the state uncertainty increases
when no measurements are fused into the filter.
Given that the current prediction rate of EKF2 is 100Hz, the
same tuning is obtained by dividing the std_dev legacy parameter by 10:
nsd = sqrt(std_dev^2 / 100Hz)
2022-06-14 18:39:10 +10:00
bresch
4f1091792f
ekf2 preflight: only check innovation of active height sources
2022-06-07 11:44:56 -04:00
PX4BuildBot
a247b42907
[AUTO COMMIT] update change indication
2022-06-04 15:57:11 -04:00
bresch
e2955bdd61
terrain est: clear innovation/var/test ration when aiding stops
2022-06-03 17:31:14 -04:00
Daniel Agar
21b1c933dc
ekf2: EKFGSF_yaw delete unnecessary internal state
2022-06-01 13:16:06 -04:00
Daniel Agar
3889b79342
ekf2: yaw estimator add yaw_composite_valid boolean
2022-06-01 13:16:06 -04:00
Daniel Agar
095e0f0604
ekf2: sensor_simulator fix enum shadow
2022-05-29 00:21:08 -04:00
Daniel Agar
58ea6235fe
ekf2: estimator aid source status (range height)
2022-05-25 09:25:12 -04:00
Daniel Agar
1e25aee6fa
ekf2: estimator aid source status (baro height)
2022-05-25 09:25:12 -04:00
Daniel Agar
639222dd65
ekf2: estimator aid source status (GPS pos, GPS vel)
2022-05-23 16:21:49 -04:00