forked from Archive/PX4-Autopilot
vtol_type: scale VT_TRANS_TIMEOUT with air density (#21509)
This commit is contained in:
parent
0afd93a9e9
commit
f76399be5e
|
@ -347,9 +347,9 @@ bool VtolType::isRollExceeded()
|
|||
bool VtolType::isFrontTransitionTimeout()
|
||||
{
|
||||
// check front transition timeout
|
||||
if (_param_vt_trans_timeout.get() > FLT_EPSILON && _common_vtol_mode == mode::TRANSITION_TO_FW) {
|
||||
if (getFrontTransitionTimeout() > FLT_EPSILON && _common_vtol_mode == mode::TRANSITION_TO_FW) {
|
||||
|
||||
if (_time_since_trans_start > _param_vt_trans_timeout.get()) {
|
||||
if (_time_since_trans_start > getFrontTransitionTimeout()) {
|
||||
// transition timeout occured, abort transition
|
||||
return true;
|
||||
}
|
||||
|
@ -582,6 +582,11 @@ float VtolType::getMinimumFrontTransitionTime() const
|
|||
return getFrontTransitionTimeFactor() * _param_vt_trans_min_tm.get();
|
||||
}
|
||||
|
||||
float VtolType::getFrontTransitionTimeout() const
|
||||
{
|
||||
return getFrontTransitionTimeFactor() * _param_vt_trans_timeout.get();
|
||||
}
|
||||
|
||||
float VtolType::getOpenLoopFrontTransitionTime() const
|
||||
{
|
||||
return getFrontTransitionTimeFactor() * _param_vt_f_tr_ol_tm.get();
|
||||
|
|
|
@ -227,6 +227,11 @@ public:
|
|||
*/
|
||||
float getMinimumFrontTransitionTime() const;
|
||||
|
||||
/**
|
||||
* @return Front transition timeout scaled for air density (if available) [s]
|
||||
*/
|
||||
float getFrontTransitionTimeout() const;
|
||||
|
||||
/**
|
||||
* @return Minimum open-loop front transition time scaled for air density (if available) [s]
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue