-
-
Notifications
You must be signed in to change notification settings - Fork 230
Fix max_acceleration_power_off_time returning 0 when controllers are present #898
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
base: develop
Are you sure you want to change the base?
Conversation
043ad9c to
5b348c0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #898 +/- ##
===========================================
+ Coverage 80.27% 81.08% +0.81%
===========================================
Files 104 107 +3
Lines 12769 13814 +1045
===========================================
+ Hits 10250 11201 +951
- Misses 2519 2613 +94 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7b69d46 to
5d8e855
Compare
5d8e855 to
5e75f46
Compare
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
5e75f46 to
c87f262
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
When a Flight has controllers (e.g., AirBrakes),
max_acceleration_power_off_timealways returns0.0andmax_acceleration_power_offreturns0.0 m/s².Root cause:
np.argmax()on sliced arrayself.acceleration[burn_out_time_index:, 1]returns index relative to the slice, but the code uses this index directly on the full array.New behavior
Returns correct time and acceleration values after motor burnout:
Fix in
max_acceleration_power_off_time:Breaking change
Additional information
Fixes #803
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.