Skip to content

Commit

Permalink
Add parameter 'degrees' to DCM to indicate the use of angles in degrees.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayitzin committed Oct 12, 2023
1 parent fc17bdc commit 9ed134a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ahrs/common/dcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ def __new__(subtype, array: np.ndarray = None, **kwargs):
array = DCM.from_q(DCM, np.array(kwargs.pop('q')))
if any(x.lower() in ['x', 'y', 'z'] for x in kwargs):
array = np.identity(3)
array = array@rotation('x', kwargs.pop('x', 0.0))
array = array@rotation('y', kwargs.pop('y', 0.0))
array = array@rotation('z', kwargs.pop('z', 0.0))
array = array@rotation('x', kwargs.pop('x', 0.0), degrees=kwargs.get('degrees', False))
array = array@rotation('y', kwargs.pop('y', 0.0), degrees=kwargs.get('degrees', False))
array = array@rotation('z', kwargs.pop('z', 0.0), degrees=kwargs.get('degrees', False))
if 'rpy' in kwargs:
angles = kwargs.pop('rpy')
_assert_iterables(angles, "Roll-Pitch-Yaw angles")
Expand Down

0 comments on commit 9ed134a

Please sign in to comment.