From 0c74dec674786b0cd5c73cb7be4c865cf6e1d908 Mon Sep 17 00:00:00 2001
From: Alberto Nidasio <alberto.nidasio@skywarder.eu>
Date: Fri, 16 Sep 2022 23:44:48 +0200
Subject: [PATCH] [Roccaraso] Updated reference values and other configs

---
 src/boards/Main/Configs/ADAConfig.h                         | 6 +-----
 src/boards/Main/Configs/AirBrakesControllerConfig.h         | 2 +-
 .../Main/StateMachines/ADAController/ADAController.cpp      | 2 +-
 src/boards/common/ReferenceConfig.h                         | 4 ++--
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/boards/Main/Configs/ADAConfig.h b/src/boards/Main/Configs/ADAConfig.h
index f5e1ecf25..8b850d901 100644
--- a/src/boards/Main/Configs/ADAConfig.h
+++ b/src/boards/Main/Configs/ADAConfig.h
@@ -33,16 +33,12 @@ namespace ADAConfig
 constexpr uint32_t UPDATE_PERIOD   = 20;                       // 50 hz
 static const float SAMPLING_PERIOD = UPDATE_PERIOD / 1000.0f;  // in seconds
 
-// Initialize the Kalman filter with a negative (pressure) acceleration in order
-// to make it more responsive during the propulsive phase
-static const float KALMAN_INITIAL_ACCELERATION = 0;
-
 constexpr int PRES_STAB_TIMEOUT = 5 * 1000;  // [ms]
 
 #ifdef EUROC
 constexpr int SHADOW_MODE_TIMEOUT = 16 * 1000;  // [ms]
 #else
-constexpr int SHADOW_MODE_TIMEOUT = 8 * 1000;  // [ms]
+constexpr int SHADOW_MODE_TIMEOUT = 7 * 1000;  // [ms]
 #endif
 
 // When the vertical speed is smaller than this value, apogee is detected.
diff --git a/src/boards/Main/Configs/AirBrakesControllerConfig.h b/src/boards/Main/Configs/AirBrakesControllerConfig.h
index 63b3665d7..4480be708 100644
--- a/src/boards/Main/Configs/AirBrakesControllerConfig.h
+++ b/src/boards/Main/Configs/AirBrakesControllerConfig.h
@@ -36,7 +36,7 @@ constexpr uint32_t UPDATE_PERIOD = 100;  // 10 hz
 #ifdef EUROC
 static constexpr int SHADOW_MODE_TIMEOUT = 5 * 1000;
 #else
-static constexpr int SHADOW_MODE_TIMEOUT = 3.5 * 1000;
+static constexpr int SHADOW_MODE_TIMEOUT = 3.8 * 1000;
 #endif
 
 constexpr float MACH_LIMIT = 0.8;
diff --git a/src/boards/Main/StateMachines/ADAController/ADAController.cpp b/src/boards/Main/StateMachines/ADAController/ADAController.cpp
index 58d70122a..5cf98a941 100644
--- a/src/boards/Main/StateMachines/ADAController/ADAController.cpp
+++ b/src/boards/Main/StateMachines/ADAController/ADAController.cpp
@@ -568,7 +568,7 @@ ADA::KalmanFilter::KalmanConfig ADAController::getADAKalmanConfig()
             R_INIT,
             P_INIT,
             ADA::KalmanFilter::CVectorN(ada.getReferenceValues().refPressure, 0,
-                                        KALMAN_INITIAL_ACCELERATION)};
+                                        0)};
 }
 
 }  // namespace Main
diff --git a/src/boards/common/ReferenceConfig.h b/src/boards/common/ReferenceConfig.h
index 63b52635c..26874c48f 100644
--- a/src/boards/common/ReferenceConfig.h
+++ b/src/boards/common/ReferenceConfig.h
@@ -50,8 +50,8 @@ static const Boardcore::ReferenceValues defaultReferenceValues = {
     1414.0,      // [m] Altitude
     85452.0,     // [Pa] Pressure
     278.95,      // [K] Temperature
-    41.8086605,  // [deg] Start latitude
-    14.0543387,  // [deg] Start longitude
+    41.8089005,  // [deg] Start latitude
+    14.0546716,  // [deg] Start longitude
     Boardcore::Constants::MSL_PRESSURE,
     Boardcore::Constants::MSL_TEMPERATURE,
 };
-- 
GitLab