Skip to content
Snippets Groups Projects
Commit 37037176 authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Lorenz Meier
Browse files

FlightTaskAutoLine: ensure that desired speed along track does not exceed...

FlightTaskAutoLine: ensure that desired speed along track does not exceed maximum speed at threshold to target
parent d76aec4e
No related branches found
No related tags found
No related merge requests found
......@@ -155,6 +155,9 @@ void FlightTaskAutoLine::_generateXYsetpoints()
// accelerate towards target
speed_sp_track = acc_max * _deltatime + speed_sp_prev_track;
}
// ensure that desired speed does not exceed speed at threshold
speed_sp_track = math::min(speed_threshold, speed_sp_track);
}
speed_sp_track = math::constrain(speed_sp_track, 0.0f, _mc_cruise_speed);
......
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