Module JNISpice
Package spice.basic

Class StateVector

  • Direct Known Subclasses:
    StateRecord

    public class StateVector
    extends Vector6
    Class StateVector represents states (positions and velocities) of ephemeris objects relative to other objects. StateVectors implicitly carry units of kilometers and kilometers/second.

    Version 2.0.0 25-JAN-2017 (NJB)

       Added constructors corresponding to CSPICE methods
    
          CSPICE.spkcpo
          CSPICE.spkcpt
          CSPICE.spkcvo
          CSPICE.spkcvt
    

    Version 1.0.0 22-DEC-2009 (NJB)

    • Constructor Detail

      • StateVector

        public StateVector()
        Default constructor: create a zero-filled state vector.
      • StateVector

        public StateVector​(Vector6 v)
        Construct a StateVector from a Vector6 instance.
        Parameters:
        v -
      • StateVector

        public StateVector​(double[] v)
                    throws SpiceException
        Construct a StateVector from a double array of length 6.
        Parameters:
        v -
        Throws:
        SpiceException - exception
      • StateVector

        public StateVector​(Vector3 v1,
                           Vector3 v2)
        Construct a StateVector from two Vector3 instances.
        Parameters:
        v1 -
        v2 -
      • StateVector

        public StateVector​(Body target,
                           Time t,
                           ReferenceFrame outref,
                           java.lang.String refloc,
                           AberrationCorrection abcorr,
                           Vector3 obspos,
                           Body obsctr,
                           ReferenceFrame obsref)
                    throws SpiceException
        Construct aberration-corrected StateVector from ephemeris data and an observer position vector.This method provides functionality analogous to that of the CSPICE routine spkcpo_c.
        Parameters:
        target -
        obsref -
        t -
        obsctr -
        outref -
        obspos -
        refloc -
        abcorr -
        Throws:
        SpiceException - exception
      • StateVector

        public StateVector​(Body target,
                           Time t,
                           ReferenceFrame outref,
                           java.lang.String refloc,
                           AberrationCorrection abcorr,
                           Vector6 obssta,
                           Time obsepc,
                           Body obsctr,
                           ReferenceFrame obsref)
                    throws SpiceException
        Construct aberration-corrected StateVector from ephemeris data and an observer state vector.This method provides functionality analogous to that of the CSPICE routine spkcvo_c.
        Parameters:
        target -
        obsref -
        t -
        obsctr -
        outref -
        obsepc -
        refloc -
        obssta -
        abcorr -
        Throws:
        SpiceException - exception
      • StateVector

        public StateVector​(Vector3 trgpos,
                           Body trgctr,
                           ReferenceFrame trgref,
                           Time t,
                           ReferenceFrame outref,
                           java.lang.String refloc,
                           AberrationCorrection abcorr,
                           Body obsrvr)
                    throws SpiceException
        Construct aberration-corrected StateVector from ephemeris data and a target position vector.This method provides functionality analogous to that of the CSPICE routine spkcpt_c.
        Parameters:
        trgpos -
        obsrvr -
        trgctr -
        abcorr -
        trgref -
        refloc -
        t -
        outref -
        Throws:
        SpiceException - exception
      • StateVector

        public StateVector​(Vector6 trgsta,
                           Time trgepc,
                           Body trgctr,
                           ReferenceFrame trgref,
                           Time t,
                           ReferenceFrame outref,
                           java.lang.String refloc,
                           AberrationCorrection abcorr,
                           Body obsrvr)
                    throws SpiceException
        Construct aberration-corrected StateVector from ephemeris data and a target state vector.This method provides functionality analogous to that of the CSPICE routine spkcvt_c.
        Parameters:
        trgsta -
        obsrvr -
        trgepc -
        abcorr -
        trgctr -
        refloc -
        trgref -
        outref -
        t -
        Throws:
        SpiceException - exception
    • Method Detail

      • getPosition

        public PositionVector getPosition()
        Return a PositionVector instance consisting of the position portion of this state vector.
        Returns:
        PositionVector
      • getVelocity

        public VelocityVector getVelocity()
        Return a VelocityVector instance consisting of the velocity portion of this state vector.
        Returns:
        VelocityVector
      • toString

        public java.lang.String toString()
        Create a String representation of this StateVector.
        Overrides:
        toString in class Vector6
        Returns:
        String