Skip to content

BUG: apply gimbaled thrust components to translational dynamics - #27

Open
ting-hong-shieh wants to merge 1 commit into
ARRC-Rocket:enh/actuator-merge-rocketpyfrom
ting-hong-shieh:codex/fix-gimbaled-thrust-components
Open

BUG: apply gimbaled thrust components to translational dynamics#27
ting-hong-shieh wants to merge 1 commit into
ARRC-Rocket:enh/actuator-merge-rocketpyfrom
ting-hong-shieh:codex/fix-gimbaled-thrust-components

Conversation

@ting-hong-shieh

Copy link
Copy Markdown

Summary

  • Resolve gimbaled thrust into body-frame e1, e2, and e3 components.
  • Apply the same thrust vector in the regular and generalized 6-DoF translational equations.
  • Compute the thrust moment as r × F, including nozzle position and thrust eccentricity.

Problem

At the head commit of RocketPy-Team/RocketPy#965, both 6-DoF equation paths reduce the axial thrust component and add pitch/yaw moments when TVC is active. The translational equations still omit the corresponding lateral thrust components: the regular path adds no thrust to its e1 or e2 force terms, and the generalized path uses [0, 0, thrust3].

As a result, a gimbal command changes the rotational dynamics without applying the commanded lateral force to the rocket's translation.

Implementation

Flight._calculate_thrust_vector now produces one body-frame thrust vector using the signs implied by the existing moment equations:

  • positive x-axis gimbal: thrust toward -e2
  • positive y-axis gimbal: thrust toward +e1

Both equation paths consume this vector. The moment contribution is calculated from the nozzle position and force with r × F, which also retains the existing thrust-eccentricity behavior.

This PR is limited to the physics correction on the branch behind RocketPy-Team#965. It does not rebase the actuator work onto develop or the Flight event/controller changes in RocketPy-Team/RocketPy#968.

Validation

pytest tests/unit/simulation/test_flight.py tests/unit/rocket/test_actuators.py -q
109 passed, 4 skipped

ruff check rocketpy/simulation/flight.py tests/unit/simulation/test_flight.py
All checks passed!

git diff --check
No errors

The new cases cover zero gimbal, positive and negative single-axis commands, two-axis magnitude preservation, and the nozzle moment from r × F.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant