Files
PX4-Autopilot/msg
Jacob Dahl d3fb335a55 refactor(ekf2): stop reading the sensors module's GNSS params (#28935)
* refactor(ekf2): stop reading the sensors module's GNSS params

When the GNSS checks moved to the sensors module, EKF2 kept reading
three of their parameters for its own logic: GNSS_REQ_TIME for the wait
before restarting GNSS fusion and before a GNSS heading reset,
GNSS_REQ_SACC for trusting GNSS vertical velocity while the
accelerometer clips and for the yaw estimator, and GNSS_CHECK for the
heading receiver's spoofing and jamming. That coupled EKF2 to the
sensors module's parameters, and tied EKF2's waits and thresholds,
which judge a sample against the estimate, to thresholds that judge a
receiver on its own.

EKF2_REQ_GPS_H and EKF2_REQ_SACC come back as EKF2 parameters for
EKF2's own use. An imported value is also copied to GNSS_REQ_TIME and
GNSS_REQ_SACC, as it drove the checks as well before they moved, and
airframes that set the check parameter set the EKF2 one too. The
sensors module marks a heading unusable when its receiver reports
spoofing or jamming and those checks are enabled, and EKF2 fuses
vehicle_gnss_heading.usable instead of reading GNSS_CHECK.

Assisted-by: Claude:claude-opus-5-5

* refactor(ekf2): use EKF2 constants for its own GNSS thresholds

EKF2_REQ_GPS_H and EKF2_REQ_SACC duplicated GNSS_REQ_TIME and
GNSS_REQ_SACC for the few places EKF2 reused the check thresholds: the
wait before restarting GNSS fusion and before a GNSS heading reset, and
the speed accuracy for the clipping case and the yaw estimator. They
aren't tuned apart from the checks, and a second parameter for the same
threshold in another module only invites the two to disagree.

EKF2 now uses its 10 s GNSS health time default, and 1 m/s, which
fixed-wing, PX4 Vision and SITL already set and the EKF2 tests always
used. The requirement parameters exist once, with the checks.

Assisted-by: Claude:claude-opus-5-5

* revert(ekf2): keep EKF2_REQ_GPS_H and EKF2_REQ_SACC as EKF2 parameters

Reverts 7fc8503dd3d. EKF2's waits and speed accuracy threshold aren't
duplicates of GNSS_REQ_TIME and GNSS_REQ_SACC: the checks decide when a
receiver is good enough to use, EKF2 decides how long to wait after it
gave up on GNSS and when a velocity is good enough to override a clipped
accelerometer or feed the yaw estimator. They shared a parameter only
because EKF2 ran the checks. As constants they lose tuning that is in
use: SITL sets a 0.5 s health time, fixed-wing a 1 m/s speed accuracy.

Assisted-by: Claude:claude-opus-5-5
2026-09-30 15:03:30 -06:00
..
2025-11-04 17:22:10 +01:00
2024-06-26 11:05:38 +02:00
2024-06-26 11:05:38 +02:00
2025-07-25 09:42:12 -08:00
…
2025-07-23 11:13:11 +02:00