Module JNISpice
Package spice.basic

Class EulerState


  • public class EulerState
    extends java.lang.Object
    Class EulerState represents sequences of Euler angles and their corresponding rates of change.

    Version 1.0.0 22-DEC-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int[] axes  
      private static java.lang.String[] indexNames  
      (package private) double[] state  
    • Constructor Summary

      Constructors 
      Constructor Description
      EulerState​(double[] angularState, int[] axes)
      Construct an Euler angle state from an angular state---an array of angles and angular rates--- and an array of three axis indices.
      EulerState​(double leftAngle, double centerAngle, double rightAngle, double leftRate, double centerRate, double rightRate, int leftAxis, int centerAxis, int rightAxis)
      Construct an Euler angle state from three angles, three angular rates, and three axis indices.
      EulerState​(EulerState eul)
      Copy constructor.
      EulerState​(Matrix66 xform, int[] axes)
      Construct an Euler angle state from a state transformation 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 Euler angle sequence for this instance.Units are radians.
      int[] getAxes()
      Return the axis index sequence for this instance.
      double[] getRates()
      Return the Euler angle rate sequence for this instance.Angular units are radians.
      double[] toArray()
      Return the angular state for this instance in a one-dimensional array of length six.The first three elements of the array are Euler angles; the last three elements are the corresponding rates of change.
      Matrix66 toMatrix()
      Convert this instance to a state transformation matrix.
      java.lang.String toString()
      Return a string representation of the contents of this EulerState instance.This overrides Object's toString method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • indexNames

        private static java.lang.String[] indexNames
      • state

        double[] state
      • axes

        int[] axes
    • Constructor Detail

      • EulerState

        public EulerState​(EulerState eul)
        Copy constructor.
        Parameters:
        eul - EulerState
      • EulerState

        public EulerState​(double leftAngle,
                          double centerAngle,
                          double rightAngle,
                          double leftRate,
                          double centerRate,
                          double rightRate,
                          int leftAxis,
                          int centerAxis,
                          int rightAxis)
                   throws SpiceException
        Construct an Euler angle state from three angles, three angular rates, 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 - double
        rightAxis - int
        centerAngle - double
        centerAxis - int
        rightAngle - double
        leftAxis - int
        leftRate - double
        rightRate - double
        centerRate - double
        Throws:
        SpiceException - exception
      • EulerState

        public EulerState​(double[] angularState,
                          int[] axes)
                   throws SpiceException
        Construct an Euler angle state from an angular state---an array of angles and angular rates--- and an array of three axis indices.

        Angular units are radians.

        Time units are unspecified.

        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:
        angularState - double[]
        axes - int[]
        Throws:
        SpiceException - exception
      • EulerState

        public EulerState​(Matrix66 xform,
                          int[] axes)
                   throws SpiceException
        Construct an Euler angle state from a state transformation 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:
        xform - Matrix66
        axes - int[]
        Throws:
        SpiceException - exception
    • Method Detail

      • getAxes

        public int[] getAxes()
        Return the axis index sequence for this instance.
        Returns:
        int[]
      • getAngles

        public double[] getAngles()
        Return the Euler angle sequence for this instance.Units are radians.
        Returns:
        double[]
      • getRates

        public double[] getRates()
        Return the Euler angle rate sequence for this instance.Angular units are radians. Time units are unspecified.
        Returns:
        double[]
      • toArray

        public double[] toArray()
        Return the angular state for this instance in a one-dimensional array of length six.The first three elements of the array are Euler angles; the last three elements are the corresponding rates of change.

        Angular units are radians. Time units are unspecified.

        Returns:
        double[]
      • toString

        public java.lang.String toString()
        Return a string representation of the contents of this EulerState instance.This overrides Object's toString method.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String