-
Notifications
You must be signed in to change notification settings - Fork 0
Added the minimum time to wait before transitioning from BURNOUT back… #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
| } | ||
|
|
@@ -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))) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I disagree with this logic, this will still trigger the back transition to What we're looking for instead is that
t-0: With the current code:
With the logic outlined above, in the same condition
|
||
| state = FSMState::STATE_FIRST_BOOST; | ||
| break; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -238,4 +238,7 @@ | |
|
|
||
| // The minimum expected jerk for a main deployment event (m/s^3) | ||
| // (Core Setting) | ||
| #define booster_main_jerk_threshold 300 | ||
| #define booster_main_jerk_threshold 300 | ||
|
|
||
| // Minimum time to wait before deciding to go from BURNOUT to FIRST_BOOST. (ms) | ||
| #define sustainer_burnout_to_first_boost_time_threshold 250 | ||
|
Comment on lines
+243
to
+244
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment could use some work. Nominally, the rocket should never go BURNOUT -> FIRST_BOOST, so it doesn't necessarily make sense to call it "minimum time to wait before x". A better comment could be "Minimum duration of sustained acceleration before fallback to boost" |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is incorrect, this conditional is a guard against instantaneous (non-sustained) accelerations while the vehicle is on pad (or, in the IDLE state). I believe the logic here is correct as-is before, and this change should likely be reverted.