- if "landed" and "maybe_landed" states are false then both the "hit_ground" and the "low_thrust" condition need to be true in order to detect landing
- ground contact MC NAN setpoint workaround
- ground contact additionally check acceleration setpoint
- schedule with vehicle_local_position updates (most updates require valid local position)
- don't allow LNDMC_Z_VEL_MAX to exceed MPC_LAND_SPEED
- ground contact horizontal movement checks default to failed if estimates aren't available
* Mavlink: subscribe to airspeed_validated instead of airspeed topic
This e.g. changes the way QGC displays the airspeed in case of an
airspeed failure (0 instead of the last valid airspeed). It will
always display the airspeed that's used currently in the control
modules.
* FW land detector: move to subscribe to airspeed_validated instead of airspeed topic
- the land detector checks further if the airspeed is NAN, in which case
it sets the airspeed to 0 (min groundspeed, vz and accel checks still
have to pass.
* Fixed-wing land detector use airspeed_vaidated: addressed review comments
- replaced ternary by conditional
- set airspeed to 0 if airspeed_validated stops publishing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Consolidate _update_params() methods for improved inheritance from the LandDetector base class.
Move common uORB::Subscriptions to the base class for inheritance.
Deprecate redundant override methods.
Before that, different modules (ekf2, commander & land detector) changed
params upon different events:
- ekf2 & commander set params after disarm
- land detector set params on land detected
If the 2 events were several 100ms appart, it led to 2 param saves, and
the latter param set could have been blocked by an ongoing save. And if
the land detector was blocked, it could lead to mag timeouts.
This patch makes all modules use the same event, thus only a single param
save will happen.
If we want to have guarantees to never block, we should introduce a
param_try_set() API method.
- constructor initalization fix
- set trigger time for ground contact hysteresis
- updated ground_contact_state logic
MulticopterLandDetector:
- added hysteresis for ground_contact
VtolLandDetector:
- get_ground_contact_state function that return the one form MultcopterLandDetector
FixedWingLandDetector:
- get_ground_contact_state with a return false: requires implementation