We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cdb64b commit 67eb20eCopy full SHA for 67eb20e
ArduPlane/quadplane.cpp
@@ -2530,7 +2530,7 @@ void QuadPlane::vtol_position_controller(void)
2530
// calculate speed we should be at to reach the position2
2531
// target speed at the position2 distance threshold, assuming
2532
// Q_TRANS_DECEL is correct
2533
- const float stopping_speed = safe_sqrt(MAX(0, distance-position2_dist_threshold) * 2 * transition_decel) + position2_target_speed;
+ const float stopping_speed = safe_sqrt(MAX(0, distance-position2_dist_threshold) * 2 * transition_decel + sq(position2_target_speed));
2534
2535
float target_speed = stopping_speed;
2536
0 commit comments