Skip to content

Commit

Permalink
Merge branch 'develop' into enh/sim-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
phmbressan committed Nov 8, 2024
2 parents df35937 + b838d53 commit e1a1aa2
Show file tree
Hide file tree
Showing 53 changed files with 2,664 additions and 2,498 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test-pytest-slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
schedule:
- cron: "0 17 * * 5" # at 05:00 PM, only on Friday
timezone: "America/Sao_Paulo"
push:
branches:
- main
paths:
- "**.py"
- ".github/**"
- "pyproject.toml"
- "requirements*"

defaults:
run:
Expand All @@ -15,7 +23,7 @@ jobs:
strategy:
matrix:
fail-fast: false
python-version: [3.9, 3.12]
python-version: [3.9, 3.13]

env:
OS: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, 3.12]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, 3.13]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
Expand Down
42 changes: 33 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,41 @@ Attention: The newest changes should be on top -->
### Added

- ENH: Expansion of Encoders Implementation for Full Flights. [#679](https://github.com/RocketPy-Team/RocketPy/pull/679)
- ENH: Generic Surfaces and Generic Linear Surfaces [#680](https://github.com/RocketPy-Team/RocketPy/pull/680)
- ENH: Free-Form Fins [#694](https://github.com/RocketPy-Team/RocketPy/pull/694)
- ENH: Expand Polation Options for ND Functions. [#691](https://github.com/RocketPy-Team/RocketPy/pull/691)
- ENH: add structural to total mass ratio for motor and rocket [#713](https://github.com/RocketPy-Team/RocketPy/pull/713)

### Changed

-


### Fixed

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

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

### Changed

- REL: v1.6.1 [#708](https://github.com/RocketPy-Team/RocketPy/pull/708)
- DEP: deprecate NOAA's RuC sounding [#706](https://github.com/RocketPy-Team/RocketPy/pull/706)

### Fixed

-
- BUG: Fix Motor Zero Dry Mass Check [#710](https://github.com/RocketPy-Team/RocketPy/pull/710)
- BUG: Fix Environment.max_expected_height for custom atmosphere [#707](https://github.com/RocketPy-Team/RocketPy/pull/707)
- BUG: Initialize _Controller Init Parameters [#703](https://github.com/RocketPy-Team/RocketPy/pull/703)
- BUG: Rail Buttons Not Accepted in Add Surfaces [#701](https://github.com/RocketPy-Team/RocketPy/pull/701)
- BUG: Vector encoding breaks MonteCarlo export. [#704](https://github.com/RocketPy-Team/RocketPy/pull/704)
- BUG: Single Point Functions Can Not Be Defined [#700](https://github.com/RocketPy-Team/RocketPy/pull/700)
- BUG: savetxt Not Accepting lambda Functions [#698](https://github.com/RocketPy-Team/RocketPy/pull/698)

## [v1.6.0] - 2024-09-29

### Added

- REL: v1.6.0 [#697](https://github.com/RocketPy-Team/RocketPy/pull/697)
- ENH: Generic Surfaces and Generic Linear Surfaces [#680](https://github.com/RocketPy-Team/RocketPy/pull/680)
- ENH: Free-Form Fins [#694](https://github.com/RocketPy-Team/RocketPy/pull/694)
- ENH: Expand Polation Options for ND Functions. [#691](https://github.com/RocketPy-Team/RocketPy/pull/691)

## [v1.5.0] - 2024-09-15

Expand All @@ -54,7 +78,7 @@ Attention: The newest changes should be on top -->
- DOC: Halcyon Flight Example [#681](https://github.com/RocketPy-Team/RocketPy/pull/681)
- ENH: Adds GenericMotor.load_from_eng_file() method [#676](https://github.com/RocketPy-Team/RocketPy/pull/676)
- ENH: Introducing local sensitivity analysis [#575](https://github.com/RocketPy-Team/RocketPy/pull/575)
- ENH: Add STFT function to Function class [#620](https://github.com/RocketPy-Team/RocketPy/pull/620)
- ENH: Add STFT function to Function class [#620](https://github.com/RocketPy-Team/RocketPy/pull/620)
- ENH: Rocket Axis Definition [#635](https://github.com/RocketPy-Team/RocketPy/pull/635)

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

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

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

### Changed

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<br>

[![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)
[![PyPI](https://img.shields.io/pypi/v/rocketpy?color=g)](https://pypi.org/project/rocketpy/)
[![Documentation Status](https://readthedocs.org/projects/rocketpyalpha/badge/?version=latest)](https://docs.rocketpy.org/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/rocketpy?color=g)](https://pypi.org/project/rocketpy/)
![Conda Version](https://img.shields.io/conda/v/conda-forge/rocketpy?color=g)
[![codecov](https://codecov.io/gh/RocketPy-Team/RocketPy/graph/badge.svg?token=Ecc3bsHFeP)](https://codecov.io/gh/RocketPy-Team/RocketPy)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Contributors](https://img.shields.io/github/contributors/RocketPy-Team/rocketpy)](https://github.com/RocketPy-Team/RocketPy/graphs/contributors)
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
[![Sponsor RocketPy](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/RocketPy-Team)
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
[![Instagram](https://img.shields.io/badge/Instagram-E4405F?style=flat&logo=instagram&logoColor=white)](https://www.instagram.com/rocketpyteam)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=flat&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/rocketpy)
[![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)

<br>

# RocketPy

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.
Expand All @@ -33,7 +33,7 @@ RocketPy is the next-generation trajectory simulation solution for High-Power Ro

2. **Accurate Weather Modeling**
- Supports International Standard Atmosphere (1976)
- Custom atmospheric profiles and Soundings (Wyoming, NOAARuc)
- Custom atmospheric profiles and Soundings (Wyoming)
- Weather forecasts, reanalysis, and ensembles for realistic scenarios

3. **Aerodynamic Models**
Expand Down Expand Up @@ -80,6 +80,9 @@ Flight data and rocket parameters used in this comparison were kindly provided b
| NDRT launch vehicle | Apogee time (s) | 16.77 | 17.10 | **-1.90 %** |
| NDRT launch vehicle | Maximum velocity (m/s) | 172.86 | 168.95 | **2.31 %** |

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

# Documentation

Check out documentation details using the links below:
Expand Down Expand Up @@ -161,7 +164,7 @@ env = Environment(
latitude=32.990254,
longitude=-106.974998,
elevation=1400,
)
)

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

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

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!

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.
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.

## License

Expand Down
8 changes: 1 addition & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
author = "RocketPy Team"

# The full version, including alpha/beta/rc tags
release = "1.5.0"
release = "1.6.1"


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -123,12 +123,6 @@
"github_url": "https://github.com/RocketPy-Team/RocketPy",
"navbar_end": ["theme-switcher", "navbar-icon-links.html"],
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/RocketPy-Team/RocketPy/",
"icon": "fa-brands fa-square-github",
"type": "fontawesome",
},
{
"name": "LinkedIn",
"url": "https://www.linkedin.com/company/rocketpy/",
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/cavour_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Flight Simulation DATA"
"## Flight Simulation DATA"
]
},
{
Expand Down Expand Up @@ -375,7 +375,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data analysis"
"## Data analysis"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/halcyon_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Flight Simulation Data"
"## Flight Simulation Data"
]
},
{
Expand Down Expand Up @@ -503,7 +503,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data analysis"
"## Data analysis"
]
},
{
Expand Down
67 changes: 62 additions & 5 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,71 @@
Flights simulated with RocketPy
===============================

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

If you want to see your rocket here, please contact the maintainers!
.. jupyter-execute::
:hide-code:

import matplotlib.pyplot as plt

results = {
# "Name (Year)": (simulated, measured) m
# - use 2 decimal places
# - sort by year and then by name
"Valetudo (2019)": (825.39, 860),
"Bella Lui (2020)": (460.50, 458.97),
"NDRT (2020)": (1296.77, 1316.75),
"Prometheus (2022)": (4190.05, 3898.37),
"Cavour (2023)": (2818.90, 2789),
"Juno III (2023)": (3026.05, 3213),
"Halcyon (2023)": (3212.775, 3450),
}

max_apogee = 4500

# Extract data
simulated = [sim for sim, meas in results.values()]
measured = [meas for sim, meas in results.values()]
labels = list(results.keys())

# Create the plot
fig, ax = plt.subplots(figsize=(9, 9))
ax.scatter(simulated, measured)
ax.grid(True, alpha=0.3)

# Add the x = y line
ax.plot([0, max_apogee], [0, max_apogee], linestyle='--', color='black', alpha=0.6)

# Add text labels
for i, label in enumerate(labels):
ax.text(simulated[i], measured[i], label, ha='center', va='bottom', fontsize=8)

# Set titles and labels
ax.set_title("Simulated x Measured Apogee")
ax.set_xlabel("Simulated Apogee (m)")
ax.set_ylabel("Measured Apogee (m)")

# Set aspect ratio to 1:1
ax.set_aspect('equal', adjustable='box')
ax.set_xlim(0, max_apogee)
ax.set_ylim(0, max_apogee)

plt.show()

In the next sections you will find the simulations of the rockets listed above.

.. note::

If you want to see your rocket here, please contact the maintainers! \
We would love to include your rocket in the examples.

.. toctree::
:maxdepth: 2
:maxdepth: 1
:caption: Contents:

bella_lui_flight_sim.ipynb
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +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}
Loading

0 comments on commit e1a1aa2

Please sign in to comment.