|
11 | 11 | // SECOND STAGE THRESHOLDS |
12 | 12 | // ---------------------------------- |
13 | 13 |
|
14 | | -// Transition to FIRST_BOOST if acceleration is greater than this |
| 14 | +// Regardless of sensor inputs, stay on pyro firing states for at LEAST this time. (ms) |
| 15 | +#define sustainer_pyro_firing_time_minimum 200 |
| 16 | + |
| 17 | +// Transition to FIRST_BOOST if acceleration is greater than this (G) |
15 | 18 | #define sustainer_idle_to_first_boost_acceleration_threshold 3 |
16 | 19 |
|
17 | 20 | // Return state to IDLE if not boosting for this amount of time (ms) |
18 | 21 | #define sustainer_idle_to_first_boost_time_threshold 1000 |
19 | 22 |
|
20 | | -// Transition to SECOND_BOOST from SUSTAINER_IGNITION if acceleration greater than this |
21 | | -#define sustainer_ignition_to_second_boost_acceleration_threshold 3 |
| 23 | +// Transition to SECOND_BOOST from SUSTAINER_IGNITION if acceleration greater than this (G) |
| 24 | +#define sustainer_ignition_to_second_boost_acceleration_threshold 4 |
22 | 25 |
|
23 | 26 | // Return state to SECOND_BOOST if not boosting for this amount of time (ms) |
24 | 27 | #define sustainer_second_boost_to_coast_time_threshold 1000 |
25 | 28 |
|
26 | 29 | // Transition to COAST if acceleration is less than this value (g) |
27 | 30 | #define sustainer_coast_detection_acceleration_threshold 0.2 |
28 | 31 |
|
29 | | -// Reach apogee state when vertical speed is less than or equal to this value |
| 32 | +// Reach apogee state when vertical speed is less than or equal to this value (m/s) |
30 | 33 | #define sustainer_coast_to_apogee_vertical_speed_threshold 15 |
31 | 34 |
|
32 | | -// Revert back to COAST if the vertical speed in apogee is too high (was 0 before which may have caused it keep jumping back to COAST) |
| 35 | +// Revert back to COAST if the vertical speed in apogee is too high (was 0 before which may have caused it keep jumping back to COAST) (m/s) |
33 | 36 | #define sustainer_apogee_backto_coast_vertical_speed_threshold 10 |
34 | 37 |
|
35 | | -// Revert back to COAST if apogee was too brief |
| 38 | +// Revert back to COAST if apogee was too brief (ms) |
36 | 39 | #define sustainer_apogee_check_threshold 1000 |
37 | 40 |
|
38 | | -// Move on to DROGUE_DEPLOT after being in apogee for this amount of time |
| 41 | +// Move on to DROGUE_DEPLOT after being in apogee for this amount of time (ms) |
39 | 42 | #define sustainer_apogee_timer_threshold 1000 |
40 | 43 |
|
41 | | -// Move on to DROGUE after a second of reaching apogee |
| 44 | +// Move on to DROGUE after a second of reaching apogee (ms) |
42 | 45 | #define sustainer_drogue_timer_threshold 3000 |
43 | 46 |
|
44 | | -// Move on to MAIN after passing this amount of time |
| 47 | +// Move on to MAIN after passing this amount of time (ms) |
45 | 48 | #define sustainer_main_to_main_deploy_timer_threshold 3000 |
46 | 49 |
|
47 | | -// Height required to deploy the main parachutes |
48 | | -#define sustainer_main_deploy_altitude_threshold 3000 |
| 50 | +// Height required to deploy the main parachutes (m) |
| 51 | +#define sustainer_main_deploy_altitude_threshold 1006 |
49 | 52 |
|
50 | 53 | // Return to SUSTAINER_IGNITION if not in SECOND_BOOST for this amount of time (ms) |
51 | 54 | #define sustainer_ignition_to_second_boost_time_threshold 1000 |
52 | 55 |
|
53 | | -// Transition straight to coast after a certain amount of time not detecting second stage boost |
| 56 | +// Transition straight to coast after a certain amount of time not detecting second stage boost (ms) |
54 | 57 | #define sustainer_ignition_to_coast_timer_threshold 5000 |
55 | 58 |
|
56 | | -// Revert back to main if the landed was too short |
| 59 | +// Revert back to main if the landed was too short (ms) |
57 | 60 | #define sustainer_landed_timer_threshold 5000 |
58 | 61 |
|
59 | 62 | // Return state to FIRST_BOOST if not in BURNOUT for this amount of time (ms) |
60 | 63 | #define sustainer_first_boost_to_burnout_time_threshold 1000 |
61 | 64 |
|
62 | | -// Transition to LANDED from MAIN if vertical speed is less than this threshold |
63 | | -#define sustainer_landed_vertical_speed_threshold 20 |
| 65 | +// Transition to LANDED from MAIN if vertical speed is less than this threshold (m/s) |
| 66 | +#define sustainer_landed_vertical_speed_threshold 3 |
| 67 | + |
| 68 | +// Lock out further transitions from LANDED after this much time passes in the LANDED state. (ms) |
| 69 | +#define sustainer_landed_time_lockout 60000 |
64 | 70 |
|
65 | | -// Stores a small jerk value |
| 71 | +// Prevent us from inadvertently entering the LANDED state when we're at a low velocity at main deploy. (ms) |
| 72 | +#define sustainer_main_to_landed_lockout 5000 |
| 73 | + |
| 74 | +// Stores a small jerk value (m/s^3) |
66 | 75 | #define sustainer_drogue_jerk_threshold 200 |
67 | 76 |
|
68 | | -// Stores a small jerk value |
| 77 | +// Stores a small jerk value (m/s^3) |
69 | 78 | #define sustainer_main_jerk_threshold 300 |
70 | 79 |
|
71 | 80 |
|
72 | 81 | // ---------------------------------- |
73 | 82 | // FIRST STAGE THRESHOLDS |
74 | 83 | // ---------------------------------- |
75 | 84 |
|
76 | | -// Transition to FIRST_BOOST if acceleration is greater than this |
| 85 | +// Regardless of sensor inputs, stay on pyro firing states for at LEAST this time. (ms) |
| 86 | +#define booster_pyro_firing_time_minimum 200 |
| 87 | + |
| 88 | +// Transition to FIRST_BOOST if acceleration is greater than this (G) |
77 | 89 | #define booster_idle_to_first_boost_acceleration_threshold 3 |
78 | 90 |
|
79 | 91 | // Return state to IDLE if not boosting for this amount of time (ms) |
|
85 | 97 | // Transition to COAST if acceleration is less than this value (g) |
86 | 98 | #define booster_coast_detection_acceleration_threshold 0.2 |
87 | 99 |
|
88 | | -// Reach apogee state when vertical speed is less than or equal to this value |
| 100 | +// Reach apogee state when vertical speed is less than or equal to this value (m/s) |
89 | 101 | #define booster_coast_to_apogee_vertical_speed_threshold 20 |
90 | 102 |
|
91 | | -// Revert back to COAST if apogee was too brief |
| 103 | +// Revert back to COAST if apogee was too brief (ms) |
92 | 104 | #define booster_apogee_check_threshold 1000 |
93 | 105 |
|
94 | | -// Move on to DROGUE_DEPLOT after being in apogee for this amount of time |
| 106 | +// Move on to DROGUE_DEPLOT after being in apogee for this amount of time (ms) |
95 | 107 | #define booster_apogee_timer_threshold 1000 |
96 | 108 |
|
97 | | -// Move on to DROGUE after a second of reaching apogee |
| 109 | +// Move on to DROGUE after a second of reaching apogee (ms) |
98 | 110 | #define booster_drogue_timer_threshold 3000 |
99 | 111 |
|
100 | | -// Move on to MAIN after passing this amount of time |
| 112 | +// Move on to MAIN after passing this amount of time (ms) |
101 | 113 | #define booster_main_to_main_deploy_timer_threshold 3000 |
102 | 114 |
|
103 | | -// Height required to deploy the main parachutes |
104 | | -#define booster_main_deploy_altitude_threshold 3000 |
| 115 | +// Height required to deploy the main parachutes (m) |
| 116 | +// [STARGAZER 1.4] This is a "dontcare" value --> The booster does not have a drogue, we transition immediately to MAIN |
| 117 | +#define booster_main_deploy_altitude_threshold 999999 |
| 118 | + |
105 | 119 | // Return to SUSTAINER_IGNITION if not in SECOND_BOOST for this amount of time (ms) |
106 | 120 | #define booster_ignition_to_second_boost_time_threshold 1000 |
107 | 121 |
|
108 | | -// Transition straight to coast after a certain amount of time not detecting second stage boost |
| 122 | +// Transition straight to coast after a certain amount of time not detecting second stage boost (ms) |
109 | 123 | #define booster_ignition_to_coast_timer_threshold 5000 |
110 | 124 |
|
111 | | -// Revert back to main if the landed was too short |
| 125 | +// Revert back to main if the landed was too short (ms) |
112 | 126 | #define booster_landed_timer_threshold 5000 |
113 | 127 |
|
114 | 128 | // Return state to FIRST_BOOST if not in BURNOUT for this amount of time (ms) |
115 | 129 | #define booster_first_boost_to_burnout_time_threshold 1000 |
116 | 130 |
|
117 | | -// Transition to LANDED from MAIN if vertical speed is less than this threshold |
118 | | -#define booster_landed_vertical_speed_threshold 20 |
| 131 | +// Transition to LANDED from MAIN if vertical speed is less than this threshold (G) |
| 132 | +#define booster_landed_vertical_speed_threshold 4 |
| 133 | + |
| 134 | +// Lock out further transitions from LANDED after this much time passes in the LANDED state. (ms) |
| 135 | +#define booster_landed_time_lockout 60000 |
| 136 | + |
| 137 | +// Prevent us from inadvertently entering the LANDED state when we're at a low velocity at main deploy. (ms) |
| 138 | +#define booster_main_to_landed_lockout 5000 |
119 | 139 |
|
120 | | -// Stores a small jerk value |
| 140 | +// Stores a small jerk value (m/s^3) |
121 | 141 | #define booster_first_separation_jerk_threshold 300 |
122 | 142 |
|
123 | | -// Stores a small jerk value |
| 143 | +// Stores a small jerk value (m/s^3) |
124 | 144 | #define booster_drogue_jerk_threshold 200 |
125 | 145 |
|
126 | | -// Stores a small jerk value |
| 146 | +// Stores a small jerk value (m/s^3) |
127 | 147 | #define booster_main_jerk_threshold 300 |
0 commit comments