Browse Source

tailsitter: use forward transition throttle for climb-rate controlled mode

- the mc pos controller will decrease throttle during the transition
and thus the vehicle will not pick up enough airspeed to complete the
transition

Signed-off-by: Roman <bapstroman@gmail.com>
sbg
Roman 7 years ago committed by Daniel Agar
parent
commit
e7e791fb1a
  1. 12
      src/modules/vtol_att_control/tailsitter.cpp

12
src/modules/vtol_att_control/tailsitter.cpp

@ -198,8 +198,6 @@ void Tailsitter::update_transition_state() @@ -198,8 +198,6 @@ void Tailsitter::update_transition_state()
_v_att_sp->pitch_body = math::constrain(_v_att_sp->pitch_body, PITCH_TRANSITION_FRONT_P1 - 0.2f,
_pitch_transition_start);
_v_att_sp->thrust = _mc_virtual_att_sp->thrust;
// disable mc yaw control once the plane has picked up speed
if (_airspeed->indicated_airspeed_m_s > ARSP_YAW_CTRL_DISABLE) {
_mc_yaw_weight = 0.0f;
@ -222,9 +220,6 @@ void Tailsitter::update_transition_state() @@ -222,9 +220,6 @@ void Tailsitter::update_transition_state()
time_since_trans_start / _params->back_trans_duration;
_v_att_sp->pitch_body = math::constrain(_v_att_sp->pitch_body, -2.0f, PITCH_TRANSITION_BACK + 0.2f);
_v_att_sp->thrust = _mc_virtual_att_sp->thrust;
// keep yaw disabled
_mc_yaw_weight = 0.0f;
@ -233,6 +228,13 @@ void Tailsitter::update_transition_state() @@ -233,6 +228,13 @@ void Tailsitter::update_transition_state()
}
if (_v_control_mode->flag_control_climb_rate_enabled) {
_v_att_sp->thrust = _params->front_trans_throttle;
} else {
_v_att_sp->thrust = _mc_virtual_att_sp->thrust;
}
_mc_roll_weight = math::constrain(_mc_roll_weight, 0.0f, 1.0f);
_mc_yaw_weight = math::constrain(_mc_yaw_weight, 0.0f, 1.0f);
_mc_pitch_weight = math::constrain(_mc_pitch_weight, 0.0f, 1.0f);

Loading…
Cancel
Save