-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
MNT: Refactor inertia calculations using parallel axis theorem #573
MNT: Refactor inertia calculations using parallel axis theorem #573
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #573 +/- ##
===========================================
+ Coverage 72.66% 72.70% +0.04%
===========================================
Files 59 59
Lines 9603 9618 +15
===========================================
+ Hits 6978 6993 +15
Misses 2625 2625 ☔ View full report in Codecov by Sentry. |
The review might seems pedantic because everything is working right now, but I find really important since this method might be used in the future in other parts of the code as a "black box" and will lead to incorrect results if not well documented or understood. |
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.
Excellent, thank you for solving the review comments. Looks good.
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
We apply the parallel axis theorem in many parts of the code today.
New behavior
I created a parallel axis theorem function in the tools.py module, so now all the calculations are centralized in a single place.
This makes the code more readable, as it quickly guides the reader when understanding the code.
Don't repeat yourself (DRY).
Breaking change
Additional information