Skip to content

Commit de682e8

Browse files
authored
Merge branch 'master' into bug/mixed-calendars
2 parents 2cc7c3e + f295465 commit de682e8

File tree

10 files changed

+282
-48
lines changed

10 files changed

+282
-48
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: python
2+
python:
3+
- "3.8"
4+
install:
5+
- make install
6+
- pip install -r requirements_test.txt
7+
8+
before_script:
9+
- make verify-lint
10+
script:
11+
- make test

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
test:
2+
pytest tests -vv
3+
4+
tests:
5+
test
6+
7+
coverage:
8+
pytest --cov=rocketpy tests -vv
9+
10+
install:
11+
python -m pip install --upgrade pip
12+
pip install -r requirements.txt
13+
python setup.py install
14+
15+
verify-lint:
16+
flake8 --select BLK rocketpy
17+
flake8 --select BLK test
18+
19+
lint:
20+
black rocketpy
21+
black tests

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,34 @@
77
# RocketPy
88
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.
99

10+
## Main features
11+
12+
- Nonlinear 6 degrees of freedom simulations
13+
- Solved using LSODA with adjustable error tolerances
14+
- Highly optimized to run fast
15+
- Rigorous treatment of mass variation effects
16+
- Aerodynamic models:
17+
- Barrowman equations for lift coefficients (optional)
18+
- Drag coefficients can be easily imported from other sources (e.g. CFD simulations)
19+
- Parachutes with external trigger functions
20+
- Test the exact code that will fly
21+
- Sensor data can be augmented with noise
22+
- Solid motors models:
23+
- Burn rate and mass variation properties from thrust curve
24+
- Accurate weather modeling
25+
- International Standard Atmosphere (1976)
26+
- Custom atmospheric profiles
27+
- Soundings (Wyoming, NOAARuc)
28+
- Weather forecasts and reanalysis
29+
- Weather ensembles
30+
- Monte Carlo simulations for dispersion and sensitivity analysis
31+
- Flexible and modular
32+
- Straightforward engineering analysis (e.g. apogee and lifting off speed as a function of mass)
33+
- Non-standard flights (e.g. parachute drop test from helicopter)
34+
- Multi-stage rockets
35+
- Custom continuous and discrete control laws
36+
- Create new classes (e.g. other types of motors)
37+
1038
## Join Our Community!
1139
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.
1240

docs/conf.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,26 @@
6767
# relative to this directory. They are copied after the builtin static files,
6868
# so a file named "default.css" will overwrite the builtin "default.css".
6969
html_static_path = ['_static']
70+
html_logo = "static/RocketPy_Logo_Black.svg"
71+
html_theme_options = {
72+
"icon_links": [
73+
{
74+
"name": "GitHub",
75+
"url": "https://github.com/Projeto-Jupiter/RocketPy",
76+
"icon": "fab fa-github-square",
77+
},
78+
{
79+
"name": "LinkedIn",
80+
"url": "https://www.linkedin.com/company/rocketpy/",
81+
"icon": "fab fa-linkedin",
82+
},
83+
],
84+
}
85+
86+
html_sidebars = {
87+
"**": ["search-field.html", "sidebar-nav-bs.html", "sidebar-ethical-ads.html"]
88+
}
89+
html_theme_options = {
90+
"navbar_end": ["navbar-icon-links.html", "search-field.html"]
91+
}
92+

docs/static/RocketPy_Logo_Black.svg

Lines changed: 146 additions & 0 deletions
Loading

requirements_test.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pytest==6.2.4
2+
pytest-coverage
3+
black
4+
flake8-black

rocketpy/Flight.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
__author__ = "Giovani Hidalgo Ceotto"
3+
__author__ = "Giovani Hidalgo Ceotto, João Lemes Gribel Soares"
44
__copyright__ = "Copyright 20XX, Projeto Jupiter"
55
__license__ = "MIT"
66

@@ -85,7 +85,7 @@ class Flight:
8585
calculate them and feed the triggers. Can greatly improve run
8686
time in some cases.
8787
Flight.terminateOnApogee : bool
88-
Wheater to terminate simulation when rocket reaches apogee.
88+
Whether to terminate simulation when rocket reaches apogee.
8989
Flight.solver : scipy.integrate.LSODA
9090
Scipy LSODA integration scheme.
9191
@@ -336,23 +336,23 @@ class Flight:
336336
Direction 3 is in the rocket's body axis and points in the
337337
direction of cylindrical symmetry.
338338
Flight.M1 : Function
339-
Resultant momentum perpendicular to rockets axis due to
339+
Resultant moment (torque) perpendicular to rockets axis due to
340340
aerodynamic forces and excentricity as a function of time.
341341
Units in N*m.
342342
Expressed as a function of time. Can be called or accessed
343343
as array.
344344
Direction 1 is in the rocket's body axis and points perpendicular
345345
to the rocket's axis of cylindrical symmetry.
346346
Flight.M2 : Function
347-
Resultant momentum perpendicular to rockets axis due to
347+
Resultant moment (torque) perpendicular to rockets axis due to
348348
aerodynamic forces and excentricity as a function of time.
349349
Units in N*m.
350350
Expressed as a function of time. Can be called or accessed
351351
as array.
352352
Direction 2 is in the rocket's body axis and points perpendicular
353353
to the rocket's axis of cylindrical symmetry and direction 1.
354354
Flight.M3 : Function
355-
Resultant momentum in rockets axis due to aerodynamic
355+
Resultant moment (torque) in rockets axis due to aerodynamic
356356
forces and excentricity as a function of time. Units in N*m.
357357
Expressed as a function of time. Can be called or accessed
358358
as array.
@@ -461,15 +461,15 @@ class Flight:
461461
Flight.apogeeFreestreamSpeed : float
462462
Freestream speed of the rocket at apogee in m/s.
463463
Flight.MachNumber : Function
464-
Rocket's Mach number defined as it's freestream speed
464+
Rocket's Mach number defined as its freestream speed
465465
devided by the speed of sound at its altitude. Expressed
466466
as a function of time. Can be called or accessed as array.
467467
Flight.maxMachNumber : float
468468
Rocket's maximum Mach number experienced during flight.
469469
Flight.maxMachNumberTime : float
470470
Time at which the rocket experiences the maximum Mach number.
471471
Flight.ReynoldsNumber : Function
472-
Rocket's Reynolds number, using it's diameter as reference
472+
Rocket's Reynolds number, using its diameter as reference
473473
length and freestreamSpeed as reference velocity. Expressed
474474
as a function of time. Can be called or accessed as array.
475475
Flight.maxReynoldsNumber : float
@@ -550,7 +550,7 @@ def __init__(
550550
except for the euler parameters which will be calculated based
551551
on given values of inclination and heading. Default is None.
552552
terminateOnApogee : boolean, optioanal
553-
Wheater to terminate simulation when rocket reaches apogee.
553+
Whether to terminate simulation when rocket reaches apogee.
554554
Default is False.
555555
maxTime : int, float, optional
556556
Maximum time in which to simulate trajectory in seconds.
@@ -688,7 +688,7 @@ def __init__(
688688
headingRad
689689
)
690690

691-
# Create knonw flight phases
691+
# Create known flight phases
692692
self.flightPhases = FlightPhases()
693693
self.flightPhases.addPhase(self.tInitial, self.initialDerivative, clear=False)
694694
self.flightPhases.addPhase(self.maxTime)
@@ -922,7 +922,7 @@ def __init__(
922922
vz1 = self.solution[-1][6]
923923
t1 = self.solution[-1][0]
924924
t_root = -(t1 - t0) * vz0 / (vz1 - vz0) + t0
925-
# Fecth state at t_root
925+
# Fetch state at t_root
926926
interpolator = phase.solver.dense_output()
927927
self.apogeeState = interpolator(t_root)
928928
# Store apogee data
@@ -1552,7 +1552,7 @@ def postProcess(self):
15521552
self.ax, self.ay, self.az = [], [], []
15531553
self.alpha1, self.alpha2, self.alpha3 = [], [], []
15541554
# Go throught each time step and calculate accelerations
1555-
# Get fligth phases
1555+
# Get flight phases
15561556
for phase_index, phase in self.timeIterator(self.flightPhases):
15571557
initTime = phase.t
15581558
finalTime = self.flightPhases[phase_index + 1].t
@@ -1594,7 +1594,7 @@ def postProcess(self):
15941594
)
15951595
self.windVelocityX, self.windVelocityY = [], []
15961596
# Go throught each time step and calculate forces and atmospheric values
1597-
# Get fligth phases
1597+
# Get flight phases
15981598
for phase_index, phase in self.timeIterator(self.flightPhases):
15991599
initTime = phase.t
16001600
finalTime = self.flightPhases[phase_index + 1].t
@@ -1631,7 +1631,7 @@ def postProcess(self):
16311631

16321632
# Process fourth type of output - values calculated from previous outputs
16331633

1634-
# Kinematicss functions and values
1634+
# Kinematics functions and values
16351635
# Velocity Magnitude
16361636
self.speed = (self.vx ** 2 + self.vy ** 2 + self.vz ** 2) ** 0.5
16371637
self.speed.setOutputs("Speed - Velocity Magnitude (m/s)")
@@ -2036,7 +2036,7 @@ def info(self):
20362036
print("Frontal Surface Wind Speed: {:.2f} m/s".format(self.frontalSurfaceWind))
20372037
print("Lateral Surface Wind Speed: {:.2f} m/s".format(self.lateralSurfaceWind))
20382038

2039-
# Print of rail conditions
2039+
# Print out of rail conditions
20402040
print("\n\n Rail Departure State\n")
20412041
print("Rail Departure Time: {:.3f} s".format(self.outOfRailTime))
20422042
print("Rail Departure Velocity: {:.3f} m/s".format(self.outOfRailVelocity))
@@ -2573,7 +2573,7 @@ def plotFlightPathAngleData(self):
25732573
return None
25742574

25752575
def plotAngularKinematicsData(self):
2576-
"""Prints out all Angular veolcity and acceleration graphs available
2576+
"""Prints out all Angular velocity and acceleration graphs available
25772577
about the Flight
25782578
25792579
Parameters
@@ -3190,7 +3190,7 @@ def plotPressureSignals(self):
31903190
has not been added.
31913191
31923192
This function aims to help the engineer to visually check if there
3193-
isn't no anomalies with the Flight Simulation.
3193+
are anomalies with the Flight Simulation.
31943194
31953195
Parameters
31963196
----------

rocketpy/Function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ def comparePlots(
13361336

13371337
# Define all interpolation methods
13381338
def __interpolatePolynomial__(self):
1339-
""""Calculate polynomail coefficients that fit the data exactly."""
1339+
"""Calculate polynomail coefficients that fit the data exactly."""
13401340
# Find the degree of the polynomial interpolation
13411341
degree = self.source.shape[0] - 1
13421342
# Get x and y values for all supplied points.

0 commit comments

Comments
 (0)