mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 16:43:35 +08:00
LandDetectorMC: enforce that LNDMC_Z_VEL_MAX is larger than MPC_LAND_CRWL/MPC_LAND_SPEED (#20614)
* LandDetectorMC: enforce that LNDMC_Z_VEL_MAX * 1.2 is below *MPC_LAND_CRWL/MPC_LAND_SPEED Otherwise the _in_descend flag doesn't get set correctly during the last part of the landing, where the descend speed is at MPC_LAND_CRWL or LAND_SPEED. The _in_descend flag is set it the velocity setpoint is >1.1*LNDMC_Z_VEL_MAX. Signed-off-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
co-authored by
Matthias Grob
parent
e58ad581a0
commit
798cc4f01c
@@ -87,12 +87,13 @@ private:
|
||||
/** Distance above ground below which entering ground contact state is possible when distance to ground is available. */
|
||||
static constexpr float DIST_FROM_GROUND_THRESHOLD = 1.0f;
|
||||
|
||||
/** Handles for interesting parameters. **/
|
||||
struct {
|
||||
param_t minThrottle;
|
||||
param_t hoverThrottle;
|
||||
param_t minManThrottle;
|
||||
param_t useHoverThrustEstimate;
|
||||
param_t landSpeed;
|
||||
param_t crawlSpeed;
|
||||
} _paramHandle{};
|
||||
|
||||
struct {
|
||||
@@ -100,6 +101,8 @@ private:
|
||||
float hoverThrottle;
|
||||
float minManThrottle;
|
||||
bool useHoverThrustEstimate;
|
||||
float landSpeed;
|
||||
float crawlSpeed;
|
||||
} _params{};
|
||||
|
||||
uORB::Subscription _actuator_controls_sub{ORB_ID(actuator_controls_0)};
|
||||
|
||||
Reference in New Issue
Block a user