BUG: update flight simulation logic to include burn start time by Gui-FernandesBR · Pull Request #778 · RocketPy-Team/RocketPy
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.mdhas 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