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

AC_WPNav: remove unassigned _track_desired #17122

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions libraries/AC_WPNav/AC_WPNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,6 @@ bool AC_WPNav::set_wp_destination_next_NED(const Vector3f& destination_NED)
/// relies on set_wp_destination or set_wp_origin_and_destination having been called first
void AC_WPNav::shift_wp_origin_to_current_pos()
{
// return immediately if vehicle is not at the origin
if (_track_desired > 0.0f) {
return;
}

// get current and target locations
const Vector3f &curr_pos = _inav.get_position();
const Vector3f pos_target = _pos_control.get_pos_target();
Expand Down
1 change: 0 additions & 1 deletion libraries/AC_WPNav/AC_WPNav.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ class AC_WPNav
Vector3f _origin; // starting point of trip to next waypoint in cm from ekf origin
Vector3f _destination; // target destination in cm from ekf origin
float _track_error_xy; // horizontal error of the actual position vs the desired position
float _track_desired; // our desired distance along the track in cm
float _track_scalar_dt; // time compression multiplier to slow the progress along the track
float _yaw; // current yaw heading in centi-degrees based on track direction
float _yaw_rate_cds; // current yaw rate in centi-degrees/second based on track curvature
Expand Down