Skip to content
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

ENH: Distances vs Positons v2 #282

Merged
merged 62 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
54b0914
ENH: define Motor.nozzlePosition and Motor.centerOfMass relative to u…
MateusStano Jun 19, 2022
0f927c8
ENH: replace NoseCone.distanceToCM with NoseCone.position, relative t…
giovaniceotto Nov 11, 2022
63213c8
ENH: replace Fins.distanceToCM with Fins.position, relative to rocket…
giovaniceotto Nov 11, 2022
9e4ab40
ENH: replace Tail.distanceToCM with Tail.position, relative to rocket…
giovaniceotto Nov 11, 2022
b9d432f
ENH: change from distance to position relative to rocket reference frame
giovaniceotto Nov 11, 2022
a8e9288
ENH: support for distance to position changes in the Flight class
giovaniceotto Nov 11, 2022
26d7964
STY: apply black style
giovaniceotto Nov 11, 2022
e5a91c7
ENH: Create EmptyMotor class
giovaniceotto Nov 16, 2022
2a99467
MAINT: Better define motor's coordinate systems
giovaniceotto Nov 16, 2022
c366b56
MAINT: Better define aerodynamic surfaces local coordinate systems
giovaniceotto Nov 16, 2022
de215c5
ENH: create AeroSurfaces class to hold aerodynamic surfaces and their…
giovaniceotto Nov 16, 2022
967120d
ENH: implement addMotor and coordinate system orientation
giovaniceotto Nov 16, 2022
3feeb3b
ENH: update Flight class to deal with new Rocket coordinate system
giovaniceotto Nov 16, 2022
da024b6
DOC: first update to Getting Started Notebook with new coordinate sys…
giovaniceotto Nov 16, 2022
412ea15
bug: fixed missing cpPosition initialization
MateusStano Nov 17, 2022
26e4fd4
Squashed commit of the following:
Gui-FernandesBR Nov 19, 2022
7e806b2
TST: conftest.py refactored to dist. vs posit.
Gui-FernandesBR Nov 19, 2022
c88fb13
TST: solidmotor tests refactored dist vs pos
Gui-FernandesBR Nov 19, 2022
0b4667c
TST: Fix 80% of test_rocket tests
Gui-FernandesBR Nov 19, 2022
4a0dc3d
tst: fixed rocket nosecone tests
MateusStano Nov 19, 2022
b1f90a7
tst: fixed flight tests
MateusStano Nov 19, 2022
6c4a306
tst: fixed acceptance tests
MateusStano Nov 19, 2022
fd8de97
TST: adding tests for aerosurfaces methods
Gui-FernandesBR Nov 20, 2022
68e9726
BUG: correct wrong f string tail method
Gui-FernandesBR Nov 20, 2022
ba54749
BUG: fix Environment.exportEnvironment()
Gui-FernandesBR Nov 20, 2022
65fe9d7
MAINT: specifying input types in utmToGeodesic
Gui-FernandesBR Nov 20, 2022
d591d52
MAINT: specifying input and retuning Nones
Gui-FernandesBR Nov 20, 2022
a014dba
TST: Add additional cases to test_environment
Gui-FernandesBR Nov 20, 2022
40baf0b
TST: Create test for environment analysis
Gui-FernandesBR Nov 20, 2022
2199195
TST: Create tests for Function class
Gui-FernandesBR Nov 20, 2022
1218179
MAINT: removing undesired comments
Gui-FernandesBR Nov 20, 2022
a847089
Fix code style issues with Black
lint-action Nov 20, 2022
06344e0
TST: add nozzlePosition argument value for consistency
giovaniceotto Nov 29, 2022
94cd379
Fix code style issues with Black
lint-action Nov 29, 2022
fe2dd87
Merge pull request #305 from RocketPy-Team/tst/adjusting_test_distanc…
giovaniceotto Nov 29, 2022
4d8c7fd
enh: remove() and pop() methods
MateusStano Dec 22, 2022
b5e16fc
maint: Update notebooks to new coordinate system
MateusStano Dec 22, 2022
6470e81
tst: added coordinate system tests
MateusStano Dec 22, 2022
32702c3
Update rocketpy/AeroSurfaces.py
MateusStano Dec 23, 2022
a9b859c
tst: fixed motor grains position
MateusStano Dec 23, 2022
de6be57
bug: made notebook images link to google drive images
MateusStano Dec 23, 2022
a94f52a
Merge branch 'beta/v1.0.0' into enh/distances-vs-positons-v2
MateusStano Dec 29, 2022
23d98d4
MAINT: revert type hint and improve docs
Gui-FernandesBR Dec 31, 2022
916cc50
ENH: moving fixtures to the conftest.py
Gui-FernandesBR Dec 31, 2022
49d4b75
MAINT: improve docstrings for tests
Gui-FernandesBR Dec 31, 2022
cc1dc04
TST: Improved tests for info returned
Gui-FernandesBR Dec 31, 2022
bd7d88f
MAINT: closing and cleaning files after tests
Gui-FernandesBR Dec 31, 2022
27422af
Merge branch 'enh/distances-vs-positons-v2' into tst/new_env_func_aer…
Gui-FernandesBR Dec 31, 2022
db990f9
Fix code style issues with Black
lint-action Dec 31, 2022
4bb94f6
maint: removed anotations
MateusStano Jan 4, 2023
b352ac7
enh: added envanalysis import
MateusStano Jan 4, 2023
51c7cbf
maint: sort imports
MateusStano Jan 4, 2023
65a28f7
bug: fix Function np.inf call with int or float defined Functions
MateusStano Jan 4, 2023
8473947
TST: set EnvAnalysis tests as slow option
Gui-FernandesBR Jan 4, 2023
8f9e370
maint: run black on notebooks
MateusStano Jan 4, 2023
1664395
Merge branch 'beta/v1.0.0' into enh/distances-vs-positons-v2
MateusStano Jan 8, 2023
8920c41
Merge branch 'beta/v1.0.0' into enh/distances-vs-positons-v2
MateusStano Jan 9, 2023
e6cf871
Merge branch 'enh/distances-vs-positons-v2' into tst/new_env_func_aer…
MateusStano Jan 10, 2023
dda3ce5
Fix code style issues with Black
lint-action Jan 10, 2023
d83e7eb
Merge pull request #306 from RocketPy-Team/tst/new_env_func_aero_tests
MateusStano Jan 18, 2023
03f1dc4
remaining merging conflicts
MateusStano Jan 19, 2023
7c14e54
bug: fix b and c geometrical parameters calculation
MateusStano Jan 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

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

<br>

Expand Down Expand Up @@ -78,7 +78,7 @@ RocketPy is the next-generation trajectory simulation solution for High-Power Ro
<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>Non-standard flights (e.g. parachute drop test from a 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>
Expand Down Expand Up @@ -125,15 +125,15 @@ Check out documentation details using the links below:

# Join Our Community!

RocketPy is growing fast! Many university 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.
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](https://discord.gg/b6xYnNh) server today!

<br>

# Previewing

You can preview RocketPy's main functionalities by browsing through a sample notebook in [Google Colab](https://colab.research.google.com/github/RocketPy-Team/rocketpy/blob/master/docs/notebooks/getting_started_colab.ipynb). No installation required!
You can preview RocketPy's main functionalities by browsing through a sample notebook in [Google Colab](https://colab.research.google.com/github/RocketPy-Team/rocketpy/blob/master/docs/notebooks/getting_started_colab.ipynb). No installation is required!

When you are ready to run RocketPy locally, you can read the *Getting Started* section!

Expand Down Expand Up @@ -229,24 +229,36 @@ A sample code to create a Rocket is:

```python
Calisto = Rocket(
motor=Pro75M1670,
radius=127/2000,
mass=19.197-2.956,
radius=127 / 2000,
mass=19.197 - 2.956,
inertiaI=6.60,
inertiaZ=0.0351,
distanceRocketNozzle=-1.255,
distanceRocketPropellant=-0.85704,
powerOffDrag='../data/calisto/powerOffDragCurve.csv',
powerOnDrag='../data/calisto/powerOnDragCurve.csv'
powerOffDrag="../../data/calisto/powerOffDragCurve.csv",
powerOnDrag="../../data/calisto/powerOnDragCurve.csv",
centerOfDryMassPosition=0,
coordinateSystemOrientation="tailToNose",
)

Calisto.setRailButtons([0.2, -0.5])

NoseCone = Calisto.addNose(length=0.55829, kind="vonKarman", distanceToCM=0.71971)
Calisto.addMotor(Pro75M1670, position=-1.255)

FinSet = Calisto.addTrapezoildalFins(4, span=0.100, rootChord=0.120, tipChord=0.040, distanceToCM=-1.04956)
NoseCone = Calisto.addNose(length=0.55829, kind="vonKarman", position=0.71971 + 0.55829)

Tail = Calisto.addTail(topRadius=0.0635, bottomRadius=0.0435, length=0.060, distanceToCM=-1.194656)
FinSet = Calisto.addTrapezoidalFins(
n=4,
rootChord=0.120,
tipChord=0.040,
span=0.100,
position=-1.04956,
cantAngle=0,
radius=None,
airfoil=None,
)

Tail = Calisto.addTail(
topRadius=0.0635, bottomRadius=0.0435, length=0.060, position=-1.194656
)
```

You may want to add parachutes to your rocket as well:
Expand Down Expand Up @@ -297,7 +309,7 @@ To see all available results, use:
TestFlight.allInfo()
```

Here is just a quick taste of what RocketPy is able to calculate. There are hundred of plots and data points computed by RocketPy to enhance your analyses.
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.

![6-DOF Trajectory Plot](docs/static/rocketpy_example_trajectory.svg)

Expand All @@ -323,7 +335,7 @@ The easiest way to help RocketPy is to demonstrate your support by starring our

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 on how you can contribute with the development of this next-gen trajectory simulation solution for rocketry.
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.

<br>

Expand All @@ -335,4 +347,4 @@ This project is licensed under the MIT License - see the [LICENSE.md](https://gi

## Release Notes

Want to know which bugs have been fixed and new features of each version? Check out the [release notes](https://github.com/RocketPy-Team/RocketPy/releases).
Want to know which bugs have been fixed and the new features of each version? Check out the [release notes](https://github.com/RocketPy-Team/RocketPy/releases).
30 changes: 21 additions & 9 deletions docs/development/rocketpy_as_developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,18 @@ The first step is to initialize the class with the vital data:
.. code-block:: python

Calisto = Rocket(
motor=Pro75M1670,
radius=127 / 2000,
mass=19.197 - 2.956,
inertiaI=6.60,
inertiaZ=0.0351,
distanceRocketNozzle=-1.255,
distanceRocketPropellant=-0.85704,
powerOffDrag="../../data/calisto/powerOffDragCurve.csv", #copy here the path to the drag curve file
powerOnDrag="../../data/calisto/powerOnDragCurve.csv", #copy here the path to the drag curve file
powerOffDrag="../../data/calisto/powerOffDragCurve.csv",
powerOnDrag="../../data/calisto/powerOnDragCurve.csv",
centerOfDryMassPosition=0,
coordinateSystemOrientation="tailToNose",
)

Calisto.addMotor(Pro75M1670, position=-1.255)

Then the rail buttons must be set:

.. code-block:: python
Expand All @@ -174,11 +175,22 @@ In the example, a nosecone, one fin set and one tail were added, but each case c

.. code-block:: python

NoseCone = Calisto.addNose(length=0.55829, kind="vonKarman", distanceToCM=0.71971)

FinSet = Calisto.addFins(4, span=0.100, rootChord=0.120, tipChord=0.040, distanceToCM=-1.04956)
NoseCone = Calisto.addNose(length=0.55829, kind="vonKarman", position=0.71971 + 0.55829)

FinSet = Calisto.addTrapezoidalFins(
n=4,
rootChord=0.120,
tipChord=0.040,
span=0.100,
position=-1.04956,
cantAngle=0,
radius=None,
airfoil=None,
)

Tail = Calisto.addTail(topRadius=0.0635, bottomRadius=0.0435, length=0.060, distanceToCM=-1.194656)
Tail = Calisto.addTail(
topRadius=0.0635, bottomRadius=0.0435, length=0.060, position=-1.194656
)

If you are considering the parachutes in the simulation, they also have to be added to the rocket object.
A trigger function must be supplied to trigger the parachutes.
Expand Down
Loading