From 7aeed8dbcd219a4621d7ac40e2af81f24be93af0 Mon Sep 17 00:00:00 2001 From: Om Kotwal Date: Thu, 30 Oct 2025 19:15:56 -0500 Subject: [PATCH 1/2] Added the minimum time to wait before transitioning from BURNOUT back to FIRST_BOOST --- MIDAS/src/finite-state-machines/fsm.cpp | 2 +- MIDAS/src/finite-state-machines/thresholds.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MIDAS/src/finite-state-machines/fsm.cpp b/MIDAS/src/finite-state-machines/fsm.cpp index d76a29fe..96887d2f 100644 --- a/MIDAS/src/finite-state-machines/fsm.cpp +++ b/MIDAS/src/finite-state-machines/fsm.cpp @@ -168,7 +168,7 @@ FSMState FSM::tick_fsm(FSMState& state, StateEstimate state_estimate, CommandFla case FSMState::STATE_BURNOUT: // if low acceleration is too brief than go on to the previous state - if ((state_estimate.acceleration >= sustainer_coast_detection_acceleration_threshold) && ((current_time - burnout_time) < sustainer_coast_time)) { + if ((state_estimate.acceleration >= sustainer_coast_detection_acceleration_threshold) && ((current_time - burnout_time) < sustainer_coast_time && ((current_time - burnout_time) > minimum_time_for_burnout_to_first_boost))) { state = FSMState::STATE_FIRST_BOOST; break; } diff --git a/MIDAS/src/finite-state-machines/thresholds.h b/MIDAS/src/finite-state-machines/thresholds.h index 4334fbea..06176b9b 100644 --- a/MIDAS/src/finite-state-machines/thresholds.h +++ b/MIDAS/src/finite-state-machines/thresholds.h @@ -238,4 +238,8 @@ // The minimum expected jerk for a main deployment event (m/s^3) // (Core Setting) -#define booster_main_jerk_threshold 300 \ No newline at end of file +#define booster_main_jerk_threshold 300 + +// Time to wait before deciding to go from BURNOUT to FIRST_BOOST. (ms) + +#define minimum_time_for_burnout_to_first_boost 250 \ No newline at end of file From 116f522dc67b29be48607ebcce86d156ef9ce046 Mon Sep 17 00:00:00 2001 From: Om Kotwal Date: Mon, 3 Nov 2025 15:56:09 -0600 Subject: [PATCH 2/2] Changed the naming convention to sustainer_burnout_to_first_boost_time_threshold --- MIDAS/src/finite-state-machines/fsm.cpp | 2 +- MIDAS/src/finite-state-machines/thresholds.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/MIDAS/src/finite-state-machines/fsm.cpp b/MIDAS/src/finite-state-machines/fsm.cpp index 96887d2f..de111a77 100644 --- a/MIDAS/src/finite-state-machines/fsm.cpp +++ b/MIDAS/src/finite-state-machines/fsm.cpp @@ -154,7 +154,7 @@ FSMState FSM::tick_fsm(FSMState& state, StateEstimate state_estimate, CommandFla case FSMState::STATE_FIRST_BOOST: // if acceleration spike was too brief then go back to idle - if ((state_estimate.acceleration < sustainer_idle_to_first_boost_acceleration_threshold) && ((current_time - launch_time) < sustainer_idle_to_first_boost_time_threshold)) { + if ((state_estimate.acceleration < sustainer_idle_to_first_boost_acceleration_threshold) && ((current_time - launch_time) < sustainer_burnout_to_first_boost_time_threshold)) { state = FSMState::STATE_IDLE; break; } diff --git a/MIDAS/src/finite-state-machines/thresholds.h b/MIDAS/src/finite-state-machines/thresholds.h index 06176b9b..1b887e0b 100644 --- a/MIDAS/src/finite-state-machines/thresholds.h +++ b/MIDAS/src/finite-state-machines/thresholds.h @@ -240,6 +240,5 @@ // (Core Setting) #define booster_main_jerk_threshold 300 -// Time to wait before deciding to go from BURNOUT to FIRST_BOOST. (ms) - -#define minimum_time_for_burnout_to_first_boost 250 \ No newline at end of file +// Minimum time to wait before deciding to go from BURNOUT to FIRST_BOOST. (ms) +#define sustainer_burnout_to_first_boost_time_threshold 250 \ No newline at end of file