563 Commits

Author SHA1 Message Date
Daniel Agar
fb4ac0f08c ekf2: remove redundant IMU vibration metrics
- consume IMU vibration metrics from vehicle_imu_status
2021-08-08 06:26:03 -07:00
bresch
01d0b8800e commander: report GNSS yaw fault to user 2021-08-05 11:10:02 +02:00
bresch
44219e9f45 EKF: add GNSS yaw to emergency yaw fallback test 2021-08-05 11:10:02 +02:00
bresch
11cd51c132 EKF: allow emergency reset in GNSS yaw and EV yaw aiding modes 2021-08-05 11:10:02 +02:00
bresch
4ebfbc6eab GNSS yaw: use NIS sequence to detect bias in state
A constant large value in the (signed) normalized innovation test ratio is a sign
of bias in the state estimate. This metric can be used to trigger a
covariance boost or reset
2021-08-05 11:10:02 +02:00
bresch
3fe04a91f6 GNSS yaw: add observation jump on ground
Some receivers are initializing to some heading and then resetting to
the correct one after a couple of seconds. EKF2 should detect that and
reset to the new value
2021-08-05 11:10:02 +02:00
bresch
30c7a596af GNSS yaw: allow unlimited resets on ground 2021-08-05 11:10:02 +02:00
bresch
e90e1c7e2a GNSS yaw: use dedicated observation noise 2021-08-05 11:10:02 +02:00
Daniel Agar
93aa6e3f78 ekf2: baro bias publish minor cleanup
- naming consistency (estimator prefix as "namespace")
 - only publish if baro is available and bias is changing as a small logging optimization
 - avoid unnecessary copying (get const reference to status directly)
 - trivial code style fixes
2021-08-02 13:59:38 -04:00
David Jablonski
9c36236565 ekf2: increase stack size to 3600 2021-08-02 09:47:38 -04:00
Daniel Agar
54918f650b
Update world_magnetic_model to latest Sun Aug 1 16:57:37 UTC 2021 2021-08-01 13:53:53 -04:00
bresch
521b9f5dcc control: do not constantly ask for mag reset if yaw not aligned
This also prevents triggering the `_mag_yaw_reset_req` flag in magless
mode; preventing the GNSS fustion from starting.
2021-07-27 13:34:53 +02:00
bresch
639e0a39cf EKF2: add yaw estimator alignment test 2021-07-27 13:34:53 +02: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
e01b631465 ekf2: change indication test limit float precision to minimize false positives 2021-07-26 13:54:36 -04:00
dagar
a8e3c46cdb [AUTO COMMIT] update change indication 2021-07-19 16:53:45 -04:00
bresch
54c7e74de3 EKF: add baro bias estimator using GNSS altitude 2021-07-19 16:53:45 -04:00
Daniel Agar
10f4fc7783 ekf2: don't print distance_sensor selection unless there are multiple options 2021-07-19 12:17:12 -04:00
Daniel Agar
0101934f47 ekf2: multi-EKF instance message INFO -> DEBUG 2021-07-18 18:02:33 -04:00
Daniel Agar
9ac860ac33 ekf2: test fix double promotion warnings 2021-07-18 15:49:53 -04:00
Daniel Agar
9087ba2259 world_magnietc_model: update to latest and fix code style
- minimize test_geo_lookup.cpp optimization to improve compile times
2021-07-18 15:49:53 -04:00
mcsauder
f34862f143 Delete redundant Ekf class member variable constructor initilizations and add missing C++ style initializers to the header file. 2021-07-17 12:24:56 -04:00
Daniel Agar
eeb73fdbe6 ekf2: resetting IMU bias message INFO -> DEBUG 2021-07-17 10:57:09 -04: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
Daniel Agar
883624d915 lib/geo: move from ecl 2021-07-15 10:38:24 -04:00
Daniel Agar
dbaed99626
cmake remove git_ecl target 2021-07-13 10:03:06 -04:00
Paul Riseborough
223ca11aed ekf2: update drag fusion parameter descriptions 2021-07-08 22:19:52 -04:00
Paul Riseborough
2d6363e0ef ekf2: Add parameter for propeller momentum drag 2021-07-08 22:19:52 -04:00
Daniel Agar
982692f5ed ekf2: selector handle NAN test ratios as uninitilaized
- requires https://github.com/PX4/PX4-ECL/pull/1020
2021-06-29 21:36:24 -04:00
Matthias Grob
0dee7af81f ekf2_params: enable baro ground effect compensation by default 2021-06-22 10:32:54 +02:00
David Sidrane
9a423e222b ekf2:Use inttypes and fix types 2021-06-16 17:07:47 +02:00
Jukka Laitinen
b550ad22b9 EKF2: Always publish global position
For historical reasons, there is a check in EKF2 to only publish global
position if it has moved for 1mm.

This is no longer necessary, and also this if doesn't save any cpu cycles
in real conditions where GPS errors are always much bigger that this.

When using simulated or fake GPS, based on some other positioning
system, the GPS coordinate input can be very accurate due to quantization
or true accuracy. In this case this check bites and perfectly valid position
doesn't get published.

Just removed this if.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-15 10:55:39 +02:00
Daniel Agar
251f1a069b ekf2: update message lost error messages to perf counters
- only allocate these perf counters if data source is present
2021-06-08 20:12:17 -04:00
Daniel Agar
578c003c13 ekf2: selector handle uninitalized test ratios
- choose the best instance regardless of tilt or yaw alignment
2021-06-07 08:56:37 -04:00
Daniel Agar
2ccd86102b ekf2: add command line option to manually select instance 2021-06-07 08:47:17 -04:00
Daniel Agar
22838f491a
ekf2: replace mag missed error message with perf count
- this error is primarily useful when significant gaps in magnetometer are present, otherwise the occasional gaps at startup, etc are distracting in regular usage
2021-05-24 20:52:07 -04:00
Daniel Agar
f15eefcc95 ekf2: selector increase status rate before potential instance change 2021-05-07 22:38:47 -04:00
Julian Oes
29730e30fa ekf2: don't timeout in HITL mode
Otherwise ekf2 might not start if HITL isn't started within 30 seconds.
2021-05-07 22:38:03 -04:00
Daniel Agar
b1ebd16c61
ekf2: improve selector reset handling
- handle reset count rollover (uint8_t)
 - compute full reset delta if primary estimator instance has changed or if we missed a reset
2021-05-05 21:45:13 -04:00
Beat Küng
38c1ec6a9c ekf2: check if ChangeInstance succeeded 2021-04-27 10:29:09 -04:00
Daniel Agar
2d15c96b9b
ekf2: Multi-EKF let new instance schedule itself immediately on successful init
- this is to minimize missed sensor data (and unnecessary error output) between EKF2 construction and once it actually starts running
2021-04-13 14:24:46 -04:00
Daniel Agar
846695f986 ekf2: replace vehicle_imu lost error message with perf count 2021-03-31 22:07:32 -04:00
Daniel Agar
9a35756cd1
ekf2: enable range aid by default
- this is to help more users get the benefit (by default) and perhaps circumvent the common mistake of setting EKF2_HGT_MODE to range sensor
 - this should be safe to enable as the range aid defaults are fairly conservative (max horizontal velocity 1 m/s, and range aid gate 1 SD)
2021-03-30 10:23:18 -04:00
Beat Küng
629f7ba15b params: ensure short description is only a single line
So a UI can display it properly
2021-03-23 12:55:11 -04:00
Paul Riseborough
4465c4fbf6
ekf2: Publish and log EKF warning and information events (NEW msg estimator_event_flags)
* msg: Add estinator information and warning events message (estimator_event_flags)
 * ekf2: publish information and warning events
 * logger: log estimator_event_flags
 * update ecl submodule to latest

Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-03-07 16:16:48 -05:00
Daniel Agar
263b00b65f
ekf2 support SET_GPS_GLOBAL_ORIGIN and remove globallocalconverter usage
- vehicle_command cmd extended from uint16 to support PX4 internal commands that don't map to mavlink
2021-03-05 18:25:14 -05:00
Daniel Agar
b66a9629e0 ekf2: update to latest ecl with new global origin helpers 2021-02-25 10:43:07 -05:00
Silvan Fuhrer
0ea8104344
select single system-wide wind estimate message (current best)
- publish wind estimate only from EKF, and wind speeds from airspeed selector to new separate topic (airspeed_wind)
 - rename message wind_estimate to wind
 - publish wind from currently used ekf instance (ekf2selector)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-20 13:15:01 -05:00
Daniel Agar
5e188b3cd7 ekf2: populate local_position dist_bottom_sensor_bitfield 2021-02-18 10:37:02 -05:00