Skip to content

Documentation - #222

Open
MuhammadAli8209 wants to merge 24 commits into
mainfrom
Documentation
Open

Documentation#222
MuhammadAli8209 wants to merge 24 commits into
mainfrom
Documentation

Conversation

@MuhammadAli8209

Copy link
Copy Markdown
Contributor

Documentation for the MIDAS folder

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

FSM SILSIM: 6/6 passed ✓ — plots

@mpkarpov-ui mpkarpov-ui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you guys for taking on this effort! I think it's been a while since we've had a documentation pass over the system.

That being said, I think there's some work to be done on keeping comments terse-- Code should be self-documenting. I also noticed a few things that confused me so I'm adding some comments to the review.

Comment on lines +28 to +31
// Check minimum horizontal velocity if enabled.
if (vx_min != -1 && cur_vx < vx_min) { return false; }

// Check maximum horizontal velocity if enabled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vx refers to the x-coordinate in GNC space which is actually vertical velocity

Comment on lines +40 to 44
/// Minimum allowable horizontal velocity.
float vx_min;

/// Maximum allowable horizontal velocity.
float vx_max;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above, vx = vertical velocity

* @param cur_tilt Current vehicle tilt.
* @param cur_motor Current motor count or stage.
* @param cur_time_since_launch Time since launch in seconds.
* @param cur_vx Current horizontal velocity.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

Comment thread MIDAS/src/flight-systems/sensor_data.h
Comment thread MIDAS/src/flight-systems/sensor_data.h
// any number of leading slashes is tolerated.
/**
* @brief Helper evaluation block verifying if a given directory file targets the live logging output metrics stream.
* @param arg Active flight vehicle operational class instances.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this comment??

Comment on lines +645 to +650
/**
* @brief Safety sweep utility targeting deletion tasks spanning passive log file fragments across media partitions.
* @details Retains and isolates the currently running data structure files to guard active recording sessions.
* @param arg Hardware telemetry core coordination state machine structures.
* @return true On clean execution sweeps; false if hardware blockades disrupt operations.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genuinely what are these comments

Comment on lines +678 to +679
* @brief Packages and streams unified high-fidelity launch session artifacts down telemetry pipelines.
* @details Interleaves structure elements, system metadata tracking logs, and direct checksum validation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

????????????

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reconsider all of these

Comment on lines 67 to 76
void Telemetry::transmit(RocketData& rocket_data, const MIDASEEPROM& eeprom, LEDController& led) {
// static_assert(sizeof(TelemetryPacket) == 20);

// Build the packed structured data frame
TelemetryPacket packet = makePacket(rocket_data, eeprom);
// Provide visual indication of data frame transmission
led.toggle(LED::BLUE);

// Hand over the payload to the specific RF transceiver driver
backend.send(packet);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these comments seem overly verbose

@tjmcmanamen38 tjmcmanamen38 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks everyone for all the work on this!

I'll largely echo Michael's feedback - just more or less there's some places where comments seem to be trying to describe too much and other places where I think they're trying to oversimplify things a bit much.

Also apologies if I'm mistaken on this but a few of these comments are giving me a bit of an AI vibe which to be completely frank I'm not a huge fan of for Spaceshot work in general and definitely documentation.

Overall a lot of my stuff is just nitpicking lol (as you know I can be quite the nitpicker) so up to you how much you want to change but I would encourage reviewing everything a bit more and making some refinements. And I know Michael and I are always happy to give feedback and please please please reach out to us if you need any help with stuff cause ultimately we're the people most familiar with this codebase and want to make sure that you all understand it too ❤️



bool FSMPyroAction::conditions_met(FSMState fsm_state, float cur_tilt, uint8_t cur_motor, float cur_time_since_launch, float cur_vx) const {
// Pyro must be enabled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo most comments in this function are fairly unnecessary since the if statements are pretty self explanatory

Comment on lines +217 to +225

/**
* ============================================================
* SAFE STATE
* ============================================================
*
* The vehicle is fully disarmed. The only permitted transitions
* are into PYRO_TEST mode or ARMED mode through explicit commands.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the detail with these but I don't think we need to dedicate so many lines to this, just makes it harder to find the actual code between all the comments so id suggest at minimum removing all the =========. I also think its useful to not remove the detail from the comments in this function about where the commands are coming from (wirelessly in this case)

case FSMState::STATE_PYRO_TEST:

// Force transtion to safe if requested + clear all transition flags.
// Immediately return to SAFE if requested.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just removing detail imo

case FSMState::STATE_ARMED:

// Force transtion to safe if requested + clear all transition flags.
// Allow immediate disarm if commanded.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see previous

Comment on lines -206 to +302
commands.FSM_should_set_cam_feed_cam1 = true; // Set camera to side cam
cur_state_lockin = false; // Reset "state lock in" flag for boost detect
launch_time = current_time; // Record launch time.
time_entered_cur_state = current_time; // Record BOOST entry time.
commands.FSM_should_set_cam_feed_cam1 = true; // Switch camera feed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch camera feed removes detail. what is cam1?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file should be deleted (autogenerated on build)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally I see EEPROM as very distinct from logging and feels weird to categorize them in the same folder (configuration data vs flight data more or less)

}

/**
* @brief Router terminal handle processing sub-demands targeted toward flight profiling rules.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry this wording just feels really unintuitive

Comment thread MIDAS/README.md Outdated
Comment on lines +134 to +144
# Running SILSIM

To build and execute the Software-In-The-Loop simulator:

```bash
pio run -e mcu_silsim
```

SILSIM allows flight code to be tested without physical hardware.

> More documentation describing simulation inputs, outputs, and workflows will be added later.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

silsim is insanely outdated and does not do anything with the current midas software so I don't think its useful to document how to run it until we having a working version in this repo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment thread MIDAS/README.md Outdated
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.

6 participants