mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 01:43:33 +08:00
@@ -60,8 +60,10 @@ void FlightTaskTransition::checkSetpoints(vehicle_local_position_setpoint_s &set
|
|||||||
|
|
||||||
bool FlightTaskTransition::update()
|
bool FlightTaskTransition::update()
|
||||||
{
|
{
|
||||||
// level wings during the transition, altitude should be controlled
|
|
||||||
_acceleration_setpoint.xy() = matrix::Vector2f(0.f, 0.f);
|
_acceleration_setpoint.xy() = matrix::Vector2f(0.f, 0.f);
|
||||||
|
// demand zero vertical velocity and level attitude
|
||||||
|
// tailsitters will override attitude and thrust setpoint
|
||||||
|
// tiltrotors and standard vtol will overrride roll and pitch setpoint but keep vertical thrust setpoint
|
||||||
_position_setpoint *= NAN;
|
_position_setpoint *= NAN;
|
||||||
_velocity_setpoint(2) = 0.0f;
|
_velocity_setpoint(2) = 0.0f;
|
||||||
_position_setpoint(2) = NAN;
|
_position_setpoint(2) = NAN;
|
||||||
|
|||||||
@@ -281,6 +281,8 @@ void Standard::update_transition_state()
|
|||||||
} else if (_vtol_schedule.flight_mode == vtol_mode::TRANSITION_TO_MC) {
|
} else if (_vtol_schedule.flight_mode == vtol_mode::TRANSITION_TO_MC) {
|
||||||
|
|
||||||
_v_att_sp->roll_body = _fw_virtual_att_sp->roll_body;
|
_v_att_sp->roll_body = _fw_virtual_att_sp->roll_body;
|
||||||
|
|
||||||
|
// control backtransition deceleration using pitch.
|
||||||
_v_att_sp->pitch_body = update_and_get_backtransition_pitch_sp();
|
_v_att_sp->pitch_body = update_and_get_backtransition_pitch_sp();
|
||||||
|
|
||||||
const Quatf q_sp(Eulerf(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body));
|
const Quatf q_sp(Eulerf(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body));
|
||||||
|
|||||||
Reference in New Issue
Block a user