Skip to content

Matrix order in definition of Euler Angles is wrong #495

@joullsson

Description

@joullsson

Describe the bug

In https://opensimulationinterface.github.io/osi-documentation/open-simulation-interface/structosi3_1_1Orientation3d.html there are two different issues

  • while the text correctly interprets the ISO8855 as describing the intrinsic rotation z-y'-x'', the formula that defines the rotation as a product of three elementary rotations is in reverse order.
  • the preferred angular range is given as [-pi,pi]. However, euler angles are not unique on the cube [-pi, pi]^3.

Describe the expected behavior

The expected behavior can simply be taken from wikipedia https://de.wikipedia.org/wiki/Eulersche_Winkel#Roll-,_Nick-_und_Gierwinkel:_z-y%E2%80%B2-x%E2%80%B3-Konvention. This means that

  • the formula should read R_{yaw,pitch,roll} = R_{yaw} * R_{pitch} * R_{roll}
  • the angular range should be set to [-pi, pi] x [-pi/2, pi/2] x [-pi , pi] in order to make it unique (in the interior at least)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions