File tree 1 file changed +5
-1
lines changed
src/modules/flight_mode_manager/tasks/Transition
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,12 @@ float FlightTaskTransition::computeBackTranstionPitchSetpoint()
119
119
if (dist_to_target_in_moving_direction > FLT_EPSILON) {
120
120
// Backtransition target point is ahead of the vehicle, compute the desired deceleration
121
121
deceleration_setpoint = velocity_xy.norm_squared () / (2 .f * dist_to_target_in_moving_direction);
122
- deceleration_setpoint = math::min (deceleration_setpoint, 2 .f * _param_vt_b_dec_mss);
122
+
123
+ } else {
124
+ deceleration_setpoint = 2 .f * _param_vt_b_dec_mss;
123
125
}
126
+
127
+ deceleration_setpoint = math::min (deceleration_setpoint, 2 .f * _param_vt_b_dec_mss);
124
128
}
125
129
126
130
// Pitch up to reach a negative accel_in_flight_direction otherwise we decelerate too slow
You can’t perform that action at this time.
0 commit comments