Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,10 @@ def _dcm_to_euler(self, dcm):
dcm[0][2] + dcm[1][1]) + phi)
elif abs(theta + np.pi/2) < 1.0e-3:
phi = 0.0
psi = np.arctan2(dcm[1][2] - dcm[0][1],
dcm[0][2] + dcm[1][1] - phi)
psi = np.arctan2(
dcm[1][2] - dcm[0][1],
dcm[0][2] + dcm[1][1]
) - phi
else:
phi = np.arctan2(dcm[2][1], dcm[2][2])
psi = np.arctan2(dcm[1][0], dcm[0][0])
Expand Down
Loading