The ResetVelocity() function is only supposed to reset XY states, not
Z state. Resetting the Z state for velocity results in a large
velocity glitch if a vehicle is descending or ascending when aiding
switches to AID_NONE
this fixes#19386
setting the parameter to 1 causes the following issues:
- the GPS may not have vertical velocity at the time the parameter
set happens, but may get it later when the GPS is fully configured
- we may switch between GPS modules which do/don't have vertical
velocity
- the user may download parameters after the set(1), and end up with
incorrect parameters they may later load onto the vehicle,
permanently disabling use of vertical velocity
Clarifies use of EK2_RANGE_USE_HGT and EK2_ALT_SOURCE parameters to control range finder use.
Setting EK2_RNG_USE_HGT to a positive number to enable automatic switching between the primary height source (baro or GPS) and range finder should be disabled if any primary height source other than Baro or GPS is selected via the EK2_ALT_SOURCE parameter.
Enables the yaw to be reset in flight to a value estimated from a specialised yaw estimator. This allows faster recovery if taking off with a bad magnetometer and also allows yaw alignment and GPS use to commence in-air when operating without any yaw sensing.
AP_NavEKF2: Add missing accesor functions for default airspeed
when GPS primary switches we were using a position which had not been
corrected for antenna offset. This was used for calculating the reset
for sensor change.
This fixes that (trivial fix) and also fixes a similar issue on
position reset
when on the ground without a position source we would disable the
innovation gate for the barometer. This meant that a single (or small
number of) really bad baro readings would be fused into the EKF,
causing it to destabilise
Fixes#11903
this forces the EKF origin to the GPS alt on a height datum reset if
we have GPS lock. If we don't do this then the reported AMSL alt will
drift over time away from the GPS alt when we reset while on the
ground