From 11ffa179bbda46956f7a9b83b117f8579f7ad877 Mon Sep 17 00:00:00 2001 From: ttechnick Date: Thu, 12 Feb 2026 10:55:16 +0100 Subject: [PATCH] docs(fw_att_control): update docs --- docs/en/flight_stack/controller_diagrams.md | 6 +++--- src/modules/fw_att_control/FixedwingAttitudeControl.cpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/en/flight_stack/controller_diagrams.md b/docs/en/flight_stack/controller_diagrams.md index 99440cf913..465880a24c 100644 --- a/docs/en/flight_stack/controller_diagrams.md +++ b/docs/en/flight_stack/controller_diagrams.md @@ -185,10 +185,10 @@ In order to keep a constant rate, this damping can be compensated using feedforw ### Turn coordination -The roll and pitch controllers have the same structure and the longitudinal and lateral dynamics are assumed to be uncoupled enough to work independently. -The yaw controller, however, generates its yaw rate setpoint using the turn coordination constraint in order to minimize lateral acceleration, generated when the aircraft is slipping. The turn coordination algorithm is based solely on coordinated turn geometry calculation. +The yaw controller generates its yaw rate setpoint using the coordinated turn constraint in order to minimize lateral acceleration caused by sideslip. Instead of relying on Euler angles, the bank angle is computed geometrically from the body 𝑍. +Z-axis relative to a heading-aligned horizontal frame. This makes the turn coordination computation independent of absolute yaw and robust to large attitudes. -$$\dot{\Psi}_{sp} = \frac{g}{V_T} \tan{\phi_{sp}} \cos{\theta_{sp}}$$ +$$\dot{\Psi}_{sp} = \frac{g}{V_T} \tan{\phi_{sp}} \cdot 0.6$$ The yaw rate controller also helps to counteract [adverse yaw effects](https://youtu.be/sNV_SDDxuWk) and to damp the [Dutch roll mode](https://en.wikipedia.org/wiki/Dutch_roll) by providing extra directional damping. diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index 98567e107f..d194edd498 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -296,11 +296,10 @@ void FixedwingAttitudeControl::Run() if (q_sp.isAllFinite()) { const Quatf q_current(att.q); - const Quatf q_sp_full(q_sp); const Vector3f ez_world(0.f, 0.f, 1.f); const Vector3f ex_c = q_current.dcm_x(); const Vector3f ez_c = q_current.dcm_z(); - const Vector3f ez_sp = q_sp_full.dcm_z(); + const Vector3f ez_sp = q_sp.dcm_z(); // Tilt-only error quaternion Quatf q_tilt_err(ez_c, ez_sp);