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: adds new stability margin methods to flight #572

Merged

Conversation

Gui-FernandesBR
Copy link
Member

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)

New behavior

Use the new properties to access stability margin at specific times.
This will be useful for the Monte Carlo analyses.

Breaking change

  • No

Additional information

  • Once we create these properties, we won't be able to delete them.
  • I did not use cached property because I think the computational time for calling the functions is lower than the time spent to create a cached item in this case. Feel free to disagree.

@Gui-FernandesBR Gui-FernandesBR added Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features labels Mar 7, 2024
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Mar 7, 2024
@Gui-FernandesBR Gui-FernandesBR self-assigned this Mar 7, 2024
@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner March 7, 2024 23:44
@Gui-FernandesBR Gui-FernandesBR changed the base branch from master to develop March 7, 2024 23:44
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.65%. Comparing base (f4f658c) to head (2456b11).
Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #572      +/-   ##
===========================================
+ Coverage    72.62%   72.65%   +0.03%     
===========================================
  Files           59       59              
  Lines         9607     9614       +7     
===========================================
+ Hits          6977     6985       +8     
+ Misses        2630     2629       -1     

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

@Gui-FernandesBR Gui-FernandesBR force-pushed the enh/adds-new-stability-margin-methods-to-flight branch from c8b26b6 to 2940138 Compare March 9, 2024 18:52
Copy link
Collaborator

@phmbressan phmbressan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just made a comment regarding the time at which simulation begin and if an initial solution or #568 change expected behavior of this method.

rocketpy/simulation/flight.py Outdated Show resolved Hide resolved
@Gui-FernandesBR Gui-FernandesBR force-pushed the enh/adds-new-stability-margin-methods-to-flight branch from 2940138 to 1264a67 Compare March 21, 2024 19:18
Copy link
Member

@MateusStano MateusStano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new properties should be added to flight.prints as well!

…ect initial time

- This also adopts f-string interpolation for the initial_conditions prints
@Gui-FernandesBR
Copy link
Member Author

The new properties should be added to flight.prints as well!

Thank you for your suggestion. I solved it in c9cc0de

Can you re-review please? I need your approve now that you requested changes

@Gui-FernandesBR
Copy link
Member Author

Got some inspiration from this PR and decided to refactor the whole flight_prints.py module directly: #579

@Gui-FernandesBR Gui-FernandesBR merged commit e849a88 into develop Mar 22, 2024
11 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the enh/adds-new-stability-margin-methods-to-flight branch March 22, 2024 16:10
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: Closed
Development

Successfully merging this pull request may close these issues.

3 participants