- java.lang.Object
-
- 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
Fields Modifier and Type Field Description 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
Constructors Constructor Description OsculatingElements()
No-arguments constructor.OsculatingElements(double[] eltArray)
Array constructor.OsculatingElements(OsculatingElements elts)
Copy constructor.This constructor creates a deep copy.OsculatingElements(StateVector state, Time t, double mu)
Create osculating elements from a StateVector, a Time, and a gravitational parameter (GM).
-
Method Summary
Modifier and Type Method Description double
getArgumentOfPeriapsis()
Return the argument of periapsis.Units are radians.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.Units are radians.double
getLongitudeOfNode()
Return the longitude of the ascending node.Units are radians.double
getMeanAnomaly()
Return the mean anomaly at epoch.Units are radians.double
getPerifocalDistance()
Return the perifocal distance.Units are km.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.
-
-
-
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
OsculatingElements()
No-arguments constructor.This constructor creates the element array field.
-
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.
- Parameters:
eltArray
- double[]- Throws:
SpiceException
- exception
-
OsculatingElements
public OsculatingElements(OsculatingElements elts)
Copy constructor.This constructor creates a deep copy.- Parameters:
elts
- OsculatingElements
-
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
- Parameters:
state
- StateVectormu
- doublet
- Time- Throws:
SpiceException
- exception
-
-
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.
- Returns:
- double[]
-
getPerifocalDistance
public double getPerifocalDistance()
Return the perifocal distance.Units are km.- Returns:
- double
-
getEccentricity
public double getEccentricity()
Return the eccentricity.- Returns:
- double
-
getInclination
public double getInclination()
Return the inclination.Units are radians.- Returns:
- double
-
getLongitudeOfNode
public double getLongitudeOfNode()
Return the longitude of the ascending node.Units are radians.- Returns:
- double
-
getArgumentOfPeriapsis
public double getArgumentOfPeriapsis()
Return the argument of periapsis.Units are radians.- Returns:
- double
-
getMeanAnomaly
public double getMeanAnomaly()
Return the mean anomaly at epoch.Units are radians.- Returns:
- double
-
getEpoch
public TDBTime getEpoch()
Return the epoch of this instance.- Returns:
- TDBTime
-
getGM
public double getGM()
Return the gravitational parameter of this instance.The GM value `mu' is expressed in units of
3 2 km / sec
- Returns:
- double
-
propagate
public StateVector propagate(Time t) throws SpiceException
Propagate these elements to a state at a given epoch.- Parameters:
t
- Time- Returns:
- StateVector
- Throws:
SpiceException
- exception
-
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.- Parameters:
initialState
- StateVectordt
- TDBDurationmu
- double- Returns:
- StateVector
- Throws:
SpiceException
- exception
-
-