Skip to content

Commit

Permalink
Merge pull request #65 from jaluebbe/patch-1
Browse files Browse the repository at this point in the history
fixing order of roll, pitch, yaw in Quaternion.from_rpy()
  • Loading branch information
Mayitzin committed Mar 15, 2022
2 parents 04fba89 + c5e8b02 commit c310abd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ahrs/common/quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ def from_rpy(self, angles: np.ndarray) -> np.ndarray:
for angle in angles:
if angle < -2.0* np.pi or angle > 2.0 * np.pi:
raise ValueError(f"Expected `angles` must be in the range [-2pi, 2pi], got {angles}.")
yaw, pitch, roll = angles
roll, pitch, yaw = angles
cy = np.cos(0.5*yaw)
sy = np.sin(0.5*yaw)
cp = np.cos(0.5*pitch)
Expand Down

0 comments on commit c310abd

Please sign in to comment.