AutoLineSmoothVel - Do not generate heading from trajectory if the velocity 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.
This commit is contained in:
bresch
2019-05-30 11:14:44 +02:00
committed by Lorenz Meier
parent 21c791e959
commit 3499b6ff89
@@ -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;