|
1 | 1 | Flights simulated with RocketPy |
2 | 2 | =============================== |
3 | 3 |
|
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. |
7 | 10 |
|
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. |
9 | 66 |
|
10 | 67 | .. toctree:: |
11 | | - :maxdepth: 2 |
| 68 | + :maxdepth: 1 |
12 | 69 | :caption: Contents: |
13 | 70 |
|
14 | 71 | bella_lui_flight_sim.ipynb |
|
0 commit comments