Skip to content

Commit 8a1405a

Browse files
authored
Merge branch 'develop' into master
2 parents 0d3cc35 + 793e5f6 commit 8a1405a

37 files changed

+2111
-136
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@
241241
"outerboundaryis",
242242
"overshootable",
243243
"planform",
244+
"pointmassmotor",
244245
"polystyle",
245246
"powerseries",
246247
"Prandtl",

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,20 @@ Attention: The newest changes should be on top -->
3232

3333
### Added
3434

35+
- ENH: Add save functionality to `_MonteCarloPlots.all` method [#848](https://github.com/RocketPy-Team/RocketPy/pull/848)
36+
- ENH: Add persistent caching for ThrustCurve API [#881](https://github.com/RocketPy-Team/RocketPy/pull/881)
37+
- ENH: Compatibility with MERRA-2 atmosphere reanalysis files [#825](https://github.com/RocketPy-Team/RocketPy/pull/825)
38+
- ENH: Enable only radial burning [#815](https://github.com/RocketPy-Team/RocketPy/pull/815)
39+
- ENH: Add thrustcurve api integration to retrieve motor eng data [#870](https://github.com/RocketPy-Team/RocketPy/pull/870)
40+
- ENH: custom warning no motor or aerosurface [#871](https://github.com/RocketPy-Team/RocketPy/pull/871)
41+
3542
### Changed
3643

44+
-
45+
3746
### Fixed
3847

48+
- BUG: Fix parallel Monte Carlo simulation showing incorrect iteration count [#806](https://github.com/RocketPy-Team/RocketPy/pull/806)
3949
- BUG: Fix CSV column header spacing in FlightDataExporter [#864](https://github.com/RocketPy-Team/RocketPy/issues/864)
4050

4151

@@ -73,6 +83,7 @@ Attention: The newest changes should be on top -->
7383
## [v1.10.0] - 2025-05-16
7484

7585
### Added
86+
7687
- ENH: Support for ND arithmetic in Function class. [#810] (https://github.com/RocketPy-Team/RocketPy/pull/810)
7788
- ENH: allow users to provide custom samplers [#803](https://github.com/RocketPy-Team/RocketPy/pull/803)
7889
- ENH: Implement Multivariate Rejection Sampling (MRS) [#738] (https://github.com/RocketPy-Team/RocketPy/pull/738)

docs/user/environment/1-atm-models/reanalysis.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,27 @@ ERA5 data can be downloaded from the
4646
processed by RocketPy. It is recommended that you download only the \
4747
necessary data.
4848

49+
MERRA-2
50+
-------
51+
52+
The Modern-Era Retrospective analysis for Research and Applications, Version 2 (MERRA-2) is a NASA atmospheric reanalysis for the satellite era using the Goddard Earth Observing System, Version 5 (GEOS-5) with its Atmospheric Data Assimilation System (ADAS).
53+
54+
You can download these files from the `NASA GES DISC <https://disc.gsfc.nasa.gov/>`_.
55+
56+
To use MERRA-2 data in RocketPy, you generally need the **Assimilated Meteorological Fields** collection (specifically the 3D Pressure Level data, usually named ``inst3_3d_asm_Np``). Note that MERRA-2 files typically use the ``.nc4`` extension (NetCDF-4), which is fully supported by RocketPy.
57+
58+
You can load these files using the ``dictionary="MERRA2"`` argument:
59+
60+
.. code-block:: python
61+
62+
env.set_atmospheric_model(
63+
type="Reanalysis",
64+
file="MERRA2_400.inst3_3d_asm_Np.20230620.nc4",
65+
dictionary="MERRA2"
66+
)
67+
68+
RocketPy automatically handles the unit conversion for MERRA-2's surface geopotential (energy) to geometric height (meters).
69+
4970

5071
Setting the Environment
5172
^^^^^^^^^^^^^^^^^^^^^^^

docs/user/environment/1-atm-models/standard_atmosphere.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ Other profiles can be derived from it, however, winds are automatically set to
2222

2323
env.plots.atmospheric_model()
2424

25-
.. skip one line with |
26-
|
25+
|
2726
2827
The International Standard Atmosphere can also be reset at any time by using the
2928
:meth:`rocketpy.Environment.set_atmospheric_model` method. For example:

docs/user/first_simulation.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ regarding the launch site:
9090

9191
| This roughly corresponds to the location of Spaceport America, New Mexico.
9292
93+
9394
Next, we need to specify the atmospheric model to be used. In this example,
9495
we will get GFS forecasts data from tomorrow.
9596

@@ -110,6 +111,7 @@ of tomorrow:
110111

111112
| Now we set the atmospheric model to be used:
112113
114+
113115
.. jupyter-execute::
114116

115117
env.set_atmospheric_model(type="Forecast", file="GFS")
@@ -189,6 +191,7 @@ to specify several parameters:
189191

190192
| We can see its characteristics by calling the info method:
191193
194+
192195
.. jupyter-execute::
193196

194197
Pro75M1670.info()
@@ -637,8 +640,9 @@ and the rocket Mach number (see :meth:`rocketpy.Flight.mach_number`) to the file
637640
)
638641

639642
| As you can see, the first argument is the file name to be created. The following
640-
arguments are the attributes to be exported. We can check the file by reading it
641-
with :func:`pandas.read_csv`:
643+
arguments are the attributes to be exported. We can check the file by reading it
644+
with :func:`pandas.read_csv`:
645+
642646

643647
.. jupyter-execute::
644648

@@ -647,8 +651,9 @@ with :func:`pandas.read_csv`:
647651
pd.read_csv("calisto_flight_data.csv")
648652

649653
| The file header specifies the meaning of each column. The time samples are
650-
obtained from the simulation solver steps. To export the data at a different
651-
sampling rate, use the ``time_step`` argument:
654+
obtained from the simulation solver steps. To export the data at a different
655+
sampling rate, use the ``time_step`` argument:
656+
652657

653658
.. jupyter-execute::
654659

docs/user/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ RocketPy's User Guide
77

88
Installation and Requirements <installation.rst>
99
First Simulation <first_simulation.rst>
10+
3-DOF Simulations <three_dof_simulation.rst>
1011

1112
.. toctree::
1213
:maxdepth: 1
13-
:caption: Main Classes Usage
14+
:caption: Main Classes Usage
1415

1516
Positions and Coordinate Systems <positions.rst>
1617
Motors <motors/motors.rst>

docs/user/motors/genericmotor.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,53 @@ note that the user can still provide the parameters manually if needed.
106106
The ``load_from_eng_file`` method is a very useful tool for simulating motors \
107107
when the user does not have all the information required to build a ``SolidMotor`` yet.
108108

109+
The ``load_from_thrustcurve_api`` method
110+
----------------------------------------
111+
112+
The ``GenericMotor`` class provides a convenience loader that downloads an
113+
`.eng` file from the ThrustCurve.org public API and builds a ``GenericMotor``
114+
instance from it. This is useful when you know a motor designation (for example
115+
``"M1670"``) but do not want to manually download and save the `.eng` file.
116+
117+
The method also includes automatic caching for faster repeated usage.
118+
Downloaded `.eng` files are stored in the user's RocketPy cache folder
119+
(``~/.rocketpy_cache``). When a subsequent request is made for the same motor,
120+
the cached copy is used instead of performing another network request.
121+
122+
You can bypass the cache by setting ``no_cache=True``:
123+
124+
- ``no_cache=False`` (default):
125+
Use a cached file if available; otherwise download and store it.
126+
127+
- ``no_cache=True``:
128+
Always fetch a fresh version from the API and overwrite the cache.
129+
130+
.. note::
131+
132+
This method performs network requests to the ThrustCurve API unless a cached
133+
version exists. For automated testing or fully reproducible workflows, prefer
134+
local `.eng` files or set ``no_cache=True`` explicitly.
135+
136+
Example
137+
-------
138+
139+
.. jupyter-execute::
140+
141+
from rocketpy.motors import GenericMotor
142+
143+
# Build a motor by name (requires network access unless cached)
144+
motor = GenericMotor.load_from_thrustcurve_api("M1670")
145+
146+
# Print the motor information
147+
motor.info()
148+
149+
Using the no_cache option
150+
-------------------------
151+
152+
If you want to force RocketPy to ignore the cache and download a fresh copy
153+
every time, use:
154+
155+
.. jupyter-execute::
156+
157+
motor = GenericMotor.load_from_thrustcurve_api("M1670", no_cache=True)
158+
motor.info()

0 commit comments

Comments
 (0)