- java.lang.Object
-
- spice.basic.EulerAngles
-
public class EulerAngles extends java.lang.Object
Class EulerAngles represents Euler angle sequences.Version 1.0.0 22-DEC-2009 (NJB)
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double[]
angles
(package private) int[]
axes
private static java.lang.String[]
indexNames
-
Constructor Summary
Constructors Constructor Description EulerAngles(double[] angles, int[] axes)
Construct an Euler angle sequence from an array of three angles and an array of three axis indices.EulerAngles(double leftAngle, double centerAngle, double rightAngle, int leftAxis, int centerAxis, int rightAxis)
Construct an Euler angle sequence from three angles and three axis indices.EulerAngles(double leftAngle, double centerAngle, double rightAngle, AngularUnits units, int leftAxis, int centerAxis, int rightAxis)
Construct an Euler angle sequence from three angles having specified units and three axis indices.EulerAngles(EulerAngles eul)
Copy constructor.EulerAngles(Matrix33 m, int[] axes)
Construct an Euler angle sequence from a rotation matrix and an array of three axis indices.
-
Method Summary
Modifier and Type Method Description private static void
checkAxes(int[] axes)
double[]
getAngles()
Return the angle sequence for this instance.double[]
getAngles(AngularUnits units)
Return the angle sequence for this instance, where the angles are expressed in user-specified units.int[]
getAxes()
Return the axis index sequence for this instance.Matrix33
toMatrix()
Convert this instance to a rotation matrix.java.lang.String
toString()
Return a string representation of the contents of this EulerAngles instance.This overrides Object's toString method.
-
-
-
Constructor Detail
-
EulerAngles
public EulerAngles(EulerAngles eul)
Copy constructor.- Parameters:
eul
- EulerAngles
-
EulerAngles
public EulerAngles(double leftAngle, double centerAngle, double rightAngle, int leftAxis, int centerAxis, int rightAxis) throws SpiceException
Construct an Euler angle sequence from three angles and three axis indices.Angular units are radians.
Axis numbers are in the set { 1, 2, 3 }.
The Euler angle sequence represents the rotation
[leftAngle] [centerAngle] [rightAngle] leftAxis centerAxis rightAxis
- Parameters:
leftAngle
- doublerightAxis
- intcenterAngle
- doublecenterAxis
- intrightAngle
- doubleleftAxis
- int- Throws:
SpiceException
- exeption
-
EulerAngles
public EulerAngles(double leftAngle, double centerAngle, double rightAngle, AngularUnits units, int leftAxis, int centerAxis, int rightAxis) throws SpiceException
Construct an Euler angle sequence from three angles having specified units and three axis indices.The angles will be converted to radians on input.
Axis numbers are in the set { 1, 2, 3 }.
The Euler angle sequence represents the rotation
[leftAngle] [centerAngle] [rightAngle] leftAxis centerAxis rightAxis
- Parameters:
leftAngle
- doublerightAxis
- intcenterAngle
- doublecenterAxis
- intrightAngle
- doubleleftAxis
- intunits
- AngularUnits- Throws:
SpiceException
- exeption
-
EulerAngles
public EulerAngles(double[] angles, int[] axes) throws SpiceException
Construct an Euler angle sequence from an array of three angles and an array of three axis indices.Angular units are radians.
Axis numbers are in the set { 1, 2, 3 }.
The Euler angle sequence represents the rotation
[ angles[0] ] [ angles[1] ] [ angles[2] ] axes[0] axes[1] axes[2]
- Parameters:
angles
- double[]axes
- int[]- Throws:
SpiceException
- exeption
-
EulerAngles
public EulerAngles(Matrix33 m, int[] axes) throws SpiceException
Construct an Euler angle sequence from a rotation matrix and an array of three axis indices.Axis numbers are in the set { 1, 2, 3 }.
The Euler angle sequence represents the rotation
m = [ angles[0] ] [ angles[1] ] [ angles[2] ] axes[0] axes[1] axes[2]
- Parameters:
m
- Matrix33axes
- int[]- Throws:
SpiceException
- exeption
-
-
Method Detail
-
checkAxes
private static void checkAxes(int[] axes) throws SpiceException
- Throws:
SpiceException
-
getAxes
public int[] getAxes()
Return the axis index sequence for this instance.- Returns:
- int[]
-
getAngles
public double[] getAngles()
Return the angle sequence for this instance.Angular units are radians.
- Returns:
- double[]
-
getAngles
public double[] getAngles(AngularUnits units)
Return the angle sequence for this instance, where the angles are expressed in user-specified units.- Parameters:
units
- AngularUnits- Returns:
- double[]
-
toMatrix
public Matrix33 toMatrix() throws SpiceException
Convert this instance to a rotation matrix.- Returns:
- Matrix33
- Throws:
SpiceException
- exeption
-
toString
public java.lang.String toString()
Return a string representation of the contents of this EulerAngles instance.This overrides Object's toString method.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String
-
-