ENH: 3-dof lateral motion improvement by aZira371 · Pull Request #883 · RocketPy-Team/RocketPy

@aZira371 aZira371 changed the title Enh/3 dof lateral motion improvement ENH/3-dof lateral motion improvement

Nov 27, 2025

@aZira371 aZira371 changed the title ENH/3-dof lateral motion improvement ENH: 3-dof lateral motion improvement

Nov 27, 2025

@aZira371 aZira371 marked this pull request as ready for review

November 27, 2025 14:42

Gui-FernandesBR

- ENH: a new notebook bella_lui_3dof_vs_6dof.ipynb which uses new implementations of weathercocking model on 3dof
- ENH: introduced new weathercock_coeff parameter in Flight.init (default: 1.0)

- ENH: updated u_dot_generalized_3dof to compute quaternion derivatives proportional to misalignment with relative wind

- ENH: angular velocity = weathercock_coeff * sin(misalignment_angle)
- ENH: unit tests added for weathercocking to check whether weathercock_coeff=0 results in fixed attitude (no quaternion change).

- MNT: format and lint updates for new additions
- DOC: added 3 dof and 6 dof comparison analysis to three_dof_simulation.rst

- DOC: updated iusers/index.rst to build three_dof_simulation.rst

- MNT: deleted the bella_lui_3dof_vs_6dof_comparison.ipynb as the doc now covers this section
- MNT: corrected doc string to represent correct orientation

- MNT: improved tolerance of check on quaternion derivative which should be ideally very small when axes are aligned

@aZira371 @Gui-FernandesBR

…cocking

- BUG: implemented a dot product check to ensure that singularity bug is avoided when rocket body and wind velocity are anti aligned to make rocket statically stable (in u_dot_generalized_3dof)

- MNT: removed redundant double assignment of e0 and w0 vectors within u_dot_generalized_3dof

- MNT: format correction to test_flight_3dof.py
- MNT: 3 dof documentation only referred in users section/getting started

- MNT: correction of docstring in flight.py

- MNT: corrected unit_vector call when defining rotation axis in u_dot_generalized_3dof

- MNT:  docstring correction in test_flight_3dof.py

- ENH: test coverage added for anti alignment case in weathercock model to test_flight_3dof.py

Gui-FernandesBR

Gui-FernandesBR

…cking coeff usage and value.
…xtures to test_flight_3dof.py
- MNT: fixed default weathercock_coeff value in flight.py to match 3 dof behaviour by default

- MNT: corrected fixtures and docstrings in test_flight_3dof.py

Gui-FernandesBR

Gui-FernandesBR

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- MNT: correction of docstring now that fixtures are used.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@aZira371

- MNT: perp_axis singularity value error implemented to handle edge case for perp_axis being parallel to body axis in weathercocking model of 3 dof.

@aZira371

* Initial plan

* DOC: Add note about motor file paths in 3-DOF comparison section

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
…lized_3dof (#903)

* Initial plan

* Refactor: eliminate quaternion derivative code duplication in u_dot_generalized_3dof

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Improve comment clarity in weathercocking aligned case

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

@aZira371

@aZira371

Gui-FernandesBR