mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 15:43:34 +08:00
FlightTaskTransition: keep high decelration when overshooting the transition target
This commit is contained in:
committed by
Silvan Fuhrer
parent
11d7dd41fd
commit
34bcc277a5
@@ -120,8 +120,12 @@ float FlightTaskTransition::computeBackTranstionPitchSetpoint()
|
|||||||
if (dist_to_target_in_moving_direction > FLT_EPSILON) {
|
if (dist_to_target_in_moving_direction > FLT_EPSILON) {
|
||||||
// Backtransition target point is ahead of the vehicle, compute the desired deceleration
|
// 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 = 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
|
// Pitch up to reach a negative accel_in_flight_direction otherwise we decelerate too slow
|
||||||
|
|||||||
Reference in New Issue
Block a user