Avoid flying into terrain using the distance sensor.
Enable through the parameter NAV_MIN_GND_DIST.
Only active during commanded descents with vz>0 (to prevent climb-aways),
excluding landing and VTOL transitions.
It changes the altitude setpoint in the triplet to maintain the current altitude
and republish the triplet. We also change the mission item altitude used for
acceptance calculations to prevent getting stuck in a loop.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
battery failures can occur upon arming when the load gets sgnificant.
In that case the safest thing to do is prevent a takeoff before anything
worse happens.
The wind variance can be reset to a value larger than the wind init
variance (e.g.: when the reset occurs when flying close to the N or E
axis). Constraining the variance after a covariance initialization would
artificially increase the correlation and could destabilize the filter.
* added support for resetting wind states to external observation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* moved wind related functions into separate file
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* added VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* correctly compute variances
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* ekf2: implement wind reset
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* only allow VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE during wind dead-reckoning
and increase horizontal velocity variance to allow velocity states to move
towards solution that is aligned with the newly set wind
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* only reset wind on ground
* still use wind reset using airspeed when it wasn't initialized
* exclude func for rover, change reset interface
* handle wind reset in drag-fusion
* replace state reset with variance reset in sideslip/drag fusion
* remove resetWind function
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
- remove commander test ratio "tuning knobs" (COM_ARM_EKF_{HGT,POS,VEL,YAW})
- these are effectively redundant with the actual tuning (noise & gate)
in the estimator, plus most users have no idea why they'd be
adjusting these other than to silence an annoying preflight complaint
- remove ekf2 "PreFlightChecker" with hard coded innovation limits
- ekf2 preflight innovation flags are now simply if any active source
exceeds half the limit preflight