JNISpice
version 2.0.0

spice.basic
Class OsculatingElements

java.lang.Object
  extended by spice.basic.OsculatingElements
Direct Known Subclasses:
OsculatingElementsExtended

public class OsculatingElements
extends java.lang.Object

Class OsculatingElements provides methods for conversion between state vectors and osculating elements. The class also supports two-body propagation of osculating elements or state vectors.

Version 2.0.0 25-JAN-2017 (NJB)

Added no-arguments constructor.

The protection of the field `eltArray' and of the index constants has been changed from "private" to "protected," in order to support derived classes.

Version 1.0.0 03-DEC-2009 (NJB)


Field Summary
protected  double[] eltArray
           
protected static int IDX_ARGP
           
protected static int IDX_ECC
           
protected static int IDX_INC
           
protected static int IDX_LNODE
           
protected static int IDX_M0
           
protected static int IDX_MU
           
protected static int IDX_RP
           
protected static int IDX_T0
           
protected static int NELTS
           
 
Constructor Summary
OsculatingElements(double[] eltArray)
          Array constructor.
OsculatingElements(OsculatingElements elts)
          Copy constructor.
OsculatingElements(StateVector state, Time t, double mu)
          Create osculating elements from a StateVector, a Time, and a gravitational parameter (GM).
 
Method Summary
 double getArgumentOfPeriapsis()
          Return the argument of periapsis.
 double getEccentricity()
          Return the eccentricity.
 TDBTime getEpoch()
          Return the epoch of this instance.
 double getGM()
          Return the gravitational parameter of this instance.
 double getInclination()
          Return the inclination.
 double getLongitudeOfNode()
          Return the longitude of the ascending node.
 double getMeanAnomaly()
          Return the mean anomaly at epoch.
 double getPerifocalDistance()
          Return the perifocal distance.
static StateVector propagate(StateVector initialState, double mu, TDBDuration dt)
          Propagate an initial state vector and gravitational parameter to another state vector at a given time offset.
 StateVector propagate(Time t)
          Propagate these elements to a state at a given epoch.
 double[] toArray()
          Obtain the elements of this instance in an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NELTS

protected static final int NELTS
See Also:
Constant Field Values

IDX_RP

protected static final int IDX_RP
See Also:
Constant Field Values

IDX_ECC

protected static final int IDX_ECC
See Also:
Constant Field Values

IDX_INC

protected static final int IDX_INC
See Also:
Constant Field Values

IDX_LNODE

protected static final int IDX_LNODE
See Also:
Constant Field Values

IDX_ARGP

protected static final int IDX_ARGP
See Also:
Constant Field Values

IDX_M0

protected static final int IDX_M0
See Also:
Constant Field Values

IDX_T0

protected static final int IDX_T0
See Also:
Constant Field Values

IDX_MU

protected static final int IDX_MU
See Also:
Constant Field Values

eltArray

protected double[] eltArray
Constructor Detail

OsculatingElements

public OsculatingElements(double[] eltArray)
                   throws SpiceException
Array constructor.

Set the elements of this instance to the values contained in the input array.

The array elements are, in order:

       RP      Perifocal distance.
       ECC     Eccentricity.
       INC     Inclination.
       LNODE   Longitude of the ascending node.
       ARGP    Argument of periapsis.
       M0      Mean anomaly at epoch.
       T0      Epoch.
       MU      Gravitational parameter.
   

Distance units are km. Angular units are radians.

Throws:
SpiceException

OsculatingElements

public OsculatingElements(OsculatingElements elts)
Copy constructor. This constructor creates a deep copy.


OsculatingElements

public OsculatingElements(StateVector state,
                          Time t,
                          double mu)
                   throws SpiceException
Create osculating elements from a StateVector, a Time, and a gravitational parameter (GM).

The GM value `mu' is expressed in units of

         3      2
       km  / sec
   

Throws:
SpiceException
Method Detail

toArray

public double[] toArray()
Obtain the elements of this instance in an array.

The elements are, in order:

       RP      Perifocal distance.
       ECC     Eccentricity.
       INC     Inclination.
       LNODE   Longitude of the ascending node.
       ARGP    Argument of periapsis.
       M0      Mean anomaly at epoch.
       T0      Epoch.
       MU      Gravitational parameter.
   

Distance units are km. Angular units are radians.


getPerifocalDistance

public double getPerifocalDistance()
Return the perifocal distance. Units are km.


getEccentricity

public double getEccentricity()
Return the eccentricity.


getInclination

public double getInclination()
Return the inclination. Units are radians.


getLongitudeOfNode

public double getLongitudeOfNode()
Return the longitude of the ascending node. Units are radians.


getArgumentOfPeriapsis

public double getArgumentOfPeriapsis()
Return the argument of periapsis. Units are radians.


getMeanAnomaly

public double getMeanAnomaly()
Return the mean anomaly at epoch. Units are radians.


getEpoch

public TDBTime getEpoch()
Return the epoch of this instance.


getGM

public double getGM()
Return the gravitational parameter of this instance.

The GM value `mu' is expressed in units of

         3      2
       km  / sec
   


propagate

public StateVector propagate(Time t)
                      throws SpiceException
Propagate these elements to a state at a given epoch.

Throws:
SpiceException

propagate

public static StateVector propagate(StateVector initialState,
                                    double mu,
                                    TDBDuration dt)
                             throws SpiceException
Propagate an initial state vector and gravitational parameter to another state vector at a given time offset.

Throws:
SpiceException

JNISpice
version 2.0.0

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