org.orekit.propagation
Class SpacecraftState

java.lang.Object
  extended by org.orekit.propagation.SpacecraftState
All Implemented Interfaces:
Serializable, TimeInterpolable<SpacecraftState>, TimeShiftable<SpacecraftState>, TimeStamped

public class SpacecraftState
extends Object
implements TimeStamped, TimeShiftable<SpacecraftState>, TimeInterpolable<SpacecraftState>, Serializable

This class is the representation of a complete state holding orbit, attitude for forces and events computation and additional states informations at a given date.

It contains an Orbit , plus two attitudes (for forces and events computation) and a map of additional states at a current AbsoluteDate. Orbit and attitudes are guaranteed to be consistent in terms of date and reference frame. The attitudes objects can be copied in the map of additional states with the additional state name "ATTITUDE_FORCES", "ATTITUDE_EVENTS" or "ATTITUDE" (in numerical propagation only). The stored Attitude and the additional state representing the attitude are guaranteed to be equal.

The user can declare a SpacecraftState with an input MassProvider. The masses from each part of the mass model are automatically added to the map of additional states with a name in the form "MASS_". It is not possible to get back the MassProvider.

The state can be slightly shifted to close dates. This shift is based on a simple keplerian model for orbit, a linear extrapolation for both attitudes taking the spin rate into account, no additional states changes. It is not intended as a replacement for proper orbit and attitude propagation but should be sufficient for either small time shifts or coarse accuracy.

The instance SpacecraftState is guaranteed to be immutable.

Author:
Fabien Maussion, Véronique Pommier-Maurussane, Luc Maisonobe
See Also:
NumericalPropagator, Serialized Form

Field Summary
static String MASS
          Default prefix for additional state representing a mass.
static int ORBIT_DIMENSION
          First index of the additional states.
 
Constructor Summary
SpacecraftState(double[] y, OrbitType orbitType, PositionAngle angleType, AbsoluteDate date, double mu, Frame frame, Map<String,AdditionalStateInfo> addStatesInfo, AttitudeProvider attProviderForces, AttitudeProvider attProviderEvents)
          Build a spacecraft from an array (a state vector) and an additional states informations map.
SpacecraftState(Orbit orbit)
          Build a spacecraft state from orbit only.
SpacecraftState(Orbit orbit, Attitude attitude)
          Build a spacecraft state from orbit and a single attitude.
SpacecraftState(Orbit orbit, Attitude attForces, Attitude attEvents)
          Build a spacecraft state from orbit, attitude for forces and events computation.
SpacecraftState(Orbit orbit, Attitude attForces, Attitude attEvents, Map<String,double[]> addStates)
          Build a spacecraft state from orbit, attitude for forces and events computation and additional states map.
SpacecraftState(Orbit orbit, Attitude attForces, Attitude attEvents, MassProvider massProvider)
          Build a spacecraft state from orbit, attitude for forces and events computation and mass provider.
SpacecraftState(Orbit orbit, Attitude attForces, Attitude attEvents, MassProvider massProvider, Map<String,double[]> additionalStates)
          Build a spacecraft state from orbit, attitude for forces and events computation, mass provider and additional states map.
SpacecraftState(Orbit orbit, Attitude attitude, MassProvider massProvider)
          Build a spacecraft state from orbit, attitude and mass provider.
SpacecraftState(Orbit orbit, MassProvider massProvider)
          Create a new instance from orbit and mass provider.
 
Method Summary
 SpacecraftState addAdditionalState(String name, double[] state)
          Add an additional state to the additional states map.
 SpacecraftState addAttitude(Attitude newAttitude, AttitudeEquation.AttitudeType type)
           Add attitude to the additional states map.
 SpacecraftState addAttitudeToAdditionalStates(AttitudeEquation.AttitudeType attitudeType)
          Add attitude to the additional states map.
 SpacecraftState addMassProvider(MassProvider massProvider)
          Add the values of mass parts from MassProvider to additional states map.
static boolean equalsAddStates(Map<String,double[]> addStates1, Map<String,double[]> addStates2)
          Compares additional states.
 double getA()
          Get the semi-major axis.
 double[] getAdditionalState(String name)
          Get one additional state.
 Map<String,double[]> getAdditionalStates()
          Get additional states.
 Map<String,AdditionalStateInfo> getAdditionalStatesInfos()
          Get the additional states informations map.
 Map<String,double[]> getAdditionalStatesMass()
          Get additional states with the prefix "MASS_".
 Attitude getAttitude()
          Get the default attitude : the attitude for forces computation.
 Attitude getAttitude(Frame outputFrame)
          Get the default attitude : the attitude for forces computation in given output frame.
 Attitude getAttitude(LOFType lofType)
          Get the default attitude : the attitude for forces computation in given local orbital frame.
 Attitude getAttitudeEvents()
          Get the attitude for events computation.
 Attitude getAttitudeEvents(Frame outputFrame)
          Get the attitude for events computation in given output frame.
 Attitude getAttitudeEvents(LOFType lofType)
          Get the attitude for events computation in given local orbital frame.
 Attitude getAttitudeForces()
          Get the attitude for forces computation.
 Attitude getAttitudeForces(Frame outputFrame)
          Get the attitude for forces computation in given output frame.
 Attitude getAttitudeForces(LOFType lofType)
          Get the attitude for forces computation in given local orbital frame.
 AbsoluteDate getDate()
          Get the date.
 double getE()
          Get the eccentricity.
 double getEquinoctialEx()
          Get the first component of the eccentricity vector (as per equinoctial parameters).
 double getEquinoctialEy()
          Get the second component of the eccentricity vector (as per equinoctial parameters).
 Frame getFrame()
          Get the inertial frame.
 double getHx()
          Get the first component of the inclination vector (as per equinoctial parameters).
 double getHy()
          Get the second component of the inclination vector (as per equinoctial parameters).
 double getI()
          Get the inclination.
 double getKeplerianMeanMotion()
          Get the keplerian mean motion.
 double getKeplerianPeriod()
          Get the keplerian period.
 double getLE()
          Get the eccentric latitude argument (as per equinoctial parameters).
 double getLM()
          Get the mean latitude argument (as per equinoctial parameters).
 double getLv()
          Get the true latitude argument (as per equinoctial parameters).
 double getMass(String partName)
          Get the mass of the given part.
 double getMu()
          Get the central attraction coefficient.
 Orbit getOrbit()
          Gets the current orbit.
 PVCoordinates getPVCoordinates()
          Get the PVCoordinates in orbit definition frame.
 PVCoordinates getPVCoordinates(Frame outputFrame)
          Get the PVCoordinates in given output frame.
 int getStateVectorSize()
          Get the state vector size.
 SpacecraftState interpolate(AbsoluteDate date, Collection<SpacecraftState> sample)
          Get an interpolated instance.
 void mapStateToArray(OrbitType orbitType, PositionAngle angleType, double[] stateVector)
          Convert SpacecraftState to state vector.
 SpacecraftState shiftedBy(double dt)
          Get a time-shifted state.
 Transform toTransform()
          Compute the transform from orbit/attitude reference frame to spacecraft frame.
 Transform toTransform(Frame frame)
          Compute the transform from specified frame to spacecraft frame.
 Transform toTransform(Frame frame, LOFType lofType)
          Compute the transform from specified frame to local orbital frame.
 Transform toTransform(LOFType lofType)
          Compute the transform from orbit/attitude reference frame to local orbital frame.
 Transform toTransformEvents()
          Compute the transform from orbit/attitude (for events computation) reference frame to spacecraft frame.
 Transform toTransformEvents(Frame frame)
          Compute the transform from specified reference frame to spacecraft frame.
 Transform toTransformForces()
          Compute the transform from orbit/attitude (for forces computation) reference frame to spacecraft frame.
 Transform toTransformForces(Frame frame)
          Compute the transform from specified frame to spacecraft frame.
 SpacecraftState updateMass(String partName, double newMass)
          Update the mass of the given part.
 SpacecraftState updateOrbit(Orbit newOrbit)
          Update the orbit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MASS

public static final String MASS
Default prefix for additional state representing a mass.

See Also:
Constant Field Values

ORBIT_DIMENSION

public static final int ORBIT_DIMENSION
First index of the additional states.

See Also:
Constant Field Values
Constructor Detail

SpacecraftState

public SpacecraftState(Orbit orbit)
Build a spacecraft state from orbit only.

Attitude (for forces and events computation) are set to null values. No mass informations are added.

Parameters:
orbit - the orbit

SpacecraftState

public SpacecraftState(Orbit orbit,
                       Attitude attitude)
                throws IllegalArgumentException
Build a spacecraft state from orbit and a single attitude.

Attitude for forces computation is set to the input attitude. Attitude for events computation is set to null value. No mass informations are added.

Parameters:
orbit - the orbit
attitude - the default attitude
Throws:
IllegalArgumentException - if orbit and attitude dates or frames are not equal

SpacecraftState

public SpacecraftState(Orbit orbit,
                       MassProvider massProvider)
Create a new instance from orbit and mass provider.

Attitude (for forces and events computation) are set to null values.

The mass states informations contained in the mass provider are added to the additional states map with the name in the form "MASS_".

Parameters:
orbit - the orbit
massProvider - the mass provider

SpacecraftState

public SpacecraftState(Orbit orbit,
                       Attitude attitude,
                       MassProvider massProvider)
                throws IllegalArgumentException
Build a spacecraft state from orbit, attitude and mass provider.

Attitude for forces computation is set to the input attitude. Attitude for events computation is set to null value.

The mass states informations contained in the mass provider are added to the additional states list with the name in the form "MASS_".

Parameters:
orbit - the orbit
attitude - the default attitude
massProvider - the mass provider
Throws:
IllegalArgumentException - if orbit and attitude dates or frames are not equal

SpacecraftState

public SpacecraftState(Orbit orbit,
                       Attitude attForces,
                       Attitude attEvents)
                throws IllegalArgumentException
Build a spacecraft state from orbit, attitude for forces and events computation.

No mass informations are added.

Parameters:
orbit - the orbit
attForces - the attitude for forces computation
attEvents - the attitude for events computation
Throws:
IllegalArgumentException - if attitudeForces == null and attitudeEvents!= null if orbit and attitude dates or frames are not equal

SpacecraftState

public SpacecraftState(Orbit orbit,
                       Attitude attForces,
                       Attitude attEvents,
                       Map<String,double[]> addStates)
                throws IllegalArgumentException
Build a spacecraft state from orbit, attitude for forces and events computation and additional states map.

No mass informations are added.

Parameters:
orbit - the orbit
attForces - the attitude for forces computation
attEvents - the attitude for events computation
addStates - the additional states map
Throws:
IllegalArgumentException - if attitudeForces == null and attitudeEvents!= null if orbit and attitude dates or frames are not equal if attitude object and attitude in the additional states list map are not equal

SpacecraftState

public SpacecraftState(Orbit orbit,
                       Attitude attForces,
                       Attitude attEvents,
                       MassProvider massProvider)
                throws IllegalArgumentException
Build a spacecraft state from orbit, attitude for forces and events computation and mass provider.

The mass states informations contained in the mass provider are added to the additional states list with the name in the form "MASS_".

Parameters:
orbit - the orbit
attForces - the attitude for forces computation
attEvents - the attitude for events computation
massProvider - the mass provider
Throws:
IllegalArgumentException - if attitudeForces == null and attitudeEvents!= null if orbit and attitude dates or frames are not equal

SpacecraftState

public SpacecraftState(Orbit orbit,
                       Attitude attForces,
                       Attitude attEvents,
                       MassProvider massProvider,
                       Map<String,double[]> additionalStates)
                throws IllegalArgumentException
Build a spacecraft state from orbit, attitude for forces and events computation, mass provider and additional states map.

The mass states informations contained in the mass provider are added to the additional states list with the name in the form "MASS_". If an additional state is already defined with the same name as the mass provider state, the additional state is replaced with the informations from the mass provider.

Parameters:
orbit - the orbit
attForces - the attitude for forces computation
attEvents - the attitude for events computation
massProvider - the mass provider
additionalStates - the additional states
Throws:
IllegalArgumentException - if attitudeForces == null and attitudeEvents!= null if orbit and attitude dates or frames are not equal if attitude object and attitude in the additional states list map are not equal

SpacecraftState

public SpacecraftState(double[] y,
                       OrbitType orbitType,
                       PositionAngle angleType,
                       AbsoluteDate date,
                       double mu,
                       Frame frame,
                       Map<String,AdditionalStateInfo> addStatesInfo,
                       AttitudeProvider attProviderForces,
                       AttitudeProvider attProviderEvents)
                throws OrekitException
Build a spacecraft from an array (a state vector) and an additional states informations map.

If the additional state informations list contains a state with the prefix "ATTITUDE_FORCES" (or "ATTITUDE_EVENTS" or "ATTITUDE"), it means that the attitude for forces computation (or events computation) was added to the additional states map. Then the corresponding Attitude object is initialized with the additional state value. Otherwise, the Attitude is initialized using the corresponding AttitudeProvider.

Parameters:
y - the state vector
orbitType - the orbit type
angleType - the position angle type
date - the integration date
mu - central attraction coefficient used for propagation (m3/s2)
frame - frame in which integration is performed
addStatesInfo - the additional states informations map
attProviderForces - the attitude provider for forces computation
attProviderEvents - the attitude provider for events computation
Throws:
OrekitException - if attitude cannot be computed
Method Detail

addAdditionalState

public SpacecraftState addAdditionalState(String name,
                                          double[] state)
                                   throws OrekitException
Add an additional state to the additional states map.

If the additionalStates map already contained a mapping for the name entered, the old state is replaced by the specified state. It is not possible to add an additional state with "ATTITUDE_FORCES" or "ATTITUDE_EVENTS" or "ATTITTUDE" name : it is a reserved name.

SpacecraftState object state being immutable, a new SpacecraftState object is returned.

Parameters:
name - the additional state name
state - the additional state value
Returns:
a new SpacecraftState with the added additional state.
Throws:
OrekitException - if the name of the additional state to be added is "ATTITUDE_FORCES" or "ATTITUDE_EVENTS" or "ATTITUDE".

addAttitudeToAdditionalStates

public SpacecraftState addAttitudeToAdditionalStates(AttitudeEquation.AttitudeType attitudeType)
                                              throws OrekitException
Add attitude to the additional states map.

The additional state name could be "ATTITUDE_FORCES" if AttitudeEquation.AttitudeType.ATTITUDE_FORCES, "ATTITUDE_EVENTS" if AttitudeEquation.AttitudeType.ATTITUDE_EVENTS or "ATTITUDE" if AttitudeEquation.AttitudeType.ATTITUDE. If AttitudeType#ATTITUDE, the only one attitude available is added to the additional states map.

If an additional state with the name "ATTITUDE_FORCES", "ATTITUDE_EVENTS" or "ATTITUDE" is already in the additional state map, its value will be updated with the new one. The attitude additional state contains the rotation and the spin.

SpacecraftState object state being immutable, a new SpacecraftState object is returned.

Parameters:
attitudeType - one of AttitudeEquation.AttitudeType.ATTITUDE_FORCES or AttitudeEquation.AttitudeType.ATTITUDE_EVENTS or AttitudeEquation.AttitudeType.ATTITUDE
Returns:
a new SpacecraftState with the added additional state corresponding to an SpacecraftState attitude.
Throws:
OrekitException - if no attitude information is defined if additional states map contains (ATTITUDE_FORCES or ATTITUDE_EVENTS) state and ATTITUDE state.

addMassProvider

public SpacecraftState addMassProvider(MassProvider massProvider)
Add the values of mass parts from MassProvider to additional states map.

If the additional state map already contained an additional state from the input mass provider, its value will be updated with the new one.

SpacecraftState object state being immutable, a new SpacecraftState object is returned.

Parameters:
massProvider - the mass provider to add
Returns:
a new SpacecraftState with new additional states from mass provider

addAttitude

public SpacecraftState addAttitude(Attitude newAttitude,
                                   AttitudeEquation.AttitudeType type)

Add attitude to the additional states map. It is not possible to add an attitude for events computation if no attitude for forces computation is defined.

Be careful, additional states associated with attitude are not updated. The user should call addAttitudeToAdditionalStates to add it.

SpacecraftState object state being immutable, a new SpacecraftState object is returned.

Parameters:
newAttitude - the attitude to be added to the state
type - the attitude type
Returns:
a new state with added attitude (the initial state if newAttitude is null).
Throws:
IllegalArgumentException - if attitudeForces == null and attitudeEvents!= null
Since:
3.0

updateMass

public SpacecraftState updateMass(String partName,
                                  double newMass)
                           throws OrekitException
Update the mass of the given part.

SpacecraftState object state being immutable, a new SpacecraftState object is returned.

Parameters:
partName - given part
newMass - new mass of the given part
Returns:
a new SpacecraftState with an updated mass part
Throws:
OrekitException - if no mass informations already defined for the given part

updateOrbit

public SpacecraftState updateOrbit(Orbit newOrbit)
Update the orbit.

SpacecraftState object state being immutable, a new SpacecraftState object is returned.

Parameters:
newOrbit - the new orbit
Returns:
a new SpacecraftState with an updated orbit

shiftedBy

public SpacecraftState shiftedBy(double dt)
Get a time-shifted state.

The state can be slightly shifted to close dates. This shift is based on a simple keplerian model for orbit, a linear extrapolation for attitude taking the spin rate into account. It is not intended as a replacement for proper orbit and attitude propagation but should be sufficient for small time shifts or coarse accuracy.

WARNING : Additional states map is not changed (except for attitude objects if present) !

As a rough order of magnitude, the following table shows the interpolation errors obtained between this simple shift method and an Eckstein-Heschler propagator for an 800km altitude nearly circular polar Earth orbit with body center pointing. Beware that these results may be different for other orbits.

interpolation time (s) position error (m) velocity error (m/s) attitude error (°)
60 20 1 0.001
120 100 2 0.002
300 600 4 0.005
600 2000 6 0.008
900 4000 6 0.010

Specified by:
shiftedBy in interface TimeShiftable<SpacecraftState>
Parameters:
dt - time shift in seconds
Returns:
a new state, shifted with respect to the instance (which is immutable) except for the mass which stay unchanged

interpolate

public SpacecraftState interpolate(AbsoluteDate date,
                                   Collection<SpacecraftState> sample)
                            throws OrekitException
Get an interpolated instance.

The input sample SpacecraftState should have the same additional states size and name. If no attitudes are defined, an error is handled.

Note that the state of the current instance may not be used in the interpolation process, only its type and non interpolable fields are used (for example central attraction coefficient or frame when interpolating orbits). The interpolable fields taken into account are taken only from the states of the sample points. So if the state of the instance must be used, the instance should be included in the sample points.

Specified by:
interpolate in interface TimeInterpolable<SpacecraftState>
Parameters:
date - interpolation date
sample - sample points on which interpolation should be done
Returns:
a new instance, interpolated at specified date
Throws:
OrekitException - if the sample points are inconsistent if no attitudes are defined

getOrbit

public Orbit getOrbit()
Gets the current orbit.

Returns:
the orbit

getDate

public AbsoluteDate getDate()
Get the date.

Specified by:
getDate in interface TimeStamped
Returns:
date

getFrame

public Frame getFrame()
Get the inertial frame.

Returns:
the frame

toTransform

public Transform toTransform()
                      throws OrekitException
Compute the transform from orbit/attitude reference frame to spacecraft frame.

The spacecraft frame origin is at the point defined by the orbit, and its orientation is defined by the attitude.

Returns:
transform from inertial frame (where orbit/attitude are defined) to current spacecraft frame (attitude used for forces computation is the default attitude).
Throws:
OrekitException - if no attitude information is defined

toTransform

public Transform toTransform(Frame frame)
                      throws OrekitException
Compute the transform from specified frame to spacecraft frame.

The spacecraft frame origin is at the point defined by the orbit, and its orientation is defined by the attitude.

Parameters:
frame - input frame
Returns:
transform from specified frame to current spacecraft frame (attitude used for forces computation is the default attitude).
Throws:
OrekitException - if no attitude information is defined

toTransform

public Transform toTransform(LOFType lofType)
Compute the transform from orbit/attitude reference frame to local orbital frame.

Parameters:
lofType - the LOF type
Returns:
transform from inertial frame (where orbit/attitude are defined) to local orbital frame.

toTransform

public Transform toTransform(Frame frame,
                             LOFType lofType)
                      throws OrekitException
Compute the transform from specified frame to local orbital frame.

Parameters:
frame - input frame
lofType - the LOF type
Returns:
transform from from specified frame to local orbital frame
Throws:
OrekitException - if some frame specific error occurs

toTransformForces

public Transform toTransformForces()
                            throws OrekitException
Compute the transform from orbit/attitude (for forces computation) reference frame to spacecraft frame.

The spacecraft frame origin is at the point defined by the orbit, and its orientation is defined by the attitude.

Returns:
transform from inertial frame (where orbit/attitude are defined) to current spacecraft frame (attitude used for forces computation is the default attitude).
Throws:
OrekitException - if no attitude information is defined

toTransformForces

public Transform toTransformForces(Frame frame)
                            throws OrekitException
Compute the transform from specified frame to spacecraft frame.

The spacecraft frame origin is at the point defined by the orbit, and its orientation is defined by the attitude.

Parameters:
frame - input frame
Returns:
transform from specified frame to current spacecraft frame (attitude used for forces computation is the default attitude).
Throws:
OrekitException - if no attitude information is defined

toTransformEvents

public Transform toTransformEvents()
                            throws OrekitException
Compute the transform from orbit/attitude (for events computation) reference frame to spacecraft frame.

The spacecraft frame origin is at the point defined by the orbit, and its orientation is defined by the attitude.

Returns:
transform from inertial frame (where orbit/attitude are defined) to current spacecraft frame (same as toTransform if there is no specific attitude for Events).
Throws:
OrekitException - if no attitude information is defined

toTransformEvents

public Transform toTransformEvents(Frame frame)
                            throws OrekitException
Compute the transform from specified reference frame to spacecraft frame.

The spacecraft frame origin is at the point defined by the orbit, and its orientation is defined by the attitude.

Parameters:
frame - input frame
Returns:
transform from integration frame to current spacecraft frame (same as toTransform if there is no specific attitude for Events).
Throws:
OrekitException - if no attitude information is defined

getMu

public double getMu()
Get the central attraction coefficient.

Returns:
mu central attraction coefficient (m^3/s^2)

getKeplerianPeriod

public double getKeplerianPeriod()
Get the keplerian period.

The keplerian period is computed directly from semi major axis and central acceleration constant.

Returns:
keplerian period in seconds

getKeplerianMeanMotion

public double getKeplerianMeanMotion()
Get the keplerian mean motion.

The keplerian mean motion is computed directly from semi major axis and central acceleration constant.

Returns:
keplerian mean motion in radians per second

getA

public double getA()
Get the semi-major axis.

Returns:
semi-major axis (m)

getEquinoctialEx

public double getEquinoctialEx()
Get the first component of the eccentricity vector (as per equinoctial parameters).

Returns:
e cos(ω + Ω), first component of eccentricity vector
See Also:
getE()

getEquinoctialEy

public double getEquinoctialEy()
Get the second component of the eccentricity vector (as per equinoctial parameters).

Returns:
e sin(ω + Ω), second component of the eccentricity vector
See Also:
getE()

getHx

public double getHx()
Get the first component of the inclination vector (as per equinoctial parameters).

Returns:
tan(i/2) cos(Ω), first component of the inclination vector
See Also:
getI()

getHy

public double getHy()
Get the second component of the inclination vector (as per equinoctial parameters).

Returns:
tan(i/2) sin(Ω), second component of the inclination vector
See Also:
getI()

getLv

public double getLv()
Get the true latitude argument (as per equinoctial parameters).

Returns:
v + ω + Ω true latitude argument (rad)
See Also:
getLE(), getLM()

getLE

public double getLE()
Get the eccentric latitude argument (as per equinoctial parameters).

Returns:
E + ω + Ω eccentric latitude argument (rad)
See Also:
getLv(), getLM()

getLM

public double getLM()
Get the mean latitude argument (as per equinoctial parameters).

Returns:
M + ω + Ω mean latitude argument (rad)
See Also:
getLv(), getLE()

getE

public double getE()
Get the eccentricity.

Returns:
eccentricity
See Also:
getEquinoctialEx(), getEquinoctialEy()

getI

public double getI()
Get the inclination.

Returns:
inclination (rad)
See Also:
getHx(), getHy()

getPVCoordinates

public PVCoordinates getPVCoordinates()
Get the PVCoordinates in orbit definition frame. Compute the position and velocity of the satellite. This method caches its results, and recompute them only when the method is called with a new value for mu. The result is provided as a reference to the internally cached PVCoordinates, so the caller is responsible to copy it in a separate PVCoordinates if it needs to keep the value for a while.

Returns:
pvCoordinates in orbit definition frame

getPVCoordinates

public PVCoordinates getPVCoordinates(Frame outputFrame)
                               throws OrekitException
Get the PVCoordinates in given output frame. Compute the position and velocity of the satellite. This method caches its results, and recompute them only when the method is called with a new value for mu. The result is provided as a reference to the internally cached PVCoordinates, so the caller is responsible to copy it in a separate PVCoordinates if it needs to keep the value for a while.

Parameters:
outputFrame - frame in which coordinates should be defined
Returns:
pvCoordinates in orbit definition frame
Throws:
OrekitException - if the transformation between frames cannot be computed

getAttitude

public Attitude getAttitude()
Get the default attitude : the attitude for forces computation.

Returns:
the attitude for forces computation.

getAttitude

public Attitude getAttitude(Frame outputFrame)
                     throws OrekitException
Get the default attitude : the attitude for forces computation in given output frame.

Parameters:
outputFrame - frame in which the attitude is wanted
Returns:
the attitude for force computation in the output frame
Throws:
OrekitException - if conversion between reference frames fails

getAttitude

public Attitude getAttitude(LOFType lofType)
                     throws OrekitException
Get the default attitude : the attitude for forces computation in given local orbital frame.

Warning: this method creates a new local orbital frame at each call. For multiple calls, prefer using getAttitude(Frame) with your own LocalOrbitalFrame.

Parameters:
lofType - the LOF type
Returns:
the default attitude in the local orbital frame
Throws:
OrekitException - if conversion between reference frames fails

getAttitudeForces

public Attitude getAttitudeForces()
Get the attitude for forces computation.

Returns:
the attitude for forces computation.

getAttitudeForces

public Attitude getAttitudeForces(Frame outputFrame)
                           throws OrekitException
Get the attitude for forces computation in given output frame.

Parameters:
outputFrame - frame in which the attitude is wanted
Returns:
the attitude for force computation in the output frame
Throws:
OrekitException - if conversion between reference frames fails

getAttitudeForces

public Attitude getAttitudeForces(LOFType lofType)
                           throws OrekitException
Get the attitude for forces computation in given local orbital frame.

Warning: this method creates a new local orbital frame at each call. For multiple calls, prefer using getAttitude(Frame) with your own LocalOrbitalFrame.

Parameters:
lofType - the LOF type
Returns:
the attitude for forces computation in the local orbital frame
Throws:
OrekitException - if conversion between reference frames fails

getAttitudeEvents

public Attitude getAttitudeEvents()
Get the attitude for events computation.

Returns:
the attitude for events computation (same as getAttitude() if there is no specific attitude for Events).

getAttitudeEvents

public Attitude getAttitudeEvents(Frame outputFrame)
                           throws OrekitException
Get the attitude for events computation in given output frame.

Parameters:
outputFrame - frame in which the attitude is wanted
Returns:
the attitude for events computation in the output frame (same as getAttitude(Frame) if there is no specific attitude for Events).
Throws:
OrekitException - if conversion between reference frames fails

getAttitudeEvents

public Attitude getAttitudeEvents(LOFType lofType)
                           throws OrekitException
Get the attitude for events computation in given local orbital frame.

Warning: this method creates a new local orbital frame at each call. For multiple calls, prefer using getAttitude(Frame) with your own LocalOrbitalFrame.

Parameters:
lofType - the LOF type
Returns:
the attitude for events computation in the local orbital frame (same as getAttitude(LOFType) if there is no specific attitude for Events).
Throws:
OrekitException - if conversion between reference frames fails

getMass

public double getMass(String partName)
               throws OrekitException
Get the mass of the given part.

Parameters:
partName - given part
Returns:
mass of part
Throws:
OrekitException - if no mass informations defined for the given part.

getAdditionalStates

public Map<String,double[]> getAdditionalStates()
Get additional states.

Returns:
the additional states

getAdditionalStatesMass

public Map<String,double[]> getAdditionalStatesMass()
Get additional states with the prefix "MASS_".

Returns:
the additional states with the prefix "MASS_".

getAdditionalState

public double[] getAdditionalState(String name)
                            throws OrekitException
Get one additional state.

Parameters:
name - additional state name.
Returns:
the additional state
Throws:
OrekitException - if the input additional state name is unknown

getAdditionalStatesInfos

public Map<String,AdditionalStateInfo> getAdditionalStatesInfos()
Get the additional states informations map.

Returns:
the additional states informations.

mapStateToArray

public void mapStateToArray(OrbitType orbitType,
                            PositionAngle angleType,
                            double[] stateVector)
Convert SpacecraftState to state vector.

Parameters:
orbitType - the orbital parameters types
angleType - the position angles type
stateVector - flat array into which the state vector should be mapped

equalsAddStates

public static boolean equalsAddStates(Map<String,double[]> addStates1,
                                      Map<String,double[]> addStates2)
Compares additional states. This method checks additional state vector has the same keys (not same values).

Parameters:
addStates1 - the first additional states to compare
addStates2 - the second additional states to compare
Returns:
isEqual equals true if additional states are equal.

getStateVectorSize

public int getStateVectorSize()
Get the state vector size.

Returns:
the state vector size.


Copyright © 2017 CNES. All Rights Reserved.