mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 07:47:34 +08:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user