Files
Ramon Roche 150094a592 test(ekf2): add SIH SITL test for EKF2 selector regression
Adds a two-phase test that reproduces the EKF2 selector whipsaw from
#27013:

Phase 1: Inject accel clipping on IMU 0 so EKF0 declares cs_baro_fault
and its Z state diverges from baro (switches to GPS-only height).

Phase 2: Move clipping to IMU 1. EKF0 now has no filter_fault_flags
but retains diverged Z. EKF1 gets bad_acc_clipping. The selector falls
back to the "healthy" but diverged EKF0, causing altitude spikes.

Verified locally: test fails with 9.3m altitude deviation (5m tolerance),
confirming the selector bug is reproducible in SIH SITL.

Also adds dual magnetometer to sensor_mag_sim (matching v6c sensor
topology), SIH test runner, CI workflow, and set_param_float helper.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-13 10:43:57 -07:00
..