From 4bcff437bcb431c5bb9d2529108a48cbf5a1cd8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Betto?= <niccolo.betto@skywarder.eu> Date: Tue, 10 Sep 2024 16:30:05 +0200 Subject: [PATCH] [Payload][Wing] Use 3D GPS fix instead of generic fix --- src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp b/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp index aeb7b1c4c..544ba3f9c 100644 --- a/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp +++ b/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp @@ -53,7 +53,7 @@ AutomaticWingAlgorithm::AutomaticWingAlgorithm(float Kp, float Ki, void AutomaticWingAlgorithm::step() { - if (getModule<Sensors>()->getUBXGPSLastSample().fix != 0) + if (getModule<Sensors>()->getUBXGPSLastSample().fix == 3) { // The PI calculated result float result = algorithmStep(getModule<NASController>()->getNasState()); @@ -127,10 +127,6 @@ float AutomaticWingAlgorithm::algorithmStep(const NASState& state) // Convert the result from radians back to degrees result = result * (180.f / Constants::PI); - // Flip the servo orientation - // result *= -1; - // TODO check if this is needed - // Logs the outputs { miosix::Lock<FastMutex> l(mutex); -- GitLab