mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 02:06:27 +08:00
VTOL: fix quad-chute max altitude limit
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Roman Bapst
parent
3d50a7ce44
commit
8a680a3153
@@ -249,13 +249,13 @@ PARAM_DEFINE_INT32(VT_FW_QC_P, 0);
|
|||||||
PARAM_DEFINE_INT32(VT_FW_QC_R, 0);
|
PARAM_DEFINE_INT32(VT_FW_QC_R, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quadchute maximum height.
|
* Quadchute maximum height
|
||||||
*
|
*
|
||||||
* Maximum height above the ground (if available, otherwhise above home if available, otherwise above the local origin) where triggering a quadchute is possible.
|
* Maximum height above the ground (if available, otherwhise above home if available, otherwise above the local origin) where triggering a quadchute is possible.
|
||||||
* Triggering a quadchute always means transitioning the vehicle to hover flight in which generally a lot of energy is consumed.
|
* Triggering a quadchute always means transitioning the vehicle to hover flight in which generally a lot of energy is consumed.
|
||||||
* At high altitudes there is therefore a big risk to deplete the battery and therefore crash. Currently, there is no automated
|
* At high altitudes there is therefore a big risk to deplete the battery and therefore crash. Currently, there is no automated
|
||||||
* re-transition to fixed wing mode implemented and therefore this parameter serves and an intermediate measure to increase safety.
|
* re-transition to fixed wing mode implemented and therefore this parameter serves and an intermediate measure to increase safety.
|
||||||
* Setting this value to 0 deactivates the behavior.
|
* Setting this value to 0 deactivates the behavior (always enable quad-chute independently of altitude).
|
||||||
*
|
*
|
||||||
* @unit m
|
* @unit m
|
||||||
* @min 0
|
* @min 0
|
||||||
|
|||||||
@@ -228,9 +228,12 @@ bool VtolType::isQuadchuteEnabled()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool above_quadchute_altitude_limit = _param_quadchute_max_height.get() > 0
|
||||||
|
&& dist_to_ground > (float)_param_quadchute_max_height.get();
|
||||||
|
|
||||||
return _v_control_mode->flag_armed &&
|
return _v_control_mode->flag_armed &&
|
||||||
!_land_detected->landed && _param_quadchute_max_height.get() > 0 &&
|
!_land_detected->landed && !above_quadchute_altitude_limit;
|
||||||
dist_to_ground < (float)_param_quadchute_max_height.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VtolType::isMinAltBreached()
|
bool VtolType::isMinAltBreached()
|
||||||
|
|||||||
Reference in New Issue
Block a user