Skip to content
Snippets Groups Projects
Commit e7e791fb authored by Roman's avatar Roman Committed by Daniel Agar
Browse files

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: default avatarRoman <bapstroman@gmail.com>
parent 0f1c9504
No related branches found
No related tags found
No related merge requests found
......@@ -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()
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()
}
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment