better comments

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst 2020-03-17 10:22:30 +03:00 committed by Roman Bapst
parent 0184d8196f
commit a916cc2a26
2 changed files with 5 additions and 1 deletions

View File

@ -60,8 +60,10 @@ void FlightTaskTransition::checkSetpoints(vehicle_local_position_setpoint_s &set
bool FlightTaskTransition::update()
{
// level wings during the transition, altitude should be controlled
_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;
_velocity_setpoint(2) = 0.0f;
_position_setpoint(2) = NAN;

View File

@ -281,6 +281,8 @@ void Standard::update_transition_state()
} else if (_vtol_schedule.flight_mode == vtol_mode::TRANSITION_TO_MC) {
_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();
const Quatf q_sp(Eulerf(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body));