vtol_type: scale VT_TRANS_TIMEOUT with air density (#21509)

This commit is contained in:
Yannick Fuhrer 2023-04-27 09:22:04 +02:00 committed by GitHub
parent 0afd93a9e9
commit f76399be5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -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();

View File

@ -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]
*/