mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-15 05:07:35 +08:00
tailsitter: use differential thrust to control pitch and roll in FW
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -146,6 +146,7 @@ void Tailsitter::update_vtol_state()
|
||||
|
||||
if (transition_to_fw) {
|
||||
_vtol_schedule.flight_mode = vtol_mode::FW_MODE;
|
||||
printf("transition to FW completed\n");
|
||||
}
|
||||
|
||||
// check front transition timeout
|
||||
@@ -341,6 +342,12 @@ void Tailsitter::fill_actuator_outputs()
|
||||
_torque_setpoint_0->xyz[0] = fw_in[actuator_controls_s::INDEX_YAW] * _param_vt_fw_difthr_sc.get() ;
|
||||
}
|
||||
|
||||
mc_out[actuator_controls_s::INDEX_PITCH] = fw_in[actuator_controls_s::INDEX_PITCH];
|
||||
_torque_setpoint_0->xyz[1] = fw_in[actuator_controls_s::INDEX_PITCH];
|
||||
|
||||
mc_out[actuator_controls_s::INDEX_YAW] = -fw_in[actuator_controls_s::INDEX_ROLL];
|
||||
_torque_setpoint_0->xyz[2] = fw_in[actuator_controls_s::INDEX_ROLL];
|
||||
|
||||
} else {
|
||||
_torque_setpoint_0->xyz[0] = mc_in[actuator_controls_s::INDEX_ROLL];
|
||||
_torque_setpoint_0->xyz[1] = mc_in[actuator_controls_s::INDEX_PITCH];
|
||||
|
||||
Reference in New Issue
Block a user