- introduces new parameter EKF2_PREDICT_US to configure the filter
update period in microseconds
- actual filter update period will be an integer multiple of IMU
This is done by inheriting from FlightTaskManualAltitudeSmoothVel again.
The altitude change by command is taken care of by switching
to the apporach when the altitude difference is big enough and
switching back once the altitude is close enough.
The altitude of the command is not perfectly reached but this can
only be done smoothly when the Orbit has full control over the
altitude smoothing. The independent altitude smoothing is not kept
because it was lacking stick handling like altitude lock and smooth
transitions when opening and closing the vertical position loop.
I think they were forgotten and it leads to side effects:
- The acceleration feed-forward does not get executed
- The acceleration setpoint is NAN when initializing the altitude
smoothing when arriving at the circle
The existing logic using the angle between velocity vectors failed to
determine a yaw failure in practice because the state velocity is often
too small compared to its uncertainty to be used. In all the failures
reported, the yaw emergency estimator converged properly and yaw reset
would have fixed the issue.
A much simpler check using the yaw difference between the main EKF
and the emergency estimator is now used to tell if the vel/pos update
failure is most likely caused by a wrong heading.
-rename FW_POSCTL_INV_ST to FW_POS_STK_CONF and make bitmask out of it:
- bit 0: alternative mapping (height rate on throttle stick, airspeed on pitch)
- bit 1: enable/disable airspeed setpoints via stick
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Take into account the actual number of roll and pitch acutators,
instead of assuming that all actuators have a roll/pitch component.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
The forced flag is used to distinguish between updates due to a configuration
(parameter) change (only enabled when disarmed), and matrix updates due to motor
tilt change. Only update the normalization scale if the forced flag is true, and
use a tilt angle of vertical position for it to have the scales tilt-invariant.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>