Skip to content

Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging fix & Log Error Detection & Logging Improvements & Log Introspection & Feather duo updates & Pyro I2C bus contention fixes & ADC fixes & GPS update rate changes & More..#208

Open
mpkarpov-ui wants to merge 95 commits into
mainfrom
feature/programmable-fsm

Conversation

@mpkarpov-ui
Copy link
Copy Markdown
Contributor

@mpkarpov-ui mpkarpov-ui commented Apr 9, 2026

This PR does a lot of things and touches a lot of files, so let's break it down 👯‍♂️

  1. This pull request implements the MIDAS V2 FSM spec, written to improve the parity between MIDAS and many other commercial altimeters. The altimeter of choice for comparison was the Altus Metrum TeleMega.
    • One large part of this change is the introduction of a programmable-at-runtime FSM system, which allows us to reprogram FSM parameters based by communicating over the MIDAS shell interface (3). As a result of the potential gravity of these changes, we have implemented more stringent FV (Formal Verification) controls on system changes as outlined in the spec document.
  2. As a consequence of (1), and in order to improve our team's testing & formal verification capability, we have implemented a new fsm_test build target, which allows for the simulation of MIDAS's FSM and pyro capability in a SIL environment, allowing for better FV of FSM functionality.
    • This tool is now invoked in CI checks of all branches with this code present, and we should do our best to add tests to this system. At the moment, 6 tests are introduced, including launch data from Aether II (6/25), Cassie (3/26), and Sawa III (3/26).
  3. A new shell-like tool has been added for communication between human operators and computers interfacing with MIDAS over the USB interface.
    • The current tool ships basic shell functionality and commands to program and configure the FSM, as mentioned in (1).
  4. In order to better be able to understand the situations that our vehicle undergoes, as well as to improve the speed at which relevant data can be offloaded off of the flight computer, we have implemented a "meta logging" feature, which allows for offloading summary data almost instantly
  5. The meta logging system also handles storing EEPROM data, as well as the format for the logging data.
  6. The feather duo firmware has been updated to reflect the changes above.
    • Including adding information about any errors about EEPROM and logging failures
  7. Sunday, 5/3 saw an inadvertent pyro event due to some I2C bus contention
  8. The ADC register spillover issue ADC Causes I2C Bus Contention #213 has been fixed
  9. The GPS update speed has been increased

Formal verification steps follow...

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

FSM SILSIM: 6/6 passed ✓ — plots

@mpkarpov-ui
Copy link
Copy Markdown
Contributor Author

Adding @divijgarg for approval on GNC file changes -- which involve updating files for parity with the updated FSM states.

@mpkarpov-ui
Copy link
Copy Markdown
Contributor Author

Interpretation of FSM SILSIM Results

aether_nofire

The aether_nofire test is simple and ensures that no pyro events occur if the board is not in a flight state. This is done by setting the state to SAFE and feeding in flight data.

Result: PASS ✅
aether_nofire

cassie_nofire

Identical to the aether_nofire test, but on more recent vehicle data

Result: PASS ✅
cassie_nofire

cassie_nominal

Runs the updated FSM on the Cassie flight data, and ensures that pyros configured for this flight fire at the right times, and no extraneous transitions occur.

Result: PASS ✅
cassie_nominal

sawa3_nominal

Runs functionally the same test as cassie_nominal but on Sawa III flight data and pyro values configured for that flight.

Result: PASS ✅
sawa3_nominal

aether_nominal_sus

Another nominal test like sawa3_nominal and cassie_nominal, but this time on high-altitude, 2-stage data.
⚠️ NOTE: The landing state isn't properly configured in this example, and as such it's currently excluded from testing. As LANDED is not a valid pyro state, this should be acceptable.

Result: PASS ✅
aether_nominal_sus

aether_offnom_boo

This test runs Aether II booster data, which experienced an in-flight avionics failure on ascent. This test checks whether the FSM performs predictably under the same conditions by configuring pyro events to fire as they would on the booster, and ensuring that state transitions occur where expected (and do not trigger early pyros as the TeleMega did in that flight).

Result: PASS ✅
aether_offnom_boo

ekyro1 added 2 commits April 26, 2026 14:41
working on metalogging functions after new fsm did stuff
@mpkarpov-ui mpkarpov-ui changed the title Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging & Log Error Detection & Logging Improvements & More.. Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging fix & Log Error Detection & Logging Improvements & Log Introspection & Feather duo updates & More.. Apr 27, 2026
@mpkarpov-ui mpkarpov-ui changed the title Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging fix & Log Error Detection & Logging Improvements & Log Introspection & Feather duo updates & More.. Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging fix & Log Error Detection & Logging Improvements & Log Introspection & Feather duo updates & HITL & More.. Apr 27, 2026
@mpkarpov-ui mpkarpov-ui changed the title Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging fix & Log Error Detection & Logging Improvements & Log Introspection & Feather duo updates & HITL & More.. Implement MIDAS FSM V2 Specification & Improved MIDAS Interface & Meta Logging fix & Log Error Detection & Logging Improvements & Log Introspection & Feather duo updates & Pyro I2C bus contention fixes & ADC fixes & GPS update rate changes & More.. May 6, 2026
@mpkarpov-ui
Copy link
Copy Markdown
Contributor Author

waiting for merge from #212 #214 #215

@tjmcmanamen38
Copy link
Copy Markdown
Contributor

okayyyyyyyy Michael I guess I can look at those

@mpkarpov-ui
Copy link
Copy Markdown
Contributor Author

this pr does literally everything lol... if we randomly deploy for no reason #notmyfault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants