standard vtol: fix mc weight calculation

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman 2018-03-02 15:06:01 +01:00 committed by Roman Bapst
parent 23257bf6ee
commit e0ca38e794

View File

@ -258,7 +258,7 @@ void Standard::update_transition_state()
// time based blending when no airspeed sensor is set
} else if (_params->airspeed_disabled) {
mc_weight = 1.0f - (time_since_trans_start - _params->front_trans_time_min) / _params->front_trans_time_min;
mc_weight = 1.0f - time_since_trans_start / _params->front_trans_time_min;
mc_weight = math::constrain(2.0f * mc_weight, 0.0f, 1.0f);
}