[![Documentation Status](https://readthedocs.org/projects/rocketpyalpha/badge/?version=latest)](https://rocketpyalpha.readthedocs.io/en/latest/?badge=latest)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/giovaniceotto/rocketpy/blob/master/docs/notebooks/getting_started_colab.ipynb)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/giovaniceotto/RocketPy/master?filepath=docs%2Fnotebooks%2Fgetting_started.ipynb)
[![Downloads](https://pepy.tech/badge/rocketpyalpha)](https://pepy.tech/project/rocketpyalpha)
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
# RocketPy
RocketPy is a trajectory simulation for High-Power Rocketry built by [Projeto Jupiter](https://www.facebook.com/ProjetoJupiter/). 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 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.
### Main features
<details>
<summary>Nonlinear 6 degrees of freedom simulations</summary>
<ul>
<li>Rigorous treatment of mass variation effects</li>
<li>Solved using LSODA with adjustable error tolerances</li>
<li>Highly optimized to run fast</li>
</ul>
</details>
<details>
<summary>Accurate weather modeling</summary>
<ul>
<li>International Standard Atmosphere (1976)</li>
<li>Custom atmospheric profiles</li>
<li>Soundings (Wyoming, NOAARuc)</li>
<li>Weather forecasts and reanalysis</li>
<li>Weather ensembles</li>
</ul>
</details>
<details>
<summary>Aerodynamic models</summary>
<ul>
<li>Barrowman equations for lift coefficients (optional)</li>
<li>Drag coefficients can be easily imported from other sources (e.g. CFD simulations)</li>
</ul>
</details>
<details>
<summary>Parachutes with external trigger functions</summary>
<ul>
<li>Test the exact code that will fly</li>
<li>Sensor data can be augmented with noise</li>
</ul>
</details>
<details>
<summary>Solid motors models</summary>
<ul>
<li>Burn rate and mass variation properties from thrust curve</li>
<li>CSV and ENG file support</li>
</ul>
</details>
<details>
<summary>Monte Carlo simulations</summary>
<ul>
<li>Dispersion analysis</li>
<li>Global sensitivity analysis</li>
</ul>
</details>
<details>
<summary>Flexible and modular</summary>
<ul>
<li>Straightforward engineering analysis (e.g. apogee and lifting off speed as a function of mass)</li>
<li>Non-standard flights (e.g. parachute drop test from helicopter)</li>
<li>Multi-stage rockets</li>
<li>Custom continuous and discrete control laws</li>
<li>Create new classes (e.g. other types of motors)</li>
</ul>
</details>
### Documentation
Check out documentation details using the links below:
- [User Guide](https://rocketpyalpha.readthedocs.io/en/latest/user/index.html)
- [Code Documentation](https://rocketpyalpha.readthedocs.io/en/latest/reference/index.html)
- [Development Guide](https://rocketpyalpha.readthedocs.io/en/latest/development/index.html)
## Join Our Community!
RocketPy is growing fast! Many unviersity groups and rocket hobbyist 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](https://discord.gg/b6xYnNh) server today!
## Previewing
You can preview RocketPy's main functionalities by browsing through a sample notebook either in [Google Colab](https://colab.research.google.com/github/giovaniceotto/rocketpy/blob/master/docs/notebooks/getting_started_colab.ipynb) or in [MyBinder](https://mybinder.org/v2/gh/giovaniceotto/RocketPy/master?filepath=docs%2Fnotebooks%2Fgetting_started.ipynb)!
Then, you can read the *Getting Started* section to get your own copy!
## Getting Started
These instructions will get you a copy of RocketPy up and running on your local machine.
### Prerequisites
The following is needed in order to run RocketPy:
- Python >= 3.0
- Numpy >= 1.0
- Scipy >= 1.0
- Matplotlib >= 3.0
- requests
- netCDF4 >= 1.4 (optional, requires Cython)
All of these packages, with the exception of netCDF4, should be automatically
installed when RocketPy is installed using either pip or conda.
However, in case the user wants to install these packages manually, they can do
so by following the instructions bellow:
The first 4 prerequisites come with Anaconda, but Scipy might need
updating. The nedCDF4 package can be installed if there is interest in
importing weather data from netCDF files. To update Scipy and install
netCDF4 using Conda, the following code is used:
```
$ conda install "scipy>=1.0"
$ conda install -c anaconda "netcdf4>=1.4"
```
Alternatively, if you only have Python 3.X installed, the packages needed can be installed using pip:
```
$ pip install "numpy>=1.0"
$ pip install "scipy>=1.0"
$ pip install "matplotlib>=3.0"
$ pip install "netCDF4>=1.4"
$ pip install "requests"
```
Although [Jupyter Notebooks](http://jupyter.org/) are by no means required to run RocketPy, they are strongly recommend. They already come with Anaconda builds, but can also be installed separately using pip:
```
$ pip install jupyter
```
### Installation
To get a copy of RocketPy using pip, just run:
```
$ pip install rocketpy
```
Alternatively, the package can also be installed using conda:
```
$ conda install -c conda-forge rocketpy
```
If you want to downloaded it from source, you may do so either by:
- Downloading it from [RocketPy's GitHub](https://github.com/giovaniceotto/RocketPy) page
- Unzip the folder and you are ready to go
- Or cloning it to a desired directory using git:
- ```$ git clone https://github.com/giovaniceotto/RocketPy.git```
The RockeyPy library can then be installed by running:
```
$ python setup.py install
```
### Documentations
You can find RocketPy's documentation at [Read the Docs](https://rocketpyalpha.readthedocs.io/en/latest/).
### 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 **_nbks_** folder. Open **_Getting Started - Examples.ipynb_** and you are ready to go.
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.
- SolidMotor - Keeps data related to solid motors. Hybrid motor support is coming in the next weeks.
- Rocket - Keeps data related to a rocket.
- Flight - Runs the simulation and keeps the results.
A typical workflow starts with importing these classes from RocketPy:
```python
from rocketpy import Environment, Rocket, SolidMotor, Flight
```
Then create an Environment object. To learn more about it, you can use:
```python
help(Environment)
```
A sample code is:
```python
Env = Environment(
railLength=5.2,
latitude=32.990254,
longitude=-106.974998,
elevation=1400,
date=(2020, 3, 4, 12) # 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(
thrustSource="../data/motors/Cesaroni_M1670.eng",
burnOut=3.9,
grainNumber=5,
grainSeparation=5/1000,
grain
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共16个文件
py:7个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:rocket.py-1.0.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源详情
资源评论
资源推荐
收起资源包目录
rocket.py-1.0.0.tar.gz (16个子文件)
rocket.py-1.0.0
PKG-INFO 14KB
LICENSE 1KB
setup.cfg 38B
rocket.py.egg-info
PKG-INFO 14KB
requires.txt 47B
SOURCES.txt 317B
top_level.txt 9B
dependency_links.txt 1B
setup.py 850B
README.md 11KB
rocketpy
Function.py 86KB
Rocket.py 39KB
Flight.py 147KB
SolidMotor.py 29KB
__init__.py 1KB
Environment.py 140KB
共 16 条
- 1
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0