mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTaskTransition: keep high decelration when overshooting the transition target
This commit is contained in:
parent
11d7dd41fd
commit
34bcc277a5
@ -120,8 +120,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user