MNT: store ref_factor on rocket aero surface components (#561) - #1129
MNT: store ref_factor on rocket aero surface components (#561)#1129thatrandomasiandev wants to merge 1 commit into
Conversation
ab19b9a to
f881d7e
Compare
f881d7e to
ebe5b8b
Compare
|
This one needs a different approach rather than a rebase. Two compatibility problems, and the first is what is failing CI: 1. It breaks
2. It breaks the public API. A backward-compatible shape would be to keep the 2-tuple iteration contract intact and expose 3. Lint is one self._components.append(self.component_tuple(component, position, ref_factor)) |
Summary
Components.component_tuplewithref_factor(default1.0) and pass it throughComponents.add, serialization, and call sites that unpacked(component, position).ref_factor = (surface.rocket_radius / rocket.radius)**2when adding aero surfaces; use the stored value inevaluate_center_of_pressureand rocket prints.Fixes #561
Test plan
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/unit/rocket/test_components.py tests/unit/rocket/test_rocket.py -qPYTEST_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