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: Implementing 3-dof-simulation #745

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

aZira371
Copy link
Collaborator

@aZira371 aZira371 commented Dec 3, 2024

Pull request type

  • Code changes (bugfix, features)

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

for issue #655

New behavior

(DRAFT)
ENH: adds 3 DOF simulation capability to rocketpy.Flight.

*ENH: added "u_dot_3dof" for "solid_propulsion"
mode

*ENH: adding "u_dot_generalized_3dof" for "standard" mode (still incomplete)

*ENH: new parameter "simulation_mode" for swtiching between 3 dof and 6 dof

*ENH: updated conditions for "__init_equations_of_motion"

*ENH: 2 new example files have been created to test 3 dof model "test_bella_lui_flight_sim" and "test_camoes_flight_sim"

Breaking change

  • No

Additional information

This is a draft pull request!
Equations of motion have been modified in such a way that values related to various rotational dofs is set to zero.

ENH: adds 3 DOF simulation capability to rocketpy.Flight.

*ENH: added "u_dot_3dof" for "solid_propulsion"
mode

*ENH: adding "u_dot_generalized_3dof" for "standard"
mode (still incomplete)

*ENH: new parameter "simulation_mode" for swtiching
between 3 dof and 6 dof

*ENH: updated conditions for "__init_equations_of_motion"

*ENH: 2 new example files have been created to test 3 dof model
"test_bella_lui_flight_sim" and "test_camoes_flight_sim"
@Lucas-Prates Lucas-Prates added Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features labels Dec 4, 2024
@Lucas-Prates Lucas-Prates linked an issue Dec 4, 2024 that may be closed by this pull request
@Lucas-Prates
Copy link
Contributor

Lucas-Prates commented Dec 4, 2024

Thank you for your interest in implementing 3-DOF in RocketPy, @aZira371 . I will try to take a better look into it, but I notice one thing already: use 6 DOF as the default input for simulation_mode for two reasons:

  1. most people will use 6 DOF;
  2. changing it to 3 DOF introduces breaking changes, and we really want to avoid that. You can see that a breaking change occurred because the tests failed.

@Lucas-Prates Lucas-Prates changed the title DRAFT: for ENH/3-dof-simulation (See #655) ENH: Implementing 3-dof-simulation Dec 4, 2024
ENH: adds 3 DOF simulation capability to rocketpy.Flight.

*ENH: added "u_dot_3dof" for "solid_propulsion"
mode

*ENH: added "u_dot_generalized_3dof" for "standard"
mode

*ENH: new parameter "simulation_mode" for swtiching
between 3 dof and 6 dof

*ENH: updated conditions for "__init_equations_of_motion"
ENH: fixed standard 3 dof

*MNT: Cleaned up the "u_dot_3dof" and "u_dot_generalized_3_dof"

*MNT: Corrected Typos in "simulation_mode"
description

*ENH: "u_dot_generalized_3_dof" fixed and tested
on examples.
@Gui-FernandesBR
Copy link
Member

  • Git rebase develop
  • Revert changes in the jupyter notebook
  • Create PointMassMotor
  • Create BaseRocket
  • Create PointMassRocket
  • Modify Rocket class where it's needed (here other people can help you, including Gui)
  • Modify the Flight class again, if needed (delete u_dot_3dof)
  • Include integration tests (here you can ask for help)
  • Format and lint the code (see the Makefile)

…otor

ENH: added "BaseRocket" and "PointMassRocket" to rocket class

ENH: added "PointMassMotor" to motor class with various input cases of thrust values
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 14.37126% with 143 lines in your changes missing coverage. Please review.

Project coverage is 79.10%. Comparing base (83aa20e) to head (4524219).
Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/simulation/flight.py 4.68% 122 Missing ⚠️
rocketpy/motors/PointMassMotor.py 48.00% 13 Missing ⚠️
rocketpy/rocket/rocket.py 42.85% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #745      +/-   ##
===========================================
+ Coverage    76.42%   79.10%   +2.68%     
===========================================
  Files           95       96       +1     
  Lines        11090    11515     +425     
===========================================
+ Hits          8475     9109     +634     
+ Misses        2615     2406     -209     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features
Projects
Status: Mid-Term
Development

Successfully merging this pull request may close these issues.

ENH: 3-DOF simulation
3 participants