mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 16:23:34 +08:00
VTOL: standard VTOL and Tiltrotor manual MC throttle during transition
This sets the throttle of the Multicopter actuators to the throttle stick position while in Stabilized, Acro or Manual mode. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Lorenz Meier
parent
802c68a62e
commit
706f806943
@@ -267,6 +267,11 @@ void Standard::update_transition_state()
|
||||
|
||||
_v_att_sp->roll_body = _fw_virtual_att_sp->roll_body;
|
||||
|
||||
// in stabilized, acro or manual mode, set the MC thrust to the throttle stick position (coming from the FW attitude setpoint)
|
||||
if (!_v_control_mode->flag_control_climb_rate_enabled) {
|
||||
_v_att_sp->thrust_body[2] = -_fw_virtual_att_sp->thrust_body[0];
|
||||
}
|
||||
|
||||
const Quatf q_sp(Eulerf(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body));
|
||||
q_sp.copyTo(_v_att_sp->q_d);
|
||||
|
||||
@@ -287,6 +292,11 @@ void Standard::update_transition_state()
|
||||
_v_att_sp->pitch_body = update_and_get_backtransition_pitch_sp();
|
||||
}
|
||||
|
||||
// in stabilized, acro or manual mode, set the MC thrust to the throttle stick position (coming from the FW attitude setpoint)
|
||||
if (!_v_control_mode->flag_control_climb_rate_enabled) {
|
||||
_v_att_sp->thrust_body[2] = -_fw_virtual_att_sp->thrust_body[0];
|
||||
}
|
||||
|
||||
const Quatf q_sp(Eulerf(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body));
|
||||
q_sp.copyTo(_v_att_sp->q_d);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user