Skip to content

Commit e02c5a7

Browse files
committed
MNT: post merge fixes and linting.
1 parent a5938c5 commit e02c5a7

38 files changed

+2553
-2360
lines changed

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ Attention: The newest changes should be on top -->
3232

3333
### Added
3434

35-
35+
- ENH: add structural to total mass ratio for motor and rocket [#713](https://github.com/RocketPy-Team/RocketPy/pull/713)
3636

3737
### Changed
3838

3939

4040

4141
### Fixed
4242

43+
- BUG: fix export ellipses to kml function [#712](https://github.com/RocketPy-Team/RocketPy/pull/712)
4344

4445
## [v1.6.1] - 2024-10-10
4546

@@ -76,7 +77,7 @@ Attention: The newest changes should be on top -->
7677
- DOC: Halcyon Flight Example [#681](https://github.com/RocketPy-Team/RocketPy/pull/681)
7778
- ENH: Adds GenericMotor.load_from_eng_file() method [#676](https://github.com/RocketPy-Team/RocketPy/pull/676)
7879
- ENH: Introducing local sensitivity analysis [#575](https://github.com/RocketPy-Team/RocketPy/pull/575)
79-
- ENH: Add STFT function to Function class [#620](https://github.com/RocketPy-Team/RocketPy/pull/620)
80+
- ENH: Add STFT function to Function class [#620](https://github.com/RocketPy-Team/RocketPy/pull/620)
8081
- ENH: Rocket Axis Definition [#635](https://github.com/RocketPy-Team/RocketPy/pull/635)
8182
- ENH: Implement optional plot saving [#597](https://github.com/RocketPy-Team/RocketPy/pull/597)
8283

@@ -180,7 +181,7 @@ You can install this version by running `pip install rocketpy==1.3.0`
180181
- MNT: refactor u_dot parachute method [#596](https://github.com/RocketPy-Team/RocketPy/pull/596)
181182
- BLD: Change setup.py to pyproject.toml [#589](https://github.com/RocketPy-Team/RocketPy/pull/589)
182183
- DEP: delete deprecated rocketpy.tools.cached_property [#587](https://github.com/RocketPy-Team/RocketPy/pull/587)
183-
- ENH: Flight simulation speed up [#581](https://github.com/RocketPy-Team/RocketPy/pull/581)
184+
- ENH: Flight simulation speed up [#581](https://github.com/RocketPy-Team/RocketPy/pull/581)
184185
- MNT: Modularize Rocket Draw [#580](https://github.com/RocketPy-Team/RocketPy/pull/580)
185186
- DOC: Improvements of Environment docstring phrasing [#565](https://github.com/RocketPy-Team/RocketPy/pull/565)
186187
- MNT: Refactor flight prints module [#579](https://github.com/RocketPy-Team/RocketPy/pull/579)
@@ -197,7 +198,7 @@ You can install this version by running `pip install rocketpy==1.3.0`
197198
- BUG: Fix minor type hinting problems [#598](https://github.com/RocketPy-Team/RocketPy/pull/598)
198199
- BUG: Optional Dependencies Naming in pyproject.toml. [#592](https://github.com/RocketPy-Team/RocketPy/pull/592)
199200
- BUG: Swap rocket.total_mass.differentiate for motor.total_mass_flow rate [#585](https://github.com/RocketPy-Team/RocketPy/pull/585)
200-
- BUG: export_eng 'Motor' method would not work for liquid motors. [#559](https://github.com/RocketPy-Team/RocketPy/pull/559)
201+
- BUG: export_eng 'Motor' method would not work for liquid motors. [#559](https://github.com/RocketPy-Team/RocketPy/pull/559)
201202

202203
## [v1.2.2] - 2024-03-22
203204

@@ -227,7 +228,7 @@ You can install this version by running `pip install rocketpy==1.2.0`
227228
- DOC: add juno3 flight example [#513](https://github.com/RocketPy-Team/RocketPy/pull/513)
228229
- ENH: add Function.low_pass_filter method [#508](https://github.com/RocketPy-Team/RocketPy/pull/508)
229230
- ENH: Air Brakes [#426](https://github.com/RocketPy-Team/RocketPy/pull/426)
230-
-
231+
-
231232

232233
### Changed
233234

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
<br>
88

99
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RocketPy-Team/rocketpy/blob/master/docs/notebooks/getting_started_colab.ipynb)
10-
[![PyPI](https://img.shields.io/pypi/v/rocketpy?color=g)](https://pypi.org/project/rocketpy/)
1110
[![Documentation Status](https://readthedocs.org/projects/rocketpyalpha/badge/?version=latest)](https://docs.rocketpy.org/en/latest/?badge=latest)
11+
[![PyPI](https://img.shields.io/pypi/v/rocketpy?color=g)](https://pypi.org/project/rocketpy/)
12+
![Conda Version](https://img.shields.io/conda/v/conda-forge/rocketpy?color=g)
1213
[![codecov](https://codecov.io/gh/RocketPy-Team/RocketPy/graph/badge.svg?token=Ecc3bsHFeP)](https://codecov.io/gh/RocketPy-Team/RocketPy)
14+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1315
[![Contributors](https://img.shields.io/github/contributors/RocketPy-Team/rocketpy)](https://github.com/RocketPy-Team/RocketPy/graphs/contributors)
14-
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
1516
[![Sponsor RocketPy](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/RocketPy-Team)
17+
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
1618
[![Instagram](https://img.shields.io/badge/Instagram-E4405F?style=flat&logo=instagram&logoColor=white)](https://www.instagram.com/rocketpyteam)
1719
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=flat&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/rocketpy)
1820
[![DOI](https://img.shields.io/badge/DOI-10.1061%2F%28ASCE%29AS.1943--5525.0001331-blue.svg)](http://dx.doi.org/10.1061/%28ASCE%29AS.1943-5525.0001331)
1921

20-
<br>
21-
2222
# RocketPy
2323

2424
RocketPy is the next-generation trajectory simulation solution for High-Power Rocketry. The code is written as a [Python](http://www.python.org) library and allows for a complete 6 degrees of freedom simulation of a rocket's flight trajectory, including high-fidelity variable mass effects as well as descent under parachutes. Weather conditions, such as wind profiles, can be imported from sophisticated datasets, allowing for realistic scenarios. Furthermore, the implementation facilitates complex simulations, such as multi-stage rockets, design and trajectory optimization and dispersion analysis.
@@ -80,6 +80,9 @@ Flight data and rocket parameters used in this comparison were kindly provided b
8080
| NDRT launch vehicle | Apogee time (s) | 16.77 | 17.10 | **-1.90 %** |
8181
| NDRT launch vehicle | Maximum velocity (m/s) | 172.86 | 168.95 | **2.31 %** |
8282

83+
Over years of development and testing, RocketPy has been validated across an expanding range of flight scenarios.
84+
For more information on these validated flights, visit our [Flight Examples](https://docs.rocketpy.org/en/latest/examples/index.html) page in the documentation.
85+
8386
# Documentation
8487

8588
Check out documentation details using the links below:
@@ -161,7 +164,7 @@ env = Environment(
161164
latitude=32.990254,
162165
longitude=-106.974998,
163166
elevation=1400,
164-
)
167+
)
165168

166169
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
167170

@@ -352,7 +355,7 @@ You can also become a [sponsor](https://github.com/sponsors/RocketPy-Team) and h
352355

353356
If you are actively using RocketPy in one of your projects, reaching out to our core team via [Discord](https://discord.gg/b6xYnNh) and providing feedback can help improve RocketPy a lot!
354357

355-
And if you are interested in going one step further, please read [CONTRIBUTING.md](https://github.com/RocketPy-Team/RocketPy/blob/master/CONTRIBUTING.md) for details on our code of conduct and learn more about how you can contribute to the development of this next-gen trajectory simulation solution for rocketry.
358+
And if you are interested in going one step further, please read the [development documentation](https://docs.rocketpy.org/en/latest/development/index.html) to learn more about how you can contribute to the development of this next-gen trajectory simulation solution for rocketry.
356359

357360
## License
358361

docs/conf.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@
123123
"github_url": "https://github.com/RocketPy-Team/RocketPy",
124124
"navbar_end": ["theme-switcher", "navbar-icon-links.html"],
125125
"icon_links": [
126-
{
127-
"name": "GitHub",
128-
"url": "https://github.com/RocketPy-Team/RocketPy/",
129-
"icon": "fa-brands fa-square-github",
130-
"type": "fontawesome",
131-
},
132126
{
133127
"name": "LinkedIn",
134128
"url": "https://www.linkedin.com/company/rocketpy/",

docs/examples/cavour_flight_sim.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
"cell_type": "markdown",
321321
"metadata": {},
322322
"source": [
323-
"# Flight Simulation DATA"
323+
"## Flight Simulation DATA"
324324
]
325325
},
326326
{
@@ -375,7 +375,7 @@
375375
"cell_type": "markdown",
376376
"metadata": {},
377377
"source": [
378-
"# Data analysis"
378+
"## Data analysis"
379379
]
380380
},
381381
{

docs/examples/halcyon_flight_sim.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@
448448
"cell_type": "markdown",
449449
"metadata": {},
450450
"source": [
451-
"# Flight Simulation Data"
451+
"## Flight Simulation Data"
452452
]
453453
},
454454
{
@@ -503,7 +503,7 @@
503503
"cell_type": "markdown",
504504
"metadata": {},
505505
"source": [
506-
"# Data analysis"
506+
"## Data analysis"
507507
]
508508
},
509509
{

docs/examples/index.rst

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,71 @@
11
Flights simulated with RocketPy
22
===============================
33

4-
Apart from the classical Calisto rocket, which is many times used as a
5-
reference in the getting started tutorial, RocketPy also includes some very
6-
interesting examples of real rockets.
4+
RocketPy has been used to simulate many flights, from small amateur rockets to
5+
large professional ones.
6+
This section contains some of the most interesting
7+
results obtained with RocketPy.
8+
The following plot shows the comparison between the simulated and measured
9+
apogee of some rockets.
710

8-
If you want to see your rocket here, please contact the maintainers!
11+
.. jupyter-execute::
12+
:hide-code:
13+
14+
import matplotlib.pyplot as plt
15+
16+
results = {
17+
# "Name (Year)": (simulated, measured) m
18+
# - use 2 decimal places
19+
# - sort by year and then by name
20+
"Valetudo (2019)": (825.39, 860),
21+
"Bella Lui (2020)": (460.50, 458.97),
22+
"NDRT (2020)": (1296.77, 1316.75),
23+
"Prometheus (2022)": (4190.05, 3898.37),
24+
"Cavour (2023)": (2818.90, 2789),
25+
"Juno III (2023)": (3026.05, 3213),
26+
"Halcyon (2023)": (3212.775, 3450),
27+
}
28+
29+
max_apogee = 4500
30+
31+
# Extract data
32+
simulated = [sim for sim, meas in results.values()]
33+
measured = [meas for sim, meas in results.values()]
34+
labels = list(results.keys())
35+
36+
# Create the plot
37+
fig, ax = plt.subplots(figsize=(9, 9))
38+
ax.scatter(simulated, measured)
39+
ax.grid(True, alpha=0.3)
40+
41+
# Add the x = y line
42+
ax.plot([0, max_apogee], [0, max_apogee], linestyle='--', color='black', alpha=0.6)
43+
44+
# Add text labels
45+
for i, label in enumerate(labels):
46+
ax.text(simulated[i], measured[i], label, ha='center', va='bottom', fontsize=8)
47+
48+
# Set titles and labels
49+
ax.set_title("Simulated x Measured Apogee")
50+
ax.set_xlabel("Simulated Apogee (m)")
51+
ax.set_ylabel("Measured Apogee (m)")
52+
53+
# Set aspect ratio to 1:1
54+
ax.set_aspect('equal', adjustable='box')
55+
ax.set_xlim(0, max_apogee)
56+
ax.set_ylim(0, max_apogee)
57+
58+
plt.show()
59+
60+
In the next sections you will find the simulations of the rockets listed above.
61+
62+
.. note::
63+
64+
If you want to see your rocket here, please contact the maintainers! \
65+
We would love to include your rocket in the examples.
966

1067
.. toctree::
11-
:maxdepth: 2
68+
:maxdepth: 1
1269
:caption: Contents:
1370

1471
bella_lui_flight_sim.ipynb
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"elevation": 113, "gravity": "'Function from R1 to R1 : (height (m)) \u2192 (gravity (m/s\u00b2))'", "latitude": 39.3897, "longitude": -8.288964, "wind_velocity_x_factor": 1.0, "wind_velocity_y_factor": 1.0, "datum": "SIRGAS2000", "timezone": "UTC", "ensemble_member": 12, "radius": 0.0635026504073287, "mass": 15.682085969389227, "I_11_without_motor": 6.321, "I_22_without_motor": 6.338988882158036, "I_33_without_motor": 0.03130204348386302, "I_12_without_motor": 0, "I_13_without_motor": 0, "I_23_without_motor": 0, "power_off_drag": "'Function from R1 to R1 : (Mach Number) \u2192 (Drag Coefficient with Power Off)'", "power_on_drag": "'Function from R1 to R1 : (Mach Number) \u2192 (Drag Coefficient with Power On)'", "power_off_drag_factor": 1.0, "power_on_drag_factor": 1.0, "center_of_mass_without_motor": 0.0, "coordinate_system_orientation": "tail_to_nose", "parachutes": [{"cd_s": 9.964579481480238, "trigger": 800, "sampling_rate": 105, "lag": 1.5400928421750208, "noise": [0, 8.3, 0.5], "name": "Main"}, {"cd_s": 1.053581347292585, "trigger": "apogee", "sampling_rate": 105, "lag": 1.547076677223584, "noise": [0, 8.3, 0.5], "name": "Drogue"}], "motors": [{"thrust_source": [[0, 0], [0.055, 100.0], [0.092, 1500.0], [0.1, 2000.0], [0.15, 2200.0], [0.2, 1800.0], [0.5, 1950.0], [1.0, 2034.0], [1.5, 2000.0], [2.0, 1900.0], [2.5, 1760.0], [2.9, 1700.0], [3.0, 1650.0], [3.3, 530.0], [3.4, 350.0], [3.9, 0.0]], "total_impulse": 6856.354770975974, "burn_start_time": 0, "burn_out_time": 3.9, "dry_mass": 1.815, "dry_I_11": 0.125, "dry_I_22": 0.125, "dry_I_33": 0.002, "dry_I_12": 0, "dry_I_13": 0, "dry_I_23": 0, "nozzle_radius": 0.032730650070270366, "grain_number": 5, "grain_density": 1759.0002074492309, "grain_outer_radius": 0.03242230462181787, "grain_initial_inner_radius": 0.014932033668244029, "grain_initial_height": 0.11986670781368569, "grain_separation": 0.0043804774372666125, "grains_center_of_mass_position": 0.39749334004739806, "center_of_dry_mass_position": 0.317, "nozzle_position": 0.00012776739944301812, "throat_radius": 0.011558987272317063, "interpolate": "linear", "coordinate_system_orientation": "nozzle_to_combustion_chamber", "position": -1.2554668494646906}], "aerodynamic_surfaces": [{"length": 0.5585738309196118, "kind": "vonKarman", "base_radius": 0.0635, "bluffness": 0, "rocket_radius": 0.0635, "name": "Nose Cone", "position": [0, 0, 1.133607250248703]}, {"n": 4, "root_chord": 0.11954751546671595, "tip_chord": 0.05966602935963838, "span": 0.10964031934715668, "rocket_radius": 0.0635, "cant_angle": 0.5, "sweep_length": 0.06, "sweep_angle": null, "airfoil": ["../../../data/calisto/NACA0012-radians.csv", "radians"], "name": "Fins", "position": [0, 0, -1.0514983708842365]}, {"top_radius": 0.06343918078680816, "bottom_radius": 0.04325007199856578, "length": 0.060394317313238605, "rocket_radius": 0.0635, "name": "Tail", "position": [0, 0, [0, 0, -1.194656]]}], "rail_buttons": [{"buttons_distance": 0.6974746622933771, "angular_position": 45, "name": "Rail Buttons", "lower_button_position": -0.6188258915052254, "upper_button_position": 0.07864877078815169}], "rail_length": 5, "inclination": 84.44167248190685, "heading": 54.43860091183173}

0 commit comments

Comments
 (0)