-
-
Notifications
You must be signed in to change notification settings - Fork 4
ENH: new dimensions route to get rocket geometry #71
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: master
Are you sure you want to change the base?
Changes from all commits
64b2ea9
c4ef363
45032d8
bf0c365
6836650
edf06e5
e56e6d4
8d1027e
dc8acf2
7037785
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -82,6 +82,22 @@ def validate_motor_kind(self): | |||||||||||
| ) | ||||||||||||
| return self | ||||||||||||
|
|
||||||||||||
| @model_validator(mode='after') | ||||||||||||
| def validate_dry_inertia_for_kind(self): | ||||||||||||
| # RocketPy's SolidMotor/LiquidMotor/HybridMotor require dry_inertia with no default. | ||||||||||||
| # Only GenericMotor accepts (0, 0, 0). Surface a clear error at the API boundary | ||||||||||||
| # instead of letting RocketPy crash deep in construction. | ||||||||||||
| if self.motor_kind != MotorKinds.GENERIC and self.dry_inertia == ( | ||||||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this validator exists (for future reviewers) RocketPy itself enforces non-zero
# rocketpy/motors/motor.py
inertia = (*dry_inertia, 0, 0, 0) if len(dry_inertia) == 3 else dry_inertia
self.dry_I_11 = inertia[0]
self.dry_I_22 = inertia[1]
self.dry_I_33 = inertia[2]These feed the 6-DOF flight integrator's angular equations of motion. Passing Our
|
||||||||||||
| 0, | ||||||||||||
| 0, | ||||||||||||
| 0, | ||||||||||||
| ): | ||||||||||||
| raise ValueError( | ||||||||||||
| f"dry_inertia is required for {self.motor_kind} motors " | ||||||||||||
| f"and must be explicitly provided (cannot be (0, 0, 0))." | ||||||||||||
| ) | ||||||||||||
| return self | ||||||||||||
|
|
||||||||||||
| @staticmethod | ||||||||||||
| def UPDATED(): | ||||||||||||
| return | ||||||||||||
|
|
||||||||||||
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.
🧩 Analysis chain
🌐 Web query:
latest rocketpy pypi version release notes💡 Result:
Latest RocketPy PyPI version (as of 2026-04-23): 1.12.0, released 2026-03-20. Release notes (RocketPy v1.12.0): - Added: acceptance tests for 3DOF flight simulation based on Bella Lui rocket; background map auto-download functionality to Monte Carlo plots; net thrust addition to 3DOF in flight class; 3DOF lateral motion improvement; multi-dimensional drag coefficient support (Cd as function of M, Re, α); save functionality to _MonteCarloPlots.all; animations for motor propellant mass and tank fluid volumes; rail button bending moments calculation in Flight class; bootstrapping for confidence interval estimation; built-in FlightComparator for validating simulations against external data; persistent caching for ThrustCurve API; axial_acceleration attribute to Flight class; custom warning when no motor or aerosurface; thrustcurve API integration to retrieve motor engine data; compatibility with MERRA-2 atmosphere reanalysis files; enable only radial burning. - Changed: improve multi-variable drag compatibility and regular-grid handling (with related tests/docs); replace if/elif chains with match statement; refactor Flight class to improve time node handling and sensor/controllers. - Fixed: restore Rocket.power_off_drag and Rocket.power_on_drag as Function objects while preserving raw inputs; add explicit timeouts to ThrustCurve API requests; fix hard-coded radius value for parachute added mass calculation; fix documentation build; energy_data plot not working for 3DOF sims; CSV column header spacing in FlightDataExporter; incorrect iteration count in parallel Monte Carlo simulation; missing titles in roll parameter plots for fin sets; duplicate _controllers in Flight.TimeNodes.merge; incorrect Jacobian in only_radial_burn branch of SolidMotor.evaluate_geometry (also plus repeated timeout fix mention). How to check on your machine: - pip install --upgrade rocketpy - python -c "import pkgutil,rocketpy; import importlib.metadata as m; print(m.version('rocketpy'))"
Citations:
🏁 Script executed:
# First, check the current state of requirements.txt cat requirements.txtRepository: RocketPy-Team/Infinity-API
Length of output: 332
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 3063
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 86
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 52
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 84
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 52
🏁 Script executed:
# Check pyproject.toml for rocketpy version specification cat pyproject.tomlRepository: RocketPy-Team/Infinity-API
Length of output: 1773
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 238
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 127
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 176
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 1040
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 186
🏁 Script executed:
Repository: RocketPy-Team/Infinity-API
Length of output: 52
Pin
rocketpyto a known-good version.The service layer relies heavily on RocketPy private APIs (
motor.plots._generate_combustion_chamber,_generate_grains,_generate_positioned_tanks,_generate_nozzle,_generate_motor_region, plusrocket._csys,surface.shape_vec,rocket.aerodynamic_surfaces.sort_by_position,motor._csys, etc. — seesrc/services/motor.pyandsrc/services/rocket.py). Switching from a git-pinneddevelopto an unpinnedrocketpymeans any future PyPI release that refactors these internals will silently break/drawing-geometry(and potentially existing simulation flows) on the next environment rebuild.Pin to the exact version you validated against, and bump deliberately.
🔧 Proposed fix
🤖 Prompt for AI Agents