Skip to content

MNT: store ref_factor on rocket aero surface components (#561) - #1129

Open
thatrandomasiandev wants to merge 1 commit into
RocketPy-Team:developfrom
thatrandomasiandev:mnt/561-ref-factor-components
Open

MNT: store ref_factor on rocket aero surface components (#561)#1129
thatrandomasiandev wants to merge 1 commit into
RocketPy-Team:developfrom
thatrandomasiandev:mnt/561-ref-factor-components

Conversation

@thatrandomasiandev

Copy link
Copy Markdown

Summary

  • Extend Components.component_tuple with ref_factor (default 1.0) and pass it through Components.add, serialization, and call sites that unpacked (component, position).
  • Compute and store ref_factor = (surface.rocket_radius / rocket.radius)**2 when adding aero surfaces; use the stored value in evaluate_center_of_pressure and rocket prints.
  • Add unit tests for Components storage/round-trip and the Rocket add path.

Fixes #561

Test plan

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/unit/rocket/test_components.py tests/unit/rocket/test_rocket.py -q
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/unit/rocket/ tests/unit/test_rail_buttons_bending_moments.py tests/integration/test_sensor.py tests/unit/simulation/test_flight.py -q

@thatrandomasiandev
thatrandomasiandev requested a review from a team as a code owner August 11, 2026 01:38
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.

1 participant