mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 08:53:35 +08:00
FlightTaskAutoLine: ensure that desired speed along track does not exceed maximum speed at threshold to target
This commit is contained in:
committed by
Lorenz Meier
parent
d76aec4eb2
commit
370371767f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user