mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 10:13:33 +08:00
Multicopter rounded turns (#16376)
* AutoLineSmoothVel: Implement l1-style guidance in turns
This commit is contained in:
@@ -451,11 +451,11 @@ State FlightTaskAuto::_getCurrentState()
|
||||
// Target is behind.
|
||||
return_state = State::target_behind;
|
||||
|
||||
} else if (u_prev_to_target * prev_to_pos < 0.0f && prev_to_pos.length() > _mc_cruise_speed) {
|
||||
} else if (u_prev_to_target * prev_to_pos < 0.0f && prev_to_pos.length() > _target_acceptance_radius) {
|
||||
// Current position is more than cruise speed in front of previous setpoint.
|
||||
return_state = State::previous_infront;
|
||||
|
||||
} else if (Vector2f(Vector2f(_position) - _closest_pt).length() > _mc_cruise_speed) {
|
||||
} else if (Vector2f(Vector2f(_position) - _closest_pt).length() > _target_acceptance_radius) {
|
||||
// Vehicle is more than cruise speed off track.
|
||||
return_state = State::offtrack;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user