BUG: Fix hard-coded radius value for parachute added mass calculation#936
Closed
Gui-FernandesBR wants to merge 6 commits intocopilot/remove-hard-coded-radius-valuefrom
Closed
BUG: Fix hard-coded radius value for parachute added mass calculation#936Gui-FernandesBR wants to merge 6 commits intocopilot/remove-hard-coded-radius-valuefrom
Gui-FernandesBR wants to merge 6 commits intocopilot/remove-hard-coded-radius-valuefrom
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>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Changed the default radius from 1.5 to None in the add_parachute method to match the Parachute class behavior. This ensures consistent automatic radius calculation from cd_s across both APIs. Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
…uce drag_coefficient parameter for radius estimation
…n Parachute.__init__ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## copilot/remove-hard-coded-radius-value #936 +/- ##
=========================================================================
Coverage ? 81.12%
=========================================================================
Files ? 107
Lines ? 13839
Branches ? 0
=========================================================================
Hits ? 11227
Misses ? 2612
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0.065 m) used in parachute added-mass calculations and replaces it with a physically meaningful estimate derived from the parachute'scd_sdrag_coefficientparameter toParachute.__init__(default1.4for hemispherical canopies per NASA SP-8066), allowing users to control the radius estimation:radius = sqrt(cd_s / (drag_coefficient * pi))Rocket.add_parachuteto passradius=Noneby default for consistencyNonedefaults and parameter descriptions_initialize_noise_attributes()to resolve a pylinttoo-many-statementswarningTest plan
tests/unit/rocket/test_parachute.py)drag_coefficientand radius estimation passtests/unit/simulation/test_monte_carlo.py)pylint rocketpy/rocket/parachute.pyscores 10.00/10🤖 Generated with Claude Code