JNISpice
version 2.0.0

spice.basic
Class StateVector

java.lang.Object
  extended by spice.basic.Vector6
      extended by spice.basic.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 Summary
StateVector()
          Default constructor: create a zero-filled state vector.
StateVector(Body target, Time t, ReferenceFrame ref, AberrationCorrection abcorr, Body observer)
          Construct aberration-corrected StateVector from ephemeris data.
StateVector(Body target, Time t, ReferenceFrame outref, java.lang.String refloc, AberrationCorrection abcorr, Vector3 obspos, Body obsctr, ReferenceFrame obsref)
          Construct aberration-corrected StateVector from ephemeris data and an observer position vector.
StateVector(Body target, Time t, ReferenceFrame outref, java.lang.String refloc, AberrationCorrection abcorr, Vector6 obssta, Time obsepc, Body obsctr, ReferenceFrame obsref)
          Construct aberration-corrected StateVector from ephemeris data and an observer state vector.
StateVector(double[] v)
          Construct a StateVector from a double array of length 6.
StateVector(StateVector state)
          Copy constructor: create a deep copy of another StateVector.
StateVector(Vector3 trgpos, Body trgctr, ReferenceFrame trgref, Time t, ReferenceFrame outref, java.lang.String refloc, AberrationCorrection abcorr, Body obsrvr)
          Construct aberration-corrected StateVector from ephemeris data and a target position vector.
StateVector(Vector3 v1, Vector3 v2)
          Construct a StateVector from two Vector3 instances.
StateVector(Vector6 v)
          Construct a StateVector from a Vector6 instance.
StateVector(Vector6 trgsta, Time trgepc, Body trgctr, ReferenceFrame trgref, Time t, ReferenceFrame outref, java.lang.String refloc, AberrationCorrection abcorr, Body obsrvr)
          Construct aberration-corrected StateVector from ephemeris data and a target state vector.
 
Method Summary
static PositionVector correctStelab(PositionVector pobj, VelocityVector vobs)
          Correct a PositionVector for reception stellar aberration.
static PositionVector correctStelabXmit(PositionVector pobj, VelocityVector vobs)
          Correct a PositionVector for transmission stellar aberration.
 PositionVector getPosition()
          Return a PositionVector instance consisting of the position portion of this state vector.
 VelocityVector getVelocity()
          Return a VelocityVector instance consisting of the velocity portion of this state vector.
 java.lang.String toString()
          Create a String representation of this StateVector.
 
Methods inherited from class spice.basic.Vector6
add, assign, dcross, ddot, dhat, dist, dot, dsep, getElt, getVector3, isZero, lcom, negate, norm, scale, sub, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateVector

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


StateVector

public StateVector(StateVector state)
            throws SpiceException
Copy constructor: create a deep copy of another StateVector.

Throws:
SpiceException

StateVector

public StateVector(Vector6 v)
Construct a StateVector from a Vector6 instance.


StateVector

public StateVector(double[] v)
            throws SpiceException
Construct a StateVector from a double array of length 6.

Throws:
SpiceException

StateVector

public StateVector(Vector3 v1,
                   Vector3 v2)
Construct a StateVector from two Vector3 instances.


StateVector

public StateVector(Body target,
                   Time t,
                   ReferenceFrame ref,
                   AberrationCorrection abcorr,
                   Body observer)
            throws SpiceException
Construct aberration-corrected StateVector from ephemeris data.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException
Method Detail

getPosition

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


getVelocity

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


toString

public java.lang.String toString()
Create a String representation of this StateVector.

Overrides:
toString in class Vector6

correctStelab

public static PositionVector correctStelab(PositionVector pobj,
                                           VelocityVector vobs)
                                    throws SpiceException
Correct a PositionVector for reception stellar aberration.

Throws:
SpiceException

correctStelabXmit

public static PositionVector correctStelabXmit(PositionVector pobj,
                                               VelocityVector vobs)
                                        throws SpiceException
Correct a PositionVector for transmission stellar aberration.

Throws:
SpiceException

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)