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

BUG: update flight simulation logic to include burn start time #778

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

Gui-FernandesBR
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR commented Mar 4, 2025

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

In the Flight class, during two-stage rocket simulations, the second-stage motor is temporarily turned off after separation (except in hot separation cases). However, the current condition for applying power-on drag (t < self.rocket.motor.burn_out_time) incorrectly keeps power-on drag active during this period.

New behavior

The condition has been updated to self.rocket.motor.burn_start_time < t < self.rocket.motor.burn_out_time in u_dot and u_dot_generalized to ensure proper handling of drag forces for both single- and multi-stage rockets. This ensures that power-off drag is correctly applied when the second-stage motor is off.

Breaking change

  • No

Additional information

Firstly reported here: https://discord.com/channels/765037887016140840/1334492994631372810

@Gui-FernandesBR Gui-FernandesBR added Bug Something isn't working Flight Flight Class related features labels Mar 4, 2025
@Gui-FernandesBR Gui-FernandesBR self-assigned this Mar 4, 2025
@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner March 4, 2025 01:51
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.

LGTM, if all the tests run fine.

@Gui-FernandesBR Gui-FernandesBR changed the title BUG: update flight simulation logic to include burn start time in con… BUG: update flight simulation logic to include burn start time Mar 4, 2025
@Gui-FernandesBR Gui-FernandesBR merged commit 81449d4 into develop Mar 4, 2025
7 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the bug/power-off-drag branch March 4, 2025 13:44
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.08%. Comparing base (83aa20e) to head (4d5339e).
Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #778      +/-   ##
===========================================
+ Coverage    76.42%   80.08%   +3.66%     
===========================================
  Files           95       96       +1     
  Lines        11090    11362     +272     
===========================================
+ Hits          8475     9099     +624     
+ Misses        2615     2263     -352     

☔ 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
Bug Something isn't working Flight Flight Class related features
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants