Skip to content

Commit

Permalink
AutoLineSmoothVel - Do not generate heading from trajectory if the ve…
Browse files Browse the repository at this point in the history
…locity vector is smaller than 10cm/s

This is done to avoid generating large yaw changes when the velocity
vector is small; for example when switching into loiter or reaching the
last waypoint.
  • Loading branch information
bresch authored and LorenzMeier committed May 30, 2019
1 parent 21c791e commit 3499b6f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool FlightTaskAutoLineSmoothVel::_generateHeadingAlongTraj()
bool res = false;
Vector2f vel_sp_xy(_velocity_setpoint);

if (vel_sp_xy.length() > .01f) {
if (vel_sp_xy.length() > .1f) {
// Generate heading from velocity vector, only if it is long enough
_compute_heading_from_2D_vector(_yaw_setpoint, vel_sp_xy);
res = true;
Expand Down

0 comments on commit 3499b6f

Please sign in to comment.