mc_pos_control: when close to current and previous, ajdust target velocity

This commit is contained in:
Dennis Mannhart
2017-09-11 02:08:22 -07:00
committed by Lorenz Meier
parent 0a37d8dc42
commit 267dbe9b7a
@@ -1497,8 +1497,6 @@ void MulticopterPositionControl::control_auto(float dt)
|| !next_setpoint_valid)
&& ((pos_sp_diff.length()) < SIGMA_NORM);
/* only follow line if previous to current has a minimum distance */
if ((vec_prev_to_current.length() > _nav_rad.get()) && !stay_at_current_pos) {
@@ -1561,7 +1559,6 @@ void MulticopterPositionControl::control_auto(float dt)
vel_sp_along_track = vec_pos_to_current.length() * _params.pos_p(0);
vel_sp_along_track = (vel_sp_along_track < get_cruising_speed_xy()) ? vel_sp_along_track : get_cruising_speed_xy();
} else if (close_to_prev) {
/* accelerate from previous setpoint towards current setpoint */