vtol: implement throttle blending out and into transition

- blend into TECS throttle after front transition
- blend out of TECS throttle during backtransition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2021-10-15 09:58:48 +02:00
committed by Silvan Fuhrer
parent 8dd76050e0
commit f61853d428
6 changed files with 85 additions and 7 deletions
@@ -420,3 +420,9 @@ Standard::waiting_on_tecs()
// keep thrust from transition
_v_att_sp->thrust_body[0] = _pusher_throttle;
};
void Standard::blendThrottleAfterFrontTransition(float scale)
{
const float tecs_throttle = _v_att_sp->thrust_body[0];
_v_att_sp->thrust_body[0] = scale * tecs_throttle + (1.0f - scale) * _pusher_throttle;
}