Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable non-zero initial velocity in waypoint following #2

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libraries/AR_WPNav/AR_WPNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ bool AR_WPNav::set_desired_location(const Location& destination, Location next_d
_pos_control.get_accel_max(), // vertical accel (not used)
AR_WPNAV_SNAP_MAX, // snap
_pos_control.get_jerk_max());

const auto curr_speed = AP::ahrs().groundspeed_vector().length();
if (!is_zero(curr_speed)) {
// rebuild start of scurve if we have a non-zero origin speed
_scurve_this_leg.set_origin_speed_max(curr_speed);
}
}

// handle next destination
Expand Down
Loading