From 14831f4a08843991c62b09a7dadd2591c49ec0d6 Mon Sep 17 00:00:00 2001 From: Davide Mor <davide.mor@skywarder.eu> Date: Fri, 13 Sep 2024 16:54:02 +0200 Subject: [PATCH] [Main] Updated algorithms configs --- src/boards/Main/Configs/ABKConfig.h | 4 ++-- src/boards/Main/Configs/ADAConfig.h | 4 ++-- src/boards/Main/Configs/FMMConfig.h | 5 ++--- src/boards/Main/Configs/MEAConfig.h | 22 +++++++++++----------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/boards/Main/Configs/ABKConfig.h b/src/boards/Main/Configs/ABKConfig.h index f24c4d5bf..a128619eb 100644 --- a/src/boards/Main/Configs/ABKConfig.h +++ b/src/boards/Main/Configs/ABKConfig.h @@ -42,7 +42,7 @@ constexpr Hertz UPDATE_RATE = 10_hz; #ifdef ROCCARASO -constexpr unsigned int SHADOW_MODE_TIMEOUT = 500; // [ms] +constexpr unsigned int SHADOW_MODE_TIMEOUT = 300; // [ms] static const Boardcore::AirBrakesInterpConfig CONFIG = { .FILTER_MINIMUM_ALTITUDE = 400, @@ -51,7 +51,7 @@ static const Boardcore::AirBrakesInterpConfig CONFIG = { .ABK_CRITICAL_ALTITUDE = 970, .DZ = 10, .INITIAL_MASS = 26, - .DM = 0.1f, + .DM = 3, .N_FORWARD = 0}; #else diff --git a/src/boards/Main/Configs/ADAConfig.h b/src/boards/Main/Configs/ADAConfig.h index 22cac1b0e..0fc32e89b 100644 --- a/src/boards/Main/Configs/ADAConfig.h +++ b/src/boards/Main/Configs/ADAConfig.h @@ -40,12 +40,12 @@ namespace ADA constexpr Hertz UPDATE_RATE = 50_hz; constexpr float UPDATE_RATE_SECONDS = 0.02; // [s] -constexpr unsigned int SHADOW_MODE_TIMEOUT = 18000; // [ms] +constexpr unsigned int SHADOW_MODE_TIMEOUT = 9000; // [ms] constexpr float APOGEE_VERTICAL_SPEED_TARGET = 2.5; // [m/s] constexpr unsigned int APOGEE_N_SAMPLES = 5; -constexpr float DEPLOYMENT_ALTITUDE_TARGET = 350; // [m] +constexpr float DEPLOYMENT_ALTITUDE_TARGET = 370; // [m] constexpr unsigned int DEPLOYMENT_N_SAMPLES = 5; } // namespace ADA diff --git a/src/boards/Main/Configs/FMMConfig.h b/src/boards/Main/Configs/FMMConfig.h index e5cdb2e63..1774cfdcf 100644 --- a/src/boards/Main/Configs/FMMConfig.h +++ b/src/boards/Main/Configs/FMMConfig.h @@ -34,10 +34,9 @@ namespace FlightModeManager // Set at 15 minutes constexpr unsigned int MISSION_TIMEOUT = 15 * 60 * 1000; -constexpr unsigned int ENGINE_SHUTDOWN_TIMEOUT = 6750; +constexpr unsigned int ENGINE_SHUTDOWN_TIMEOUT = 4000; -// Set at 25 seconds. -constexpr unsigned int APOGEE_TIMEOUT = 25 * 1000; +constexpr unsigned int APOGEE_TIMEOUT = 18 * 1000; constexpr unsigned int CUT_DURATION = 500; // [ms] diff --git a/src/boards/Main/Configs/MEAConfig.h b/src/boards/Main/Configs/MEAConfig.h index af86dc65f..421198999 100644 --- a/src/boards/Main/Configs/MEAConfig.h +++ b/src/boards/Main/Configs/MEAConfig.h @@ -40,9 +40,9 @@ constexpr Hertz UPDATE_RATE = 50_hz; #ifdef ROCCARASO // TODO: update for roccaraso flight -constexpr unsigned int SHADOW_MODE_TIMEOUT = 2500; // [ms] -constexpr float DEFAULT_INITIAL_ROCKET_MASS = 31.69f; // [kg] -constexpr float SHUTDOWN_APOGEE_TARGET = 1000; // agl [m] +constexpr unsigned int SHADOW_MODE_TIMEOUT = 2000; // [ms] +constexpr float DEFAULT_INITIAL_ROCKET_MASS = 30.36f; // [kg] +constexpr float SHUTDOWN_APOGEE_TARGET = 800; // agl [m] #else #ifndef EUROC #warning "MISSION NOT DEFINED: Using EUROC" @@ -53,7 +53,7 @@ constexpr float SHUTDOWN_APOGEE_TARGET = 3200; // agl [m] #endif constexpr float CD_CORRECTION_FACTOR = - 2.5f; // Completely random number (for now... i hope) + 2.69f; // Completely random number (for now... i hope) constexpr unsigned int SHUTDOWN_N_SAMPLES = 5; @@ -64,13 +64,13 @@ constexpr float MODEL_NOISE_VARIANCE = 1.0f; constexpr float CC_PRESSURE_THRESHOLD = 1.f; // [bar] constexpr Boardcore::Aeroutils::AerodynamicCoeff AERO_COEFF = { - .n000 = 0.596535425207973f, - .n100 = -1.81429600946981f, - .n200 = 8.47683559348987f, - .n300 = -23.1759370919254f, - .n400 = 35.8276525337534f, - .n500 = -29.2336913633527f, - .n600 = 9.84223649075812f}; + .n000 = 0.476899999999981f, + .n100 = -1.28143146853108f, + .n200 = 5.23466258740986f, + .n300 = -12.3610285547693f, + .n400 = 17.1137820512658f, + .n500 = -13.3237179487035f, + .n600 = 4.5833333333282f}; } // namespace MEA -- GitLab