mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
VTOL Tailsitter: add front transition throttle blending
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user