Skip to content
Snippets Groups Projects
Commit fff56c47 authored by Randy Mackay's avatar Randy Mackay
Browse files

WPNav: stopping point projection uses wp_leash

parent a2ea053c
No related branches found
No related tags found
No related merge requests found
...@@ -137,7 +137,7 @@ void AC_WPNav::get_stopping_point(const Vector3f& position, const Vector3f& velo ...@@ -137,7 +137,7 @@ void AC_WPNav::get_stopping_point(const Vector3f& position, const Vector3f& velo
linear_distance = _wp_accel_cms/(2.0f*kP*kP); linear_distance = _wp_accel_cms/(2.0f*kP*kP);
target_dist = linear_distance + (vel_total*vel_total)/(2.0f*_wp_accel_cms); target_dist = linear_distance + (vel_total*vel_total)/(2.0f*_wp_accel_cms);
} }
target_dist = constrain_float(target_dist, 0, _loiter_leash*2.0f); target_dist = constrain_float(target_dist, 0, _wp_leash_xy*2.0f);
target.x = position.x + (target_dist * velocity.x / vel_total); target.x = position.x + (target_dist * velocity.x / vel_total);
target.y = position.y + (target_dist * velocity.y / vel_total); target.y = position.y + (target_dist * velocity.y / vel_total);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment