mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
vtol_att_control: disable maximum height for quadchute by default
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
parent
9ed51ba8ed
commit
48e8477799
@ -255,13 +255,14 @@ PARAM_DEFINE_INT32(VT_FW_QC_R, 0);
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* @unit m
|
||||
* @min 0
|
||||
* @increment 1
|
||||
* @decimal 1
|
||||
* @group VTOL Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(VT_FW_QC_HMAX, 200.0f);
|
||||
PARAM_DEFINE_INT32(VT_FW_QC_HMAX, 0);
|
||||
|
||||
/**
|
||||
* Airspeed less front transition time (open loop)
|
||||
|
||||
@ -228,7 +228,9 @@ bool VtolType::isQuadchuteEnabled()
|
||||
|
||||
}
|
||||
|
||||
return _v_control_mode->flag_armed && !_land_detected->landed && dist_to_ground < _param_quadchute_max_height.get();
|
||||
return _v_control_mode->flag_armed &&
|
||||
!_land_detected->landed && _param_quadchute_max_height.get() > 0 &&
|
||||
dist_to_ground < (float)_param_quadchute_max_height.get();
|
||||
}
|
||||
|
||||
bool VtolType::isMinAltBreached()
|
||||
|
||||
@ -314,7 +314,7 @@ protected:
|
||||
(ParamFloat<px4::params::VT_FW_ALT_ERR>) _param_vt_fw_alt_err,
|
||||
(ParamInt<px4::params::VT_FW_QC_P>) _param_vt_fw_qc_p,
|
||||
(ParamInt<px4::params::VT_FW_QC_R>) _param_vt_fw_qc_r,
|
||||
(ParamFloat<px4::params::VT_FW_QC_HMAX>) _param_quadchute_max_height,
|
||||
(ParamInt<px4::params::VT_FW_QC_HMAX>) _param_quadchute_max_height,
|
||||
(ParamFloat<px4::params::VT_F_TR_OL_TM>) _param_vt_f_tr_ol_tm,
|
||||
(ParamFloat<px4::params::VT_TRANS_MIN_TM>) _param_vt_trans_min_tm,
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user