Daniel Agar
3fba7288af
ekf2: selector use hysteresis for healthy flag
...
- require that an instance is healthy continuously for >= 1s before
allowing it to be used
2021-12-14 09:52:36 -05:00
Daniel Agar
fc17797548
ekf2: delete obsolete _bad_vert_accel_detected
2021-12-13 09:13:39 -05:00
bresch
66290de745
ekf: improve range primary height source
...
allow range fusion to start with fake measurements if the sensor is
providing bad measurements because too close to the ground
2021-12-10 15:18:10 +01:00
bresch
9147d5ea5c
ekf2: use ground as ekf altitude datum when in range primary hgt mode
2021-12-10 15:18:10 +01:00
bresch
5e790da634
ekf2: reset the timeout timer in the reset function directly
2021-12-10 15:18:10 +01:00
bresch
0d874cf00a
ekf2: move aiding start details in dedicated function
...
When an aiding source needs to be started, simply call the corresponding
starting function and any required reset is handled in there.
2021-12-10 15:18:10 +01:00
Matthias Grob
68e2940f58
math: support max of three values additional to min and use it everywhere
2021-12-07 21:06:51 +01:00
bresch
c947562183
ekf: get rid of intermediate variable "fuse_height"
2021-12-07 09:16:21 +01:00
bresch
9651f78b0a
ekf: centralize the height fusion decision
2021-12-07 09:16:21 +01:00
bresch
d583ef6b79
ekf2: move height fusion code to separate source file
2021-12-07 09:16:21 +01:00
Matthias Grob
10ceea2fe6
geo: refactoring on comments and usage
2021-12-06 14:30:14 +01:00
Thomas Debrunner
8db7a6225b
geo: Moved the map_projection_* functions and state into a self-contained C++ class
2021-12-06 14:30:14 +01:00
PX4BuildBot
aae794965a
[AUTO COMMIT] update change indication
2021-12-05 11:03:58 -05:00
Daniel Agar
b7efd4f947
ekf2: selector treat combined test ratio > 1 as a warning
...
* ekf2: selector treat combined test ratio > 1 as a warning
* ekf2: wait for 1s of constant warning to trigger an instance switch
Co-authored-by: bresch <brescianimathieu@gmail.com>
2021-12-01 20:22:34 -05:00
Thomas Stastny
8defbc8829
update correct airsp scale param string in ekf2
2021-11-25 11:01:04 -05:00
Jukka Laitinen
5dbbddb13f
EKF2: Use _distance_sensor_subs vector directly
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen
d9498ade32
EKF2: Allocate distance sensor subscriptions as member variables
...
Just create the subscriptions and keep them, instead of
re-creating them continuously
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
dagar
9646b49b60
[AUTO COMMIT] update change indication
2021-11-18 13:58:53 -05:00
Daniel Agar
bffd88ad81
ekf2: don't inhibit accel bias when not in air
2021-11-18 13:58:53 -05:00
bresch
fc155bc57e
Ekf2Selector: declare filter unhealthy when high test ratio
...
Request a switch to another instance when the combined test ratio is too high.
2021-11-18 13:29:01 +01:00
bresch
f751dd2242
FlightTask: set yaw_setpoint to NAN when yaw should not be controlled
2021-11-16 18:09:37 -05:00
bresch
394fa953b8
EKF: get status on yaw alignement in flight
...
1s after the in air mag reset is performed, the final yaw alignment is
complete and the yaw estimate can be used for yaw control.
2021-11-16 18:09:37 -05:00
Daniel Agar
4e8c234a55
ekf2: only save mag declination if changed
2021-11-16 12:33:48 -05:00
Beat Küng
4ba84d56c9
logger: introduce optional topics
...
The current practice of adding topics to the default set isn't scalable,
as it affects all setups.
By making sure topics are advertised on init, logger can just discard
topics that don't exist. This does not work for all topics, so topics are
specifically marked as optional. It can be extended to more topics later
on though.
This reduces the list of topics by ~35 on a pixracer configured as quad,
and reduces RAM usage by ~1KB.
2021-11-15 09:02:03 -05:00
Daniel Agar
68026eadeb
save significant IMU bias changes learned by the EKF
...
* ekf2: make publishing of learned accel biases more robust
* ekf2: reset accel bias if calibration updated
* msg: add separate accel and gyro calibration counters
* ekf2: use separate accel and gyro calibration counters
* ekf2: rework logic to reset biases when calibration counters increment
* sensors: add saving of learned accel biases
* ekf2: generalized saving accel/gyro/mag in flight sensor calibration
* boards: holybro kakutef7 disable systemcmds/perf and systemcmds/top to save flash
Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2021-11-07 15:34:27 -05:00
Daniel Agar
fec0d6c5ed
ekf2: change indication further reduce data precision
2021-11-02 10:21:54 +01:00
bresch
1317b1a6e1
[AUTO COMMIT] update change indication
2021-11-01 13:59:34 +01:00
bresch
9e54c6d1aa
ekf2: move generic functions to control.cpp
...
these functions aren't specific to GPS fusion
2021-11-01 13:59:34 +01:00
bresch
e90734881b
ekf2_test: add more GPS fusion control tests
2021-11-01 13:59:34 +01:00
bresch
8aae39e82a
ekf2: move GPS control logic to separate source file
2021-11-01 13:59:34 +01:00
bresch
689ab12845
ekf2: refactor gps vel/pos fusion control logic
2021-11-01 13:59:34 +01:00
bresch
9afc390552
ekf2: move gps yaw reset in starting function
2021-11-01 13:59:34 +01:00
dagar
a2801bab80
[AUTO COMMIT] update change indication
2021-10-26 14:39:58 -04:00
bresch
d0f89f7fff
ekf2: refactor wind reset functions
2021-10-26 10:18:56 +02:00
bresch
456dfcb4b9
ekf2: update getter for true airspeed
2021-10-26 10:18:56 +02:00
bresch
3927c183de
ekf2_test: adjust airspeed unit test
...
an airpseed of > 2m/s is required to start the fusion (set by param)
fw mode is also required
Given the larger estimated windspeed after those changes, the change of
static pressure is larger and the height estimate takes more time to
reach the final value
2021-10-26 10:18:56 +02:00
bresch
6e8f0e92ff
ekf2: refactor airspeed fusion control logic
2021-10-26 10:18:56 +02:00
bresch
8873e92c7c
ekf: force fallback to baro if GPS is stopped while in GPS height mode
...
Otherwise, no height aiding source is used
2021-10-26 10:05:28 +02:00
bresch
0a140ec59a
ekf2_test: add GPS height to baro fallback
2021-10-26 10:05:28 +02:00
bresch
f4c21cedd9
ekf2_test: use motion_planning for dynamic yaw emergency test
2021-10-25 18:06:38 -04:00
bresch
340a2caa8e
ekf2_test: use motion_planning library
...
The VelocitySmoothing class from the motion_planning library is used to
generate trajectories in order to test the EKF convergence during motion
2021-10-25 18:06:38 -04:00
mcsauder
21163d859e
Whitespace cleanup.
2021-10-19 13:29:26 -04:00
Daniel Agar
4cf8eb8226
ekf2: EKF vehicle_at_rest always require some rotation in addition to vibration metrics
2021-10-18 21:39:40 -04:00
Daniel Agar
56823b5ac9
ekf2: EKF control don't allow invalid flow gyro to propagate
2021-10-14 16:31:22 -04:00
Mathieu Bresciani
56b0c46444
ekf2: improve optical flow angular rate compensation
2021-10-12 13:17:29 -04:00
Shubham Shah
c92cd65831
Update EKF2.cpp
2021-10-09 19:39:43 -04:00
Peter van der Perk
d5e3e9a7bc
[Kconfig] Decompose Kconfig, now each module has its own Kconfig
...
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Daniel Agar
ddd1dea4f0
ekf2: avoid uint64 timestamp conversion to float
2021-10-06 09:27:06 -04:00
Daniel Agar
c39a21aa54
ekf2: selector remove special timeout condition
...
- this mainly produces false positives when disarmed and bench testing
2021-09-29 09:59:08 -04:00
Paul Riseborough
ed7c5991eb
ekf2: Fix dimensional error in gyro and accel bias variance conversions
2021-09-29 09:58:41 -04:00