-
-
Notifications
You must be signed in to change notification settings - Fork 216
Fix hard-coded radius value for parachute added mass calculation #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Calculate radius from cd_s using a typical hemispherical parachute drag coefficient (1.4) when radius is not explicitly provided. This fixes drift distance calculations for smaller parachutes like drogues. Formula: R = sqrt(cd_s / (Cd * π)) Closes #860 Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
|
@copilot remind to add the PR to the CHANGELOG file |
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #889 +/- ##
===========================================
+ Coverage 80.27% 80.35% +0.08%
===========================================
Files 104 106 +2
Lines 12769 13013 +244
===========================================
+ Hits 10250 10457 +207
- Misses 2519 2556 +37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ArthurJWH
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR seems reasonable and correct, although it will introduce breaking changes to current simulations that relies on the previously hard coded radius. If this PR proceeds, I would suggest first changing the add_parachute default radius value for consistency in rocket class.
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
Hard-coded
radius=1.5inParachute.__init__causes incorrect added mass calculations for smaller parachutes. For drogue chutes (cd_s ≈ 1.0), the added mass was overestimated by ~31x, resulting in excessive drift distances.Ref: #860
New behavior
Radius is now computed from
cd_swhen not explicitly provided:Using
HEMISPHERICAL_CD = 1.4(typical hemispherical parachute drag coefficient).Changes:
radiusparameter changed from1.5toNoneHEMISPHERICAL_CDclass constantfrom_dictto handle new defaultExample results:
Users can still explicitly set
radiusto override auto-calculation.Breaking change
Existing code providing explicit
radiusvalues is unaffected. Code relying on the implicit default will now get physically appropriate values based oncd_s.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.