Skip to content

Conversation

@Marcelo-Vicentini
Copy link

@Marcelo-Vicentini Marcelo-Vicentini commented Dec 8, 2025

Pull request type

Other (please describe): Added example of a 2 stage rocket.

Checklist

Docs have been reviewed and added / updated
Lint (black rocketpy/ tests/) has passed locally

Current behavior

There are no examples of 2 stage rockets available.

New behavior

This PR adds a simple example using the already existent Andromeda rocket.

Key features:

This adds an ipynotebook called two_stage_example.ipynb in the docs/example folder.

Breaking change

No

Additional information

Two stage rocket motor example done as part of the selection process for the RocketPy team of 2026.

I know better multi stage support is planned in RocketPy for the near future. I'm interested in contributing with that. The notebook has a few comments on problems I found during the implementation.

Unfortunately, due to time constraints I had to keep the example simple. I plan on updating it using data from rockets VSB-30 or SS-520.

@Marcelo-Vicentini Marcelo-Vicentini requested a review from a team as a code owner December 8, 2025 02:25
@Marcelo-Vicentini Marcelo-Vicentini changed the title Two stage example. Registration for the team of 2026. ENH: Two stage rocket example. Dec 8, 2025
Copy link
Member

Choose a reason for hiding this comment

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

  1. Could you change colors here? I found it complicated to distinguish
Image

Copy link
Author

Choose a reason for hiding this comment

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

Hi @Gui-FernandesBR. Thank you for the feedback. I'm colorblind and I make bad color choices from time to time. I will change it throughout the week.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

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

Linters not passing... Could you check it please?

Important: Do you want to merge this PR or was it created just for learning purposes?

@Marcelo-Vicentini
Copy link
Author

Linters not passing... Could you check it please?

Important: Do you want to merge this PR or was it created just for learning purposes?

@Gui-FernandesBR
Will check it throughout the week.

I created the PR for two reasons:

  • As part of my registration to the recruitment for the team of 2026.
  • To assess to multi stage capabilities of RocketPy. It was my first time using it so it certainly fits your "learning purpose" description.

About merging this PR, here's two important points:

  1. There are some incosistencies in the example. For example, I used the same mass and inertia properties as the original Andromeda example, which is a single stage vehicle, for the two stages vehicle. So it's phisically inaccurate.

  2. There are some adjustments I did in the example because the code wasn't working properly. I believe those were caused by real bugs, but I didn't have time to investigate. For example I used a rail_length for the second stage flight, which had an initial_solution condition specified. It shouldn't be necessary, but the code won't work without it. I also had to manually update the altitude of the second flight, because it seems the Flight class doesn't automatically update it based on initial_solution

In other words, my engineering judgment is that it's best to fix those two items above first, and then merge a proper example. Correct me if I'm wrong, but there's a plan to implement better multi stage capabilities in the near future, so fixing those small problems would certainly fit.

I also believe I have some papers with trajectory data for VSB 30, SS-520, some NASA examples, that might make up for a better example. I didn't try to use those due to the lack of time for the registration, which ended yesterday.

What do you think? Seems reasonable to me to fix these small things, and use an example from a real rocket, if possible, for the merge. It would be useful during the implementation of better multi stage capabilities too.

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.

2 participants