Skip to content

ENH: Individual Fins #818

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

Open
wants to merge 36 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
193d005
ENH: add individual fin class
MateusStano Sep 7, 2024
9c54679
ENH: add trapezoidal fin and elliptical fin
MateusStano Sep 7, 2024
9e7d708
ENH: add fin method to rocket class
MateusStano Sep 11, 2024
6a63b4d
ENH: add print and plots to individual fins classes.
juliomachad0 Sep 12, 2024
ce70197
ENH: Lint corrections, mainly attribute names.
juliomachad0 Sep 21, 2024
66ab420
Merge branch 'develop' into enh/individual-fins
MateusStano Mar 15, 2025
c1d9483
ENH: reorder imports for fins module
MateusStano Mar 31, 2025
8bbac15
ENH: fix rotation matrixes
MateusStano Apr 17, 2025
b4b369e
ENH: create _BaseFin class
MateusStano Apr 17, 2025
f4d3271
MNT: fix variable names in Fin
MateusStano Apr 18, 2025
8103fd8
BUG: correct interference factors
MateusStano Apr 18, 2025
c0d57d9
ENH: create _TrapezoidalMixin
MateusStano Apr 18, 2025
5ebc901
MNT: remove unused methods and variables in fin classes
MateusStano Apr 18, 2025
6bce627
ENH: move evaluate cp out of mixin and include to/from_dict
MateusStano Apr 19, 2025
4685318
ENH: free form mixin
MateusStano Apr 19, 2025
d1236bb
ENH: elliptical mixin
MateusStano Apr 19, 2025
455ce01
ENH: add to_dict in Fin
MateusStano Apr 19, 2025
985268d
ENH: add FreeFormFin prints and plots
MateusStano Apr 21, 2025
7ce8644
ENH: add aero surfaces to body rotation matrixes
MateusStano Apr 21, 2025
0ddfdc1
ENH: adapt position related calculations
MateusStano Apr 21, 2025
0a0af82
Squashed commit of the following:
MateusStano Apr 21, 2025
91b5a39
Merge remote-tracking branch 'origin/develop' into enh/individual-fins
MateusStano Apr 21, 2025
276d456
Merge remote-tracking branch 'origin/develop' into enh/individual-fins
MateusStano Apr 26, 2025
719be74
MNT: rename base_fin to _base_fin
MateusStano May 7, 2025
9ff9581
DOC: finish docstrings
MateusStano May 15, 2025
c1ae511
ENH: add title to some fins plots
MateusStano May 15, 2025
0643505
ENH: individual fin in rocket draw
MateusStano May 15, 2025
31e3cdb
DOC: add individual fin docs
MateusStano May 15, 2025
3f2d964
Merge remote-tracking branch 'origin/develop' into enh/individual-fins
MateusStano May 15, 2025
7945d51
DOC: typo
MateusStano May 15, 2025
54d894b
DEV: remove merge conflicts
MateusStano May 15, 2025
76b5830
TST: fix tests
MateusStano May 15, 2025
a5249e6
MNT: ruff
MateusStano May 15, 2025
e49e6ca
ENH: add from_dict to new classes
MateusStano May 16, 2025
f1d89b0
MNT: ruff
MateusStano May 16, 2025
45cebc4
MNT: lint
MateusStano May 17, 2025
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
Prev Previous commit
Next Next commit
Squashed commit of the following:
commit c674725
Author: Kevin Alcañiz <[email protected]>
Date:   Sat Apr 12 13:40:25 2025 +0200

    ENH: Introduce Net Thrust with pressure corrections (#789)

    * wind factor bug corrected

    the wind factor wasn't applied to the env.wind_velocity properties

    * BUG: StochasticModel visualize attributes of a uniform distribution

    It showed the nominal and the standard deviation values and it doesn't make sense in a uniform distribution. In a np.random.uniform the 'nominal value' is the lower bound of the distribution, and the 'standard deviation' value is the upper bound. Now, a new condition has been added for the uniform distributions where the mean and semi range are calculated and showed. This way the visualize_attribute function will show the whole range where the random values are uniformly taken in

    * variable names corrections

    * Corrections requested by the pylint test

    * ENH: Add pressure corrections for thrust in SolidMotor

    The thrust generated by a SolidMotor is now adjusted for the atmospheric pressure. To achieve that, a new attribute, 'vacuum_thrust', has been created. The 'net_thrust' is the result of 'vacuum_thrust' minus the atmospheric pressure multiplied by the nozzle area.

    * ENH: pylint recommendations done

    * ENH: net thrust method extended to the rest of the motor classes

    * BUG: __post_processed_variables inconsistent array

    * ENH: ruff reformatting

    * Update rocketpy/motors/motor.py

    Co-authored-by: Gui-FernandesBR <[email protected]>

    * ENH: Avoid breaking change

    * ENH: Pressure Thrust method added

    * BUG: call to the thrust function wrong

    * BUG: pressure thrust evaluated when motor is turned off

    * ENH: CHANGELOG updated

    * DOC: definition of exhaust velocity improved

    ---------

    Co-authored-by: Gui-FernandesBR <[email protected]>

commit 9f2644a
Author: Lucas Prates <[email protected]>
Date:   Sat Apr 12 11:27:53 2025 +0200

    ENH: Implement Multivariate Rejection Sampling (MRS) (#738)

    * ENH: implementing a draft version of the Multivarite Rejectio Sampler (MRS).

    * MNT: quick notebook to test MRS during development

    * MNT: refactoring class to match review suggestions

    * ENH: add comparison prints, plots and ellipses to MonteCarlo and finally checks in MRS

    * MNT: add MultivariateRejectionSampler class to inits and apply format

    * DOC: writting .rst documentation for MRS

    * MNT: adding pylint flags to skip checks

    * DOC: completing missing sections in mrs.rst

    * DOC: add changelog and apply sugestions in MRS class

    * DOC: apply suggestions to the MRS.rst

    * MNT: use Union instead of | for type hinting since we have to support python3.9

    * TST: adding unit and integration tests to MRS

    * MNT: use pylint flag to fix linter

    * TST: adding tests to MonteCarlo comparison features

    * MNT: applying suggestions in .rst, better handling nested variables in MRS and applying linters

    * MNT: removing TODO comments from monte_carlo_plots

    * MNT: remove useless TODO

    * MNT: inserting pragmas for no cover and resolving changelog conflict

commit d49c40e
Author: ArthurJWH <[email protected]>
Date:   Fri Apr 11 16:11:20 2025 -0400

    ENH: Create a rocketpy file to store flight simulations (#800)

    * ENH: added .rpy file functionality (see issue 668)

    This commit add 'save_to_rpy' and 'load_from_rpy' functions, that allows saving and loading flights.

    * MNT: adjusting minor changes to .rpy functions and tests.

    Formatted docstrings correctly.
    Reverted duplication of `test_encoding.py` files.
    Version warning will be called when loaded version is more recent.

    * MNT: incorporating previous comments

    Change file management from os to Path
    Adjust docstrings

    * DOC: Added comment about outputs in `to_dict` method

    * MNT: Refactoring `RocketPyDecoder` unpacking operation and other small adjustments

    * DOC: update changelog

    * STY: formatted according to ruff

    * MNT: changing `str | Path` operation to support Python 3.9

    * MNT: fixed trailing commas on .rpy and added shield against `ruff` formatting .rpy and .json files

    * MNT: fixing error related to `test_flight_save_load_no_resimulate`

    When `include_outputs` were set to `True`, it would try to include the additional data into the flight, breaking the test

    * MNT: fixing a typo and adding comment on test coverage

    ---------

    Co-authored-by: Gui-FernandesBR <[email protected]>

commit 6bf70f3
Author: Júlio Machado <[email protected]>
Date:   Sat Apr 5 15:08:53 2025 -0300

    ENH: Support for the RSE file format has been added to the library (#798)

    * ENH: Support for the RSE file format has been added to the library. The import_rse method in the Abstract Motor class and the load_from_rse_file method in the GenericMotor class are now available. With this update, the library natively supports Rock Sim software data, eliminating the need for users to manually convert motor files. The implementation was based on the import_eng and load_from_eng_file methods, utilizing Python's standard XML library.

    * ENH: Adding tests to the methods of .rse file treatment.

    * ENH: fixing mistakes on the method and test file

    * MNT: Running ruff

    * MNT: Adding the PR to CHANGELOG.md

commit 220bb59
Merge: 4a41f7a 4df0b38
Author: Gui-FernandesBR <[email protected]>
Date:   Thu Mar 27 06:14:22 2025 -0300

    Merge pull request #797 from RocketPy-Team/master

    Updates develop after 1.9.0

commit 4df0b38
Author: MateusStano <[email protected]>
Date:   Mon Mar 24 17:35:03 2025 +0100

    REL: Update version to 1.9.0 (#795)

commit 5328d66
Author: MateusStano <[email protected]>
Date:   Mon Mar 24 13:07:52 2025 +0100

    DEP: Remove Pending Deprecations and Add Warnings Where Needed (#794)

    * DEP: Add deprecation warnings for outdated methods and functions

    * DEP: Remove deprecated methods for NOAA RUC soundings and power drag plots

    * DEV: changelog

    * MNT: ruff

    * DEP: Update deprecation warning for post_process method to specify removal in v1.10

    * MNT: Remove unused imports

commit 76fb5ef
Merge: a4b42c3 4a41f7a
Author: Gui-FernandesBR <[email protected]>
Date:   Sun Mar 23 19:17:16 2025 -0300

    Merge pull request #793 from RocketPy-Team/develop

    DEV: Master to v1.9.0

commit 4a41f7a
Author: Kevin Alcañiz <[email protected]>
Date:   Sun Mar 23 21:52:51 2025 +0100

    ENH: Introduce the StochasticAirBrakes class (#785)

    * wind factor bug corrected

    the wind factor wasn't applied to the env.wind_velocity properties

    * BUG: StochasticModel visualize attributes of a uniform distribution

    It showed the nominal and the standard deviation values and it doesn't make sense in a uniform distribution. In a np.random.uniform the 'nominal value' is the lower bound of the distribution, and the 'standard deviation' value is the upper bound. Now, a new condition has been added for the uniform distributions where the mean and semi range are calculated and showed. This way the visualize_attribute function will show the whole range where the random values are uniformly taken in

    * variable names corrections

    * Corrections requested by the pylint test

    * ENH: add multiplication for 2D functions in rocketpy.function

    Added the ability to multiply functions with 2D domains in the __mul__ function

    * ENH: StochasticAirBrakes class created

    The StochasticAirBrakes class has been created. The __init__.py files in the stochastic and rocketpy folders have also been modified accordingly to incorporate this new class

    * ENH: set_air_brakes function created

    This functions appends an airbrake and controller objects previuosly created to the rocket

    * ENH: add StochasticAirBrake to rocketpy.stochastic_rocket

    Some functions has been modified and other has been created in order to include the new StochasticAirBrakes feature into the StochasticRocket class. A new function named 'add_air_brakes' has been created to append a StochasticAirBrakes and Controller objects to the StochasticRocket object. A new function '_create_air_brake' has been introduced to create a sample of an AirBrake object through a StochasticAirBrake object. Enventually, the 'create_object' function has been modified to add the sampled AirBrakes to the sampled Rocket

    * BUG: StochasticAirBrake object input in _Controller

    When defining the _Controller object a StochasticAirBrake was input. This is already corrected and a AirBrake object is now introduced

    * ENH: add time_overshoot option to rocketpy.stochastic_flight

    Since the new StochasticAirBrake class is defined, we need the 'time_overshoot' option in the Flight class to ensure that the time step defined in the simulation is the controller sampling rate. The MonteCarlo class has had to be modified as well to include this option.

    * DOC: StochasticAirBrakes related documentation added

    Documentation related to the StochasticAirBrakes implementation has been added in StochasticAirBrakes, StochasticRocket and Rocket classes.

    * ENH: pylint recommendations done

    * ENH: Reformatted files to pass Ruff linting checks

    * ENH: Update rocketpy/stochastic/stochastic_rocket.py

    Unnecessary comment

    Co-authored-by: Gui-FernandesBR <[email protected]>

    * DOC: improve drag curve factor definition in StochasticAirBrakes

    * ENH: Change assert statement to if

    Co-authored-by: Gui-FernandesBR <[email protected]>

    * DOC: better explanation of __mul__ function

    Co-authored-by: MateusStano <[email protected]>

    * ENH: delete set_air_brakes function for simplicity

    * DOC: CHANGELOG file updated

    ---------

    Co-authored-by: Gui-FernandesBR <[email protected]>
    Co-authored-by: MateusStano <[email protected]>

commit 90553f5
Author: Kevin Alcañiz <[email protected]>
Date:   Sun Mar 23 20:31:50 2025 +0100

    ENH: Add Eccentricity to Stochastic Simulations (#792)

    * wind factor bug corrected

    the wind factor wasn't applied to the env.wind_velocity properties

    * BUG: StochasticModel visualize attributes of a uniform distribution

    It showed the nominal and the standard deviation values and it doesn't make sense in a uniform distribution. In a np.random.uniform the 'nominal value' is the lower bound of the distribution, and the 'standard deviation' value is the upper bound. Now, a new condition has been added for the uniform distributions where the mean and semi range are calculated and showed. This way the visualize_attribute function will show the whole range where the random values are uniformly taken in

    * variable names corrections

    * Corrections requested by the pylint test

    * ENH: more intuitive uniform distribution display in StochasticModel

    Co-authored-by: MateusStano <[email protected]>

    * ENH: Eccentricities added to the StochasticRocket class

    A bug has been corrected in Flight class and an enhancement has been performed in the Rocket class as well

    * BUG: thrust eccentricity bug corrected

    eccentricity_y was defined by x coordinate and eccentricity_x was defined by y coordinate

    * BUG: Undo some Rocket class changes

    * ENH: add eccentricities to StochasticRocket

    * BUG: fix MonteCarlo eccentricity inputs

    * ENH: pylint and ruff recommended changes

    * TST: fix tests with eccentricity

    ---------

    Co-authored-by: Gui-FernandesBR <[email protected]>

commit 7348053
Author: Kevin Alcañiz <[email protected]>
Date:   Sun Mar 23 13:49:35 2025 +0100

    BUG: fix the wind velocity factors usage and better visualization of uniform distributions in Stochastic Classes (#783)

    * wind factor bug corrected

    the wind factor wasn't applied to the env.wind_velocity properties

    * BUG: StochasticModel visualize attributes of a uniform distribution

    It showed the nominal and the standard deviation values and it doesn't make sense in a uniform distribution. In a np.random.uniform the 'nominal value' is the lower bound of the distribution, and the 'standard deviation' value is the upper bound. Now, a new condition has been added for the uniform distributions where the mean and semi range are calculated and showed. This way the visualize_attribute function will show the whole range where the random values are uniformly taken in

    * variable names corrections

    * Corrections requested by the pylint test

    * ENH: more intuitive uniform distribution display in StochasticModel

    Co-authored-by: MateusStano <[email protected]>

    ---------

    Co-authored-by: MateusStano <[email protected]>

commit d2f89ba
Author: Leonardo Rosa <[email protected]>
Date:   Fri Mar 21 18:57:49 2025 -0300

    DEV: add requirements-tests.txt on make install target (#791)

    * DEV: adds 'pip install -r requirements-tests.txt' recipe to 'make install' target on Makefile

    Co-authored-by: Gui-FernandesBR <[email protected]>

commit 91ac567
Author: Leonardo Rosa <[email protected]>
Date:   Fri Mar 21 18:53:53 2025 -0300

    BUG: fixes get_instance_attributes for Flight objects containing a Rocket object without rail buttons (#786)

    * DOC: fixed a typo in funcify_method() description

    * TST: created test for get_instante_attributes() with flight without rail buttons

    * BUG: fixed __calculate_rail_button_forces() by assigning a Function(0) to null_force instead of an empty array

    * DEV: updates CHANGELOG

commit 9407470
Author: Leonard <[email protected]>
Date:   Wed Mar 19 16:01:59 2025 +0100

    BUG: fixed AGL altitude in _FlightPrints.events_registered (#788)

    * BUG: fixed AGL altitude in _FlightPrints.events_registered

    * updeted CHANGELOG
  • Loading branch information
MateusStano committed Apr 21, 2025
commit 0a0af82670802d888a94318ccc9d46b18c98bb0f
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"bijective",
"bmatrix",
"boldsymbol",
"boxplot",
"boxplots",
"brentq",
"Bressan",
"bysource",
Expand Down Expand Up @@ -276,6 +278,7 @@
"savgol",
"SBMT",
"scilimits",
"scipy",
"searchsorted",
"seblm",
"seealso",
Expand All @@ -295,6 +298,7 @@
"statsmodels",
"STFT",
"subintervals",
"supremum",
"suptitle",
"supxlabel",
"supylabel",
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,40 @@ Attention: The newest changes should be on top -->

### Added

- ENH: Implement Multivariate Rejection Sampling (MRS) [#738] (https://github.com/RocketPy-Team/RocketPy/pull/738)
- ENH: Create a rocketpy file to store flight simulations [#800](https://github.com/RocketPy-Team/RocketPy/pull/800)
- ENH: Support for the RSE file format has been added to the library [#798](https://github.com/RocketPy-Team/RocketPy/pull/798)
- ENH: Introduce Net Thrust with pressure corrections [#789](https://github.com/RocketPy-Team/RocketPy/pull/789)

### Changed


### Fixed


## v1.9.0 - 2025-03-24

### Added

- ENH: Parallel mode for monte-carlo simulations 2 [#768](https://github.com/RocketPy-Team/RocketPy/pull/768)
- DOC: ASTRA Flight Example [#770](https://github.com/RocketPy-Team/RocketPy/pull/770)
- ENH: Add Eccentricity to Stochastic Simulations [#792](https://github.com/RocketPy-Team/RocketPy/pull/792)
- ENH: Introduce the StochasticAirBrakes class [#785](https://github.com/RocketPy-Team/RocketPy/pull/785)

### Changed

- DEP: Remove Pending Deprecations and Add Warnings Where Needed [#794](https://github.com/RocketPy-Team/RocketPy/pull/794)
- DOCS: reshape docs (closes #659) [#781](https://github.com/RocketPy-Team/RocketPy/pull/781)
- MNT: EmptyMotor class inherits from Motor(ABC) [#779](https://github.com/RocketPy-Team/RocketPy/pull/779)

### Fixed

- BUG: do not allow drawing rockets with no aerodynamic surface [#774](https://github.com/RocketPy-Team/RocketPy/pull/774)
- BUG: update flight simulation logic to include burn start time [#778](https://github.com/RocketPy-Team/RocketPy/pull/778)
- BUG: fixes get_instance_attributes for Flight objects containing a Rocket object without rail buttons [#786](https://github.com/RocketPy-Team/RocketPy/pull/786)
- BUG: fixed AGL altitude print for parachutes with lag [#788](https://github.com/RocketPy-Team/RocketPy/pull/788)
- BUG: fix the wind velocity factors usage and better visualization of uniform distributions in Stochastic Classes [#783](https://github.com/RocketPy-Team/RocketPy/pull/783)


## [v1.8.0] - 2025-01-20

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ install:
$(PYTHON) -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-optional.txt
pip install -r requirements-tests.txt
pip install -e .

format:
Expand Down
19 changes: 19 additions & 0 deletions data/motors/rse_example/rse_motor_example_file.rse
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<engine-database>
<engine-list>
<engine FDiv="10" FFix="1" FStep="-1." Isp="195.96" Itot="39.78" Type="reloadable" auto-calc-cg="1" auto-calc-mass="1"
avgThrust="18.082" burn-time="2.2" cgDiv="10" cgFix="1" cgStep="-1." code="E18" delays="4,8" dia="24." exitDia="0." initWt="57."
len="70." mDiv="10" mFix="1" mStep="-1." massFrac="36.32" mfg="Aerotech" peakThrust="31." propWt="20.7" tDiv="10" tFix="1"
tStep="-1." throatDia="0.">
<data>
<eng-data cg="35." f="0." m="20.7" t="0."/>
<eng-data cg="35." f="31." m="20.3774" t="0.04"/>
<eng-data cg="35." f="30." m="14.6638" t="0.4"/>
<eng-data cg="35." f="26.7" m="8.7629" t="0.8"/>
<eng-data cg="35." f="19.1" m="3.99638" t="1.2"/>
<eng-data cg="35." f="8." m="1.17602" t="1.6"/>
<eng-data cg="35." f="2.2" m="0.11448" t="2."/>
<eng-data cg="35." f="0." m="0." t="2.2"/>
</data>
</engine>
</engine-list>
</engine-database>
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
author = "RocketPy Team"

# The full version, including alpha/beta/rc tags
release = "1.8.0"
release = "1.9.0"


# -- General configuration ---------------------------------------------------
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/reference/classes/MultivariateRejectionSampler.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MultivariateRejectionSampler Class
----------------------------------

.. autoclass:: rocketpy.MultivariateRejectionSampler
:members:
1 change: 1 addition & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This reference manual details functions, modules, methods and attributes include
classes/EnvironmentAnalysis
Monte Carlo Analysis <classes/monte_carlo/index>
Sensitivity Analysis <classes/Sensitivity>
Multivariate Rejection Sampler <classes/MultivariateRejectionSampler>

.. toctree::
:maxdepth: 2
Expand Down
3 changes: 2 additions & 1 deletion docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ RocketPy's User Guide
../notebooks/monte_carlo_analysis/monte_carlo_class_usage.ipynb
../notebooks/monte_carlo_analysis/monte_carlo_analysis.ipynb
../notebooks/monte_carlo_analysis/parachute_drop_from_helicopter.ipynb
sensitivity.rst
Sensitivity Analysis <sensitivity.rst>
Multivariate Rejection Sampler <mrs.rst>

.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you want to choose a specific version to guarantee compatibility, you may ins

.. code-block:: shell

pip install rocketpy==1.8.0
pip install rocketpy==1.9.0


Optional Installation Method: ``conda``
Expand Down
Loading