RocketPy-Team / RocketPy

Next generation High-Power Rocketry 6-DOF Trajectory Simulation
https://docs.rocketpy.org/
MIT License
616 stars 146 forks source link

ENH: CP and Thrust Eccentricity Effects Generate Roll Moment #617

Closed MateusStano closed 3 months ago

MateusStano commented 3 months ago

Pull request type

Checklist

Current behavior

CP eccentricities did not generate moment on the rocket's center axis (roll moment M3) and thrust eccentricity was not included in u_dot_generalized

New behavior

Roll moment is calculated properly and thrust eccentricity is included in u_dot_generalized

Breaking change

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.60%. Comparing base (158d1ca) to head (6af67ac). Report is 1 commits behind head on develop.

:exclamation: Current head 6af67ac differs from pull request most recent head 240585b

Please upload reports for the commit 240585b to get more accurate results.

Files Patch % Lines
rocketpy/simulation/flight.py 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #617 +/- ## =========================================== - Coverage 73.60% 73.60% -0.01% =========================================== Files 70 70 Lines 10290 10292 +2 =========================================== + Hits 7574 7575 +1 - Misses 2716 2717 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MateusStano commented 3 months ago

Send like r1 and r2 are aligned to the global coordinate system (the earth) but the x and y excentricity should be aligned to the local (rocket) coordinate system.

Right now I understand you are assuming R1 is always parallel to x_excentricity, right?

R1, R2, and R3 are described in the rocket coordinate system from what I understand

What I did here is in accordance with what the code was doing before, I am not assuming anything different. But yes, I believe the R1 was assumed to be parallel to x