mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 05:03:33 +08:00
FlightTaskAutoLine: don't update yaw if waypoints are too close together
This commit is contained in:
committed by
ChristophTobler
parent
81c5025ad8
commit
3d250b3b83
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user