From 14a2fdfe551435638e22864437e75030abbf28eb Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 4 May 2022 14:56:45 +0200 Subject: [PATCH] =?UTF-8?q?Removed=20l1=20control=20slope=20angle=20limita?= =?UTF-8?q?tion.=20The=20maximal=20approach=20angle=20to=20the=20line=20wa?= =?UTF-8?q?s=20set=20to=2045=C2=B0,=20no=20the=20approach=20angle=20can=20?= =?UTF-8?q?be=20up=20to=2090=C2=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/l1/ECL_L1_Pos_Controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/l1/ECL_L1_Pos_Controller.cpp b/src/lib/l1/ECL_L1_Pos_Controller.cpp index 7f71b7512a..88fb6378a5 100644 --- a/src/lib/l1/ECL_L1_Pos_Controller.cpp +++ b/src/lib/l1/ECL_L1_Pos_Controller.cpp @@ -189,8 +189,8 @@ ECL_L1_Pos_Controller::navigate_waypoints(const Vector2f &vector_A, const Vector float xtrackErr = vector_A_to_airplane % vector_AB; float sine_eta1 = xtrackErr / math::max(_L1_distance, 0.1f); - /* limit output to 45 degrees */ - sine_eta1 = math::constrain(sine_eta1, -0.7071f, 0.7071f); //sin(pi/4) = 0.7071 + /* limit output to feasible values */ + sine_eta1 = math::constrain(sine_eta1, -1.0f, 1.0f); float eta1 = asinf(sine_eta1); eta = eta1 + eta2;