Skip to content

Conversation

@FelipeAlmeidaUSP
Copy link

Hey team!

I am submitting this PR as part of my participation on the recruitment process for the RocketPy Library Development Team.

I decided on taking on the following issue: #161

Here, I updated the parachute class to include the "calculate_opening_shock" function to estimate the opening shock force during the rocket's parachute opening. I followed the discussion topics on the github issue and consulted the reference textbook in order to implement my proposed feature.

I created a new test file under the unit test folder to evaluate if my formula was correctly estimating the force related to the parachute opening process, where I implemented the following example from the textbook and compared if the results presented in the code and in the book matched. The test was successful.

image

I also integrated the calculation function into the flight simulations to account for the conditions during the exact moment the parachute is triggered. However, while I was adding a new test to the flight simulations, under the integration folder, to confirm if the integration was being done correctly I was unable to get the test to function properly and the errors resulted in the test's fail.

I spent a few hours debugging but was unable to find the problem, but I included in these files a few # TODO comments highlighting the next steps to complete the proposed feature, including both roadmap changes to improve on the analysis and the fix related to the integration test. I am open to suggestions and corrections in my additions, please feel free to reach out to me!

Thanks for the opportunity to learn new things while helping the tool expand!

@FelipeAlmeidaUSP FelipeAlmeidaUSP requested a review from a team as a code owner December 6, 2025 15:11
@FelipeAlmeidaUSP
Copy link
Author

Hey team!

I kept working on the code and found out that the overshoot loop inside the simulation was ignoring the changes I had made. By implementing the same shock force estimation feature inside the overshoot loop (and to prevent clutter I changed the approach to use a new function instead of copying the same lines as before) the tests begun working as expected.

I ran black across all my files but don't know why linters has failed, still learning this github thing haha!

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.04%. Comparing base (9cf3dd4) to head (0f8f3a6).
⚠️ Report is 24 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/simulation/flight.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #910      +/-   ##
===========================================
+ Coverage    80.27%   81.04%   +0.77%     
===========================================
  Files          104      107       +3     
  Lines        12769    13659     +890     
===========================================
+ Hits         10250    11070     +820     
- Misses        2519     2589      +70     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Gui-FernandesBR Gui-FernandesBR force-pushed the enh/parachute-shock-force branch from 809f8eb to 0f8f3a6 Compare December 8, 2025 10:11
@Gui-FernandesBR
Copy link
Member

Gui-FernandesBR commented Dec 9, 2025

@FelipeAlmeidaUSP please fix git conflicts before our review.

git checkout develop
git pull -p
git checkout your_branch
git rebase -i develop
(solve the conflicts)
git push -f

Also, please fix linters

@Gui-FernandesBR Gui-FernandesBR linked an issue Dec 9, 2025 that may be closed by this pull request
4 tasks
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.

ENH: Implement Parachute Opening Shock Force Estimation

2 participants