Skip to content

Commit

Permalink
FlightTaskTransition: keep high decelration when overshooting the tra…
Browse files Browse the repository at this point in the history
…nsition target
  • Loading branch information
MaEtUgR committed Dec 18, 2024
1 parent 1ef3107 commit 54da80c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ float FlightTaskTransition::computeBackTranstionPitchSetpoint()
if (dist_to_target_in_moving_direction > FLT_EPSILON) {
// Backtransition target point is ahead of the vehicle, compute the desired deceleration
deceleration_setpoint = velocity_xy.norm_squared() / (2.f * dist_to_target_in_moving_direction);
deceleration_setpoint = math::min(deceleration_setpoint, 2.f * _param_vt_b_dec_mss);

} else {
deceleration_setpoint = 2.f * _param_vt_b_dec_mss;
}

deceleration_setpoint = math::min(deceleration_setpoint, 2.f * _param_vt_b_dec_mss);
}

// Pitch up to reach a negative accel_in_flight_direction otherwise we decelerate too slow
Expand Down

0 comments on commit 54da80c

Please sign in to comment.