Skip to content
Snippets Groups Projects
Commit 3d250b3b authored by Dennis Mannhart's avatar Dennis Mannhart Committed by ChristophTobler
Browse files

FlightTaskAutoLine: don't update yaw if waypoints are too close together

parent 81c5025a
No related branches found
No related tags found
No related merge requests found
......@@ -56,12 +56,8 @@ void FlightTaskAutoLine::_generateSetpoints()
void FlightTaskAutoLine::_generateHeadingAlongTrack()
{
Vector2f prev_to_dest = Vector2f(&(_target - _prev_wp)(0));
_compute_heading_from_2D_vector(_yaw_setpoint, prev_to_dest);
if (!_compute_heading_from_2D_vector(_yaw_setpoint, prev_to_dest)) {
// heading could not be computed. best we can do is to set heading
// to current yaw
_yaw_setpoint = _yaw;
}
}
void FlightTaskAutoLine::_generateXYsetpoints()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment