VTOL Tailsitter: add front transition throttle blending

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-06-07 16:11:59 +02:00
parent a081354933
commit 3a2b973aba
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -238,7 +238,7 @@ void Tailsitter::update_transition_state()
void Tailsitter::waiting_on_tecs()
{
// copy the last trust value from the front transition
_v_att_sp->thrust_body[0] = _thrust_transition;
_v_att_sp->thrust_body[0] = -_last_thr_in_mc;
}
void Tailsitter::update_fw_state()
@@ -336,3 +336,9 @@ bool Tailsitter::isFrontTransitionCompletedBase()
return transition_to_fw;
}
void Tailsitter::blendThrottleAfterFrontTransition(float scale)
{
// note: MC throttle is negative (as in negative z), while FW throttle is positive (positive x)
_v_att_sp->thrust_body[0] = scale * _v_att_sp->thrust_body[0] + (1.f - scale) * (-_last_thr_in_mc);
}
@@ -66,6 +66,7 @@ public:
void update_fw_state() override;
void fill_actuator_outputs() override;
void waiting_on_tecs() override;
void blendThrottleAfterFrontTransition(float scale) override;
private:
enum class vtol_mode {