diff --git a/src/boards/DeathStack/configs/ADAConfig.h b/src/boards/DeathStack/configs/ADAConfig.h index c569e60c596a8aee1fce662c355bd4434b7348fe..b2449e9a203322ddfb8064c93e09e74c0c425133 100644 --- a/src/boards/DeathStack/configs/ADAConfig.h +++ b/src/boards/DeathStack/configs/ADAConfig.h @@ -49,19 +49,19 @@ constexpr unsigned int DEPLOYMENT_N_SAMPLES = 5; // > 0: Apogee detected ahead of time (while still going up) constexpr float APOGEE_VERTICAL_SPEED_TARGET = 2.5; // When the vertical speed is smaller than this value, airbrakes are disabled. -constexpr float ABK_DISABLE_VERTICAL_SPEED_TARGET = 7.5; +constexpr float ABK_DISABLE_VERTICAL_SPEED_TARGET = 10.0; // State timeouts #ifdef EUROC static const unsigned int TIMEOUT_ADA_SHADOW_MODE = 8.5 * 1000; // ms #else -static const unsigned int TIMEOUT_ADA_SHADOW_MODE = 6.5 * 1000; // ms +static const unsigned int TIMEOUT_ADA_SHADOW_MODE = 8 * 1000; // ms #endif static const unsigned int TIMEOUT_ADA_P_STABILIZATION = 5 * 1000; // ms // Number of samples used to calibrate the kalman initial state -static const unsigned int CALIBRATION_BARO_N_SAMPLES = 200; // 1200; +static const unsigned int CALIBRATION_BARO_N_SAMPLES = 500; // Default reference values settings static const float DEFAULT_REFERENCE_TEMPERATURE = 288.15f; diff --git a/src/boards/DeathStack/configs/AirBrakesConfig.h b/src/boards/DeathStack/configs/AirBrakesConfig.h index 0244295346f5be6265ba0b837bf4a3be1f9babb3..0f684634eb7c2b4abc3f1252f16f2564f3108d86 100644 --- a/src/boards/DeathStack/configs/AirBrakesConfig.h +++ b/src/boards/DeathStack/configs/AirBrakesConfig.h @@ -42,7 +42,7 @@ static constexpr PWMChannel AB_SERVO_PWM_CH = PWMChannel::CH2; #ifdef EUROC static constexpr float M = 27.0; /**< rocket's mass */ #else -static constexpr float M = 19.2; /**< rocket's mass */ +static constexpr float M = 18.362; /**< rocket's mass */ #endif static constexpr float D = 0.15; /**< rocket's diameter */ @@ -74,7 +74,7 @@ static constexpr float AB_SERVO_WIGGLE_AMPLITUDE = 10.0; // deg #ifdef ROCCARASO // At Roccaraso airbrakes opened at 100%, then 50% and then 0% // Each opening is kept for 3 seconds (3000 ms) -static constexpr float AB_OPENING_TIMEOUT = 3000; // [ms] +static constexpr float AB_OPENING_TIMEOUT = 3000; // [ms] #endif // Control algorithm configs diff --git a/src/boards/DeathStack/configs/FlightStatsConfig.h b/src/boards/DeathStack/configs/FlightStatsConfig.h index eb7fe88fc016a12ea6f3e4f1af232ff0e9972d46..5ad3133d7429ad44aa19f26a6cfa789435a50837 100644 --- a/src/boards/DeathStack/configs/FlightStatsConfig.h +++ b/src/boards/DeathStack/configs/FlightStatsConfig.h @@ -30,8 +30,8 @@ namespace DeathStackBoard namespace FlightStatsConfig { static constexpr long long TIMEOUT_LIFTOFF_STATS = 7500; // [ms] -static constexpr long long TIMEOUT_APOGEE_STATS = 1500; // [ms] -static constexpr long long TIMEOUT_DROGUE_DPL_STATS = 10000; // [ms] +static constexpr long long TIMEOUT_APOGEE_STATS = 1000; // [ms] +static constexpr long long TIMEOUT_DROGUE_DPL_STATS = 5000; // [ms] static constexpr long long TIMEOUT_MAIN_DPL_STATS = 10000; // [ms] } // namespace FlightStatsConfig diff --git a/src/boards/DeathStack/configs/NASConfig.h b/src/boards/DeathStack/configs/NASConfig.h index 760f047f875a13d317c803b4205266566cb3a088..ab58022d129848f081a3ef0e7227f704befb7d6d 100644 --- a/src/boards/DeathStack/configs/NASConfig.h +++ b/src/boards/DeathStack/configs/NASConfig.h @@ -39,30 +39,30 @@ static const float SAMPLE_RATE = 1000.0F / NAS_UPDATE_PERIOD; // [Hz] static const float T = 1.0F / SAMPLE_RATE; // [s] -static const uint32_t CALIBRATION_N_SAMPLES = 200; +static const uint32_t CALIBRATION_N_SAMPLES = 500; static const float SIGMA_BETA = (float)1e-2; // [Rad/s^2] // Estimated gyroscope bias variance -static const float SIGMA_MAG = 0.7089F; // [uT^2] +static const float SIGMA_MAG = 0.7089F * 10; // [uT^2] // Estimated magnetometer variance -static const float SIGMA_W = 0.000027927F; // [Rad^2] +static const float SIGMA_W = 0.000027927F * 100; // [rad^2] // Estimated gyroscope variance -static const float SIGMA_GPS = 2.0F; // [deg^2] +static const float SIGMA_GPS = 10.0F; // [m^2] // Estimated GPS variance static const float SIGMA_BAR = 4.3665F; // [kPa^2] // Estimated barometer variance static const float SIGMA_POS = - 0.0192F; // [m^2] + 0.0192F * 100; // [m^2] // Estimated variance of the position noise static const float SIGMA_VEL = - 0.096F; // [(m/s)^2] + 0.096F * 100; // [(m/s)^2] // Estimated variance of the velocity noise static const float P_POS = 0.01F; // Position prediction covariance @@ -128,7 +128,7 @@ static const float EMF = 46.77F; // [uT] micro Tesla // check if there's magnetic jamming static const Vector3f NED_MAG( - 0.5248, 0.0356, 0.8505); // Normalized magnetic field vector at Roccaraso + 0.524848, 0.035602, 0.850451); // Normalized magnetic field vector at Roccaraso #endif // normalized magentic field at Milano diff --git a/src/boards/DeathStack/configs/SensorsConfig.h b/src/boards/DeathStack/configs/SensorsConfig.h index d3e7721e72de2fb68872c683c26bf94906782bc7..f8135dcb9fd56dd86f0f93c5ea6bfa8a66a05435 100644 --- a/src/boards/DeathStack/configs/SensorsConfig.h +++ b/src/boards/DeathStack/configs/SensorsConfig.h @@ -81,6 +81,8 @@ static constexpr unsigned int SAMPLE_PERIOD_PRESS_DPL = static constexpr unsigned int SAMPLE_PERIOD_PRESS_STATIC = SAMPLE_PERIOD_ADC_ADS1118 * 4; +static constexpr unsigned int PRESS_PITOT_CALIB_SAMPLES_NUM = 500; + static constexpr BMX160Config::AccelerometerRange IMU_BMX_ACC_FULLSCALE_ENUM = BMX160Config::AccelerometerRange::G_16; static constexpr BMX160Config::GyroscopeRange IMU_BMX_GYRO_FULLSCALE_ENUM =