- java.lang.Object
-
- spice.basic.Vector6
-
- 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
Constructors Constructor Description StateVector()
Default constructor: create a zero-filled state vector.StateVector(double[] v)
Construct a StateVector from a double array of length 6.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.This method provides functionality analogous to that of the CSPICE routine spkcpo_c.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.This method provides functionality analogous to that of the CSPICE routine spkcvo_c.StateVector(Body target, Time t, ReferenceFrame ref, AberrationCorrection abcorr, Body observer)
Construct aberration-corrected StateVector from ephemeris data.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.This method provides functionality analogous to that of the CSPICE routine spkcpt_c.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.This method provides functionality analogous to that of the CSPICE routine spkcvt_c.
-
Method Summary
Modifier and Type Method Description 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.
-
-
-
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.- Parameters:
state
-- Throws:
SpiceException
- exception
-
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 ref, AberrationCorrection abcorr, Body observer) throws SpiceException
Construct aberration-corrected StateVector from ephemeris data.- Parameters:
target
-observer
-t
-abcorr
-ref
-- Throws:
SpiceException
- exception
-
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.
-
correctStelab
public static PositionVector correctStelab(PositionVector pobj, VelocityVector vobs) throws SpiceException
Correct a PositionVector for reception stellar aberration.- Parameters:
pobj
- PositionVectorvobs
- VelocityVector- Returns:
- PositionVector
- Throws:
SpiceException
- exception
-
correctStelabXmit
public static PositionVector correctStelabXmit(PositionVector pobj, VelocityVector vobs) throws SpiceException
Correct a PositionVector for transmission stellar aberration.- Parameters:
pobj
- PositionVectorvobs
- VelocityVector- Returns:
- PositionVector
- Throws:
SpiceException
- exception
-
-