mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 03:23:34 +08:00
L1: Do only check for wrong tangent_vel if in circle_mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Roman Bapst
parent
c5486ca47e
commit
646b5bb578
@@ -264,8 +264,8 @@ ECL_L1_Pos_Controller::navigate_loiter(const Vector2f &vector_A, const Vector2f
|
||||
/* calculate velocity on circle / along tangent */
|
||||
float tangent_vel = xtrack_vel_center * loiter_direction;
|
||||
|
||||
/* prevent PD output from turning the wrong way */
|
||||
if (tangent_vel < 0.0f) {
|
||||
/* prevent PD output from turning the wrong way when in circle mode */
|
||||
if (tangent_vel < 0.0f && _circle_mode) {
|
||||
lateral_accel_sp_circle_pd = math::max(lateral_accel_sp_circle_pd, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user