Uses a relaxed yaw innovation check threshold for fixed wing vehicle that can recover from larger yaw errors after takeoff.
Replaces the peak hold with decay filtering applied to the magnetic yaw innovations with a conventional lowpass filter. This prevents mag heading innovation transients caused by preflight handling from failing the check, but catches persistent errors. Sign swapping of innovations due to angle wrapping is not a problem due to the way that innovations are calculated inside the EKF, so a simple LPF sufficient.
The calibration warning was only used in the ESC calibration and in all
cases it actually meant that the calibration failed. In order to keep
the API as small as possible, I've deprecated the warning string and
converted the warning messages to failed messages.
Previously the rate controller disabled updating the integral below 20%
throttle. This is not ideal for several reasons:
- some racers already hover with 20% throttle.
- for acro it is important to always keep the integral enabled, it has a
noticeable effect on flight performance.
A reason for using switch arming in the first place is that you cannot
accidentally disarm in-air with the sticks during acrobatic flights.
It also adds a low-throttle arming requirement for switch arming.
This changes the arming logic such that the preflight checks don't need
to be satisfied if arming happens < 5 seconds after the last disarming.
This allows to recover from accidental in-air disarming.
if fRunPreArmChecks was set to false, there were still cases where the
preflight checks could be called. This fixes that.
arming_state_transition() with fRunPreArmChecks=false is only called
when entering & leaving preflight calibration mode.
All other places use fRunPreArmChecks=true, which means there is no change
for these.
- this matches the logic in arming_state_transition()
- if Commander::preflight_check was run in armed state and the checks
failed, disarming was not possible anymore
(because disarming checks for condition_system_sensors_initialized).
That is currently not the case, but the existing logic is way too fragile.
Alternative solution: check if armed in Preflight::preflightCheck, and
only transition to false if disarmed (but also respect the re-arming
grace period).
The uorb subscribe logic got changed for queued topics with
https://github.com/PX4/Firmware/pull/9436, meaning an orb_subscribe will
return past messages as well now.
This lead to an error 'Command denied during calibration' for the previously
received calibration start command.
Removes SITL startup warnings:
WARN [mavlink] stream SCALED_IMU2 not found
WARN [mavlink] stream SCALED_IMU3 not found
Introduced in 912272505264a80e174eedbeb2cff85cc522f4c9