rocketpy
Next generation High-Power Rocketry 6-DOF Trajectory Simulation
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
3 of 51 committers (5.9%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Keywords
Repository
Next generation High-Power Rocketry 6-DOF Trajectory Simulation
Basic Info
- Host: GitHub
- Owner: RocketPy-Team
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://docs.rocketpy.org/
- Size: 821 MB
Statistics
- Stars: 771
- Watchers: 26
- Forks: 200
- Open Issues: 72
- Releases: 39
Topics
Metadata Files
README.md
RocketPy
RocketPy is the next-generation trajectory simulation solution for High-Power Rocketry. The code is written as a Python 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.
Main features
Nonlinear 6 Degrees of Freedom Simulations
- Rigorous treatment of mass variation effects
- Efficiently solved using LSODA with adjustable error tolerances
- Highly optimized for fast performance
Accurate Weather Modeling
- Supports International Standard Atmosphere (1976)
- Custom atmospheric profiles and Soundings (Wyoming)
- Weather forecasts, reanalysis, and ensembles for realistic scenarios
Aerodynamic Models
- Optional Barrowman equations for lift coefficients
- Easy import of drag coefficients from other sources (e.g., CFD simulations)
Parachutes with External Trigger Functions
- Test the exact code that will fly
- Sensor data augmentation with noise for comprehensive parachute simulations
Solid, Hybrid, and Liquid Motors Models
- Burn rate and mass variation properties from the thrust curve
- Define custom rocket tanks based on flux data
- Support for CSV and ENG file formats
Monte Carlo Simulations
- Conduct dispersion analysis and global sensitivity analysis
Flexible and Modular
- Perform straightforward engineering analysis (e.g., apogee and lift-off speed as a function of mass)
- Handle non-standard flights (e.g., parachute drop test from a helicopter)
- Support multi-stage rockets and custom continuous/discrete control laws
- Easily create new classes, such as other types of motors
Integration with MATLAB
- Effortlessly run RocketPy from MATLAB
- Convert RocketPy results to MATLAB variables for further processing
These powerful features make RocketPy an indispensable tool for high-power rocket trajectory simulation, catering to enthusiasts, researchers, and engineers in the field of rocketry.
Validation
RocketPy's features have been validated in our latest research article published in the Journal of Aerospace Engineering.
The table below shows a comparison between experimental data and the output from RocketPy. Flight data and rocket parameters used in this comparison were kindly provided by EPFL Rocket Team and Notre Dame Rocket Team.
| Mission | Result Parameter | RocketPy | Measured | Relative Error | |:-----------------------:|:-----------------------|:---------:|:---------:|:---------------:| | Bella Lui Kaltbrumn | Apogee altitude (m) | 461.03 | 458.97 | 0.45 % | | Bella Lui Kaltbrumn | Apogee time (s) | 10.61 | 10.56 | 0.47 % | | Bella Lui Kaltbrumn | Maximum velocity (m/s) | 86.18 | 90.00 | -4.24 % | | NDRT launch vehicle | Apogee altitude (m) | 1,310.44 | 1,320.37 | -0.75 % | | 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 page in the documentation.
Documentation
Check out documentation details using the links below:
Join Our Community!
RocketPy is growing fast! Many university groups and rocket hobbyists have already started using it. The number of stars and forks for this repository is skyrocketing. And this is all thanks to a great community of users, engineers, developers, marketing specialists, and everyone interested in helping.
If you want to be a part of this and make RocketPy your own, join our Discord server today!
Previewing
You can preview RocketPy's main functionalities by browsing through a sample notebook in Google Colab. No installation is required!
When you are ready to run RocketPy locally, you can read the Getting Started section!
Getting Started
Quick Installation
To install RocketPy's latest stable version from PyPI, just open up your terminal and run:
shell
pip install rocketpy
For other installation options, visit our Installation Docs. To learn more about RocketPy's requirements, visit our Requirements Docs.
Running Your First Simulation
In order to run your first rocket trajectory simulation using RocketPy, you can start a Jupyter Notebook and navigate to the docs/notebooks folder. Open getting_started.ipynb and you are ready to go. We recommend that you read the First Simulation page to get a complete description.
Otherwise, you may want to create your own script or your own notebook using RocketPy. To do this, let's see how to use RocketPy's four main classes:
Environment- Keeps data related to weather.Motor- Subdivided intoSolidMotor,HybridMotorandLiquidMotor. Keeps data related to rocket motors.Rocket- Keeps data related to a rocket.Flight- Runs the simulation and keeps the results.
The following image shows how the four main classes interact with each other:
A typical workflow starts with importing these classes from RocketPy:
python
from rocketpy import Environment, Rocket, SolidMotor, Flight
An optional step is to import datetime, which is used to define the date of the simulation:
python
import datetime
Then create an Environment object. To learn more about it, you can use:
python
help(Environment)
A sample code is:
```python env = Environment( latitude=32.990254, longitude=-106.974998, elevation=1400, )
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
env.set_date( (tomorrow.year, tomorrow.month, tomorrow.day, 12), timezone="America/Denver" ) # Tomorrow's date in year, month, day, hour UTC format
env.setatmosphericmodel(type='Forecast', file='GFS') ```
This can be followed up by starting a Solid Motor object. To get help on it, just use:
python
help(SolidMotor)
A sample Motor object can be created by the following code:
python
Pro75M1670 = SolidMotor(
thrust_source="data/motors/cesaroni/Cesaroni_M1670.eng",
dry_mass=1.815,
dry_inertia=(0.125, 0.125, 0.002),
center_of_dry_mass_position=0.317,
grains_center_of_mass_position=0.397,
burn_time=3.9,
grain_number=5,
grain_separation=0.005,
grain_density=1815,
grain_outer_radius=0.033,
grain_initial_inner_radius=0.015,
grain_initial_height=0.12,
nozzle_radius=0.033,
throat_radius=0.011,
interpolation_method="linear",
nozzle_position=0,
coordinate_system_orientation="nozzle_to_combustion_chamber",
)
With a Solid Motor defined, you are ready to create your Rocket object. As you may have guessed, to get help on it, use:
python
help(Rocket)
A sample code to create a Rocket is:
```python calisto = Rocket( radius=0.0635, mass=14.426, # without motor inertia=(6.321, 6.321, 0.034), poweroffdrag="data/rockets/calisto/powerOffDragCurve.csv", powerondrag="data/rockets/calisto/powerOnDragCurve.csv", centerofmasswithoutmotor=0, coordinatesystemorientation="tailtonose", )
buttons = calisto.setrailbuttons( upperbuttonposition=0.0818, lowerbuttonposition=-0.6182, angular_position=45, )
calisto.add_motor(Pro75M1670, position=-1.255)
nose = calisto.add_nose( length=0.55829, kind="vonKarman", position=1.278 )
fins = calisto.addtrapezoidalfins( n=4, rootchord=0.120, tipchord=0.040, span=0.100, sweeplength=None, cantangle=0, position=-1.04956, )
tail = calisto.addtail( topradius=0.0635, bottom_radius=0.0435, length=0.060, position=-1.194656 ) ```
You may want to add parachutes to your rocket as well:
```python main = calisto.addparachute( name="main", cds=10.0, trigger=800, # ejection altitude in meters sampling_rate=105, lag=1.5, noise=(0, 8.3, 0.5), )
drogue = calisto.addparachute( name="drogue", cds=1.0, trigger="apogee", # ejection at apogee sampling_rate=105, lag=1.5, noise=(0, 8.3, 0.5), ) ```
Finally, you can create a Flight object to simulate your trajectory. To get help on the Flight class, use:
python
help(Flight)
To actually create a Flight object, use:
python
test_flight = Flight(
rocket=calisto, environment=env, rail_length=5.2, inclination=85, heading=0
)
Once the Flight object is created, your simulation is done! Use the following code to get a summary of the results:
python
test_flight.info()
To see all available results, use:
python
test_flight.all_info()
Here is just a quick taste of what RocketPy is able to calculate. There are hundreds of plots and data points computed by RocketPy to enhance your analyses.
If you want to see the trajectory on Google Earth, RocketPy acn easily export a KML file for you:
python
test_flight.export_kml(file_name="test_flight.kml")

Authors and Contributors
This package was originally created by Giovani Ceotto as part of his work at Projeto Jupiter. Rodrigo Schmitt was one of the first contributors. Later, Guilherme Fernandes and Lucas Azevedo joined the team to work on the expansion and sustainability of this project.
Since then, the RocketPy Team has been growing fast and our contributors are what makes us special!
Institutional Contributors
RocketPy extends its gratitude to the following institutions for their support and contributions:
Individual Contributors
RocketPy is also indebted to a growing list of individual contributors who actively participate in its development. These include:
See a detailed list of contributors who are actively working on RocketPy.
Supporting RocketPy and Contributing
The easiest way to help RocketPy is to demonstrate your support by starring our repository!
You can also become a sponsor and help us financially to keep the project going.
If you are actively using RocketPy in one of your projects, reaching out to our core team via Discord and providing feedback can help improve RocketPy a lot!
And if you are interested in going one step further, please read the development documentation to learn more about how you can contribute to the development of this next-gen trajectory simulation solution for rocketry.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Release Notes
Want to know which bugs have been fixed and the new features of each version? Check out the release notes.
Owner
- Name: RocketPy Team
- Login: RocketPy-Team
- Kind: organization
- Email: rocketpyteam@gmail.com
- Website: rocketpy.org
- Repositories: 6
- Profile: https://github.com/RocketPy-Team
We're focused on RocketPy's development, seeking for a revolution on the way we see rocket trajectory nowadays
GitHub Events
Total
- Create event: 74
- Release event: 5
- Issues event: 65
- Watch event: 126
- Delete event: 64
- Member event: 4
- Issue comment event: 318
- Push event: 367
- Pull request review comment event: 301
- Pull request review event: 424
- Pull request event: 176
- Fork event: 65
Last Year
- Create event: 74
- Release event: 5
- Issues event: 65
- Watch event: 126
- Delete event: 64
- Member event: 4
- Issue comment event: 318
- Push event: 367
- Pull request review comment event: 301
- Pull request review event: 424
- Pull request event: 176
- Fork event: 65
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gui-FernandesBR | g****s@u****r | 1,233 |
| MateusStano | m****o@u****r | 912 |
| Giovani Hidalgo Ceotto | g****o@g****m | 529 |
| Pedro Bressan | p****n@u****r | 355 |
| Lint Action | l****n@s****m | 235 |
| patrick | p****o@u****r | 66 |
| Lucas de Oliveira Prates | l****s@g****m | 63 |
| Lucas | 6****r | 56 |
| FranzYuri | 8****i | 42 |
| Franz Masatoshi Yuri | f****t@g****m | 38 |
| gautam | g****y@b****u | 22 |
| ompro07 | o****a@g****m | 22 |
| MrGribel | j****l@h****m | 16 |
| Bruno Sorban | b****n@u****r | 16 |
| Sofia-ME | s****k@g****m | 15 |
| GabrielBarberini | g****i@s****m | 13 |
| Curtis Hu | 4****u | 12 |
| Lucas Gonçalves | l****s@t****t | 12 |
| julio | j****c@o****m | 11 |
| Lucas Kierulff Balabram | l****m@g****m | 11 |
| Patrick Bales | p****1@b****u | 8 |
| William Armstrong | w****g@m****u | 6 |
| klounis | k****s@i****t | 5 |
| Andre Geldenhuis | a****s | 5 |
| Adriano Augusto Antongiovanni | 7****i | 4 |
| Luiz Mota | l****9@g****m | 4 |
| CabGT | c****s@u****r | 4 |
| Robert | s****k@g****m | 4 |
| rodrigo-schmitt | 7****t | 3 |
| Kevin Alcañiz | k****2@g****m | 3 |
| and 21 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 153
- Total pull requests: 642
- Average time to close issues: 8 months
- Average time to close pull requests: 21 days
- Total issue authors: 42
- Total pull request authors: 41
- Average comments per issue: 1.64
- Average comments per pull request: 2.35
- Merged pull requests: 550
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 38
- Pull requests: 225
- Average time to close issues: 19 days
- Average time to close pull requests: 7 days
- Issue authors: 24
- Pull request authors: 26
- Average comments per issue: 1.08
- Average comments per pull request: 1.8
- Merged pull requests: 179
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Gui-FernandesBR (72)
- giovaniceotto (23)
- MateusStano (6)
- chasgior214 (3)
- phmbressan (3)
- kevin-alcaniz (3)
- Lucas-Prates (3)
- emtee14 (2)
- caioessouza (2)
- lucasfourier (2)
- mclau152 (2)
- brunosorban (2)
- cazzopardi (1)
- AndyBankes (1)
- djangovanderplas (1)
Pull Request Authors
- Gui-FernandesBR (241)
- MateusStano (111)
- phmbressan (91)
- Lucas-Prates (29)
- giovaniceotto (25)
- LUCKIN13 (17)
- lucasfourier (17)
- kevin-alcaniz (10)
- FranzYuri (10)
- juliomachad0 (10)
- GabrielBarberini (9)
- leogrosa (8)
- ArthurJWH (7)
- WilliamArmst (6)
- kalounis (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 1,440 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 55
- Total maintainers: 5
pypi.org: rocketpy
Advanced 6-DOF trajectory simulation for High-Power Rocketry.
- Documentation: https://rocketpy.readthedocs.io/
- License: MIT License
-
Latest release: 1.10.0
published 9 months ago
Rankings
Maintainers (5)
conda-forge.org: rocketpy
RocketPy is a trajectory simulation for High-Power Rocketry built by Projeto Jupiter. The code is written as a Python 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 profile, 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.
- Homepage: https://github.com/RocketPy-Team/RocketPy
- License: MIT
-
Latest release: 0.12.1
published over 3 years ago
Rankings
Dependencies
- bubkoo/auto-assign v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- wearerequired/lint-action v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- m2r2 >=0.2.1
- nbsphinx >=0.8.0
- pydata-sphinx-theme ==0.13.3
- ipywidgets >=7.6.3
- jsonpickle *
- matplotlib >=3.0
- netCDF4 >=1.4,<1.6
- netCDF4 >=1.6.2
- numpy >=1.0
- pytz *
- requests *
- scipy >=1.0
- simplekml *
- timezonefinder *
- windrose >=1.6.8
- black * test
- flake8-black * test
- numericalunits ==1.25 test
- pandas * test
- pytest ==6.2.4 test
- pytest-coverage * test
- ipywidgets >=7.6.3
- jsonpickle *
- matplotlib >=3.0
- netCDF4_requirement ,
- numpy >=1.0
- pytz *
- requests *
- scipy >=1.0
- simplekml *
- windrose >=1.6.8