public class EulerRotation extends Rotation
Rotation
. It does
not contain algorithmic code but allow to store an Euler rotation order.Constructor and Description |
---|
EulerRotation(RotationOrder order,
double alpha1,
double alpha2,
double alpha3)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getAngles()
Get the Cardan or Euler angles corresponding to the instance in the initial rotation order.
|
double[] |
getAngles(RotationOrder order)
Get the Cardan or Euler angles corresponding to the instance.
|
RotationOrder |
getRotationOrder()
Getter for the order of rotations to use for (alpha1, alpha2, alpha3) composition.
|
String |
toString()
Get a string representation for the rotation.
|
applyInverseTo, applyInverseTo, applyInverseTo, applyTo, applyTo, applyTo, distance, getAngle, getAxis, getMatrix, getQi, getQuaternion, isEqualTo, isEqualTo, lerp, revert, slerp
public EulerRotation(RotationOrder order, double alpha1, double alpha2, double alpha3)
order
- order of rotations to usealpha1
- angle of the first elementary rotationalpha2
- angle of the second elementary rotationalpha3
- angle of the third elementary rotationRotation.Rotation(RotationOrder, double, double, double)
public double[] getAngles(RotationOrder order)
The equations show that each rotation can be defined by two different values of the Cardan or Euler angles set. For example if Cardan angles are used, the rotation defined by the angles a1, a2 and a3 is the same as the rotation defined by the angles π + a1, π - a2 and π + a3. This method implements the following arbitrary choices:
Cardan and Euler angle have a very disappointing drawback: all of them have singularities. For Cardan angles, this is often called gimbal lock. There is nothing to do to prevent this, it is an intrinsic problem with Cardan and Euler representation (but not a problem with the rotation itself, which is perfectly well defined). For Cardan angles, singularities occur when the second angle is close to -π/2 or +π/2, for Euler angle singularities occur when the second angle is close to 0 or π, this implies that the identity rotation is always singular for Euler angles!
public double[] getAngles()
Rotation.getAngles(RotationOrder)
public RotationOrder getRotationOrder()
Copyright © 2018 CNES. All Rights Reserved.