Skip to content

Commit

Permalink
BUG: remove Matrix circuklar import in tools
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusStano committed May 16, 2024
1 parent 5016283 commit 6806912
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rocketpy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from cftime import num2pydate
from packaging import version as packaging_version

from rocketpy.mathutils.vector_matrix import Matrix

# Mapping of module name and the name of the package that should be installed
INSTALL_MAPPING = {"IPython": "ipython"}

Expand Down Expand Up @@ -520,7 +518,7 @@ def normalize_quaternions(quaternions):
q_w, q_x, q_y, q_z = quaternions
q_norm = (q_w**2 + q_x**2 + q_y**2 + q_z**2) ** 0.5
if q_norm == 0:
return Matrix.identity()
return 1, 0, 0, 0
return q_w / q_norm, q_x / q_norm, q_y / q_norm, q_z / q_norm


Expand Down

0 comments on commit 6806912

Please sign in to comment.