-
-
Notifications
You must be signed in to change notification settings - Fork 238
DOC: update README.md with new features of v1.0.0a1. #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,9 +59,10 @@ RocketPy is the next-generation trajectory simulation solution for High-Power Ro | |
| </details> | ||
|
|
||
| <details> | ||
| <summary>Solid motors models</summary> | ||
| <summary>Solid, Hybrid and Liquid motors models</summary> | ||
| <ul> | ||
| <li>Burn rate and mass variation properties from thrust curve</li> | ||
| <li>Define custom rocket tanks based on their flux data</li> | ||
| <li>CSV and ENG file support</li> | ||
| </ul> | ||
| </details> | ||
|
|
@@ -156,12 +157,12 @@ To learn more about RocketPy's requirements, visit our [Requirements Docs](https | |
|
|
||
| ## 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. | ||
| 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. | ||
|
|
||
| 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. | ||
| - Motor - Subdivided into SolidMotor, HybridMotor and LiquidMotor. Keeps data related to rocket motors. | ||
| - Rocket - Keeps data related to a rocket. | ||
| - Flight - Runs the simulation and keeps the results. | ||
|
|
||
|
|
@@ -175,6 +176,12 @@ A typical workflow starts with importing these classes from RocketPy: | |
| 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 | ||
|
|
@@ -188,9 +195,14 @@ env = Environment( | |
| latitude=32.990254, | ||
| longitude=-106.974998, | ||
| elevation=1400, | ||
| date=(2020, 3, 4, 12) # Tomorrow's date in year, month, day, hour UTC format | ||
| ) | ||
|
|
||
| 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.set_atmospheric_model(type='Forecast', file='GFS') | ||
| ``` | ||
|
|
||
|
|
@@ -204,18 +216,23 @@ A sample Motor object can be created by the following code: | |
|
|
||
| ```python | ||
| Pro75M1670 = SolidMotor( | ||
| thrust_source="../data/motors/Cesaroni_M1670.eng", | ||
| thrust_source="data/motors/Cesaroni_M1670.eng", | ||
| dry_mass=1.815, | ||
| dry_inertia=(0.125, 0.125, 0.002), | ||
| center_of_dry_mass=0.317, | ||
| grains_center_of_mass_position=0.397, | ||
| burn_time=3.9, | ||
| grain_number=5, | ||
| grain_separation=5/1000, | ||
| grain_separation=0.005, | ||
| grain_density=1815, | ||
| grain_outer_radius=33/1000, | ||
| grain_initial_inner_radius=15/1000, | ||
| grain_initial_height=120/1000, | ||
| grains_center_of_mass_position=-0.85704, | ||
| nozzle_radius=33/1000, | ||
| throat_radius=11/1000, | ||
| interpolation_method='linear' | ||
| 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", | ||
| ) | ||
| ``` | ||
|
|
||
|
|
@@ -229,65 +246,62 @@ A sample code to create a Rocket is: | |
|
|
||
| ```python | ||
| calisto = Rocket( | ||
| radius=127 / 2000, | ||
| mass=19.197 - 2.956, | ||
| inertia_i=6.60, | ||
| inertia_z=0.0351, | ||
| power_off_drag="../../data/calisto/powerOffDragCurve.csv", | ||
| power_on_drag="../../data/calisto/powerOnDragCurve.csv", | ||
| center_of_dry_mass_position=0, | ||
| coordinate_system_orientation="tail_to_nose" | ||
| radius=0.0635, | ||
| mass=14.426, # without motor | ||
| inertia=(6.321, 6.321, 0.034), | ||
| power_off_drag="data/calisto/powerOffDragCurve.csv", | ||
| power_on_drag="data/calisto/powerOnDragCurve.csv", | ||
| center_of_mass_without_motor=0, | ||
| coordinate_system_orientation="tail_to_nose", | ||
| ) | ||
| calisto.set_rail_buttons(0.2, -0.5) | ||
|
|
||
| buttons = calisto.set_rail_buttons( | ||
| upper_button_position=0.0818, | ||
| lower_button_position=-0.6182, | ||
| angular_position=45, | ||
| ) | ||
|
|
||
| calisto.add_motor(Pro75M1670, position=-1.255) | ||
| calisto.add_nose(length=0.55829, kind="vonKarman", position=1.278) | ||
| calisto.add_trapezoidal_fins( | ||
|
|
||
| nose = calisto.add_nose( | ||
| length=0.55829, kind="vonKarman", position=1.278 | ||
| ) | ||
|
|
||
| fins = calisto.add_trapezoidal_fins( | ||
| n=4, | ||
| root_chord=0.120, | ||
| tip_chord=0.040, | ||
| span=0.100, | ||
| position=-1.04956, | ||
| sweep_length=None, | ||
| cant_angle=0, | ||
| radius=None, | ||
| airfoil=None | ||
| position=-1.04956, | ||
| ) | ||
| calisto.add_tail( | ||
|
|
||
| tail = calisto.add_tail( | ||
| top_radius=0.0635, bottom_radius=0.0435, length=0.060, position=-1.194656 | ||
| ) | ||
| ``` | ||
|
|
||
| You may want to add parachutes to your rocket as well: | ||
|
|
||
| ```python | ||
| def drogue_trigger(p, h, y): | ||
| # p = pressure considering parachute noise signal | ||
| # h = height above ground level considering parachute noise signal | ||
| # y = [x, y, z, vx, vy, vz, e0, e1, e2, e3, w1, w2, w3] | ||
|
|
||
| # activate drogue when vz < 0 m/s. | ||
| return True if y[5] < 0 else False | ||
|
|
||
| def main_trigger(p, h, y): | ||
| # p = pressure considering parachute noise signal | ||
| # h = height above ground level considering parachute noise signal | ||
| # y = [x, y, z, vx, vy, vz, e0, e1, e2, e3, w1, w2, w3] | ||
|
|
||
| # activate main when vz < 0 m/s and z < 800 m | ||
| return True if y[5] < 0 and h < 800 else False | ||
|
|
||
| calisto.add_parachute('Main', | ||
| cd_s=10.0, | ||
| trigger=main_trigger, | ||
| sampling_rate=105, | ||
| lag=1.5, | ||
| noise=(0, 8.3, 0.5)) | ||
|
|
||
| calisto.add_parachute('Drogue', | ||
| cd_s=1.0, | ||
| trigger=drogue_trigger, | ||
| sampling_rate=105, | ||
| lag=1.5, | ||
| noise=(0, 8.3, 0.5)) | ||
| main = calisto.add_parachute( | ||
| name="main", | ||
| cd_s=10.0, | ||
| trigger=800, # ejection altitude in meters | ||
| sampling_rate=105, | ||
| lag=1.5, | ||
| noise=(0, 8.3, 0.5), | ||
| ) | ||
|
|
||
| drogue = calisto.add_parachute( | ||
| name="drogue", | ||
| cd_s=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: | ||
|
|
@@ -299,7 +313,9 @@ 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) | ||
| 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: | ||
|
|
@@ -318,6 +334,12 @@ Here is just a quick taste of what RocketPy is able to calculate. There are hund | |
|
|
||
|  | ||
|
|
||
| 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") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will give a candy to whoever adds a good picture of trajectory plotted on Google Earth extra candy if it is a GIF |
||
| ``` | ||
|
|
||
| <br> | ||
|
|
||
| # Authors and Contributors | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.