|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.orekit.propagation.AbstractPropagator
org.orekit.propagation.precomputed.AbstractEphemeris
public abstract class AbstractEphemeris
This class handles tabulated spacecraft states entries (either from a pv coordinates provider and an attitude provider or a spacecraft states array). Tabulated entries should be chronologically classified in a increasing way. Within the interval of validity, interpolation can be performed in order to obtain continuous outputs. Two classes exist : LagrangeEphemeris and HermiteEphemeris extends this one. Important note : the validity interval of the extrapolated points can be different than the time interval because the interpolation can require a different number of interpolation points The methods getMinDate() and getMaxDate() give the boundaries of the effective validity interval (inherit from interface BoundedPropagator)
Field Summary | |
---|---|
protected boolean |
areAddStatesSupported
True if the spacecraft states contains additional states. |
protected boolean |
areAttitudesSupported
True if the spacecraft states contains one or two attitudes. |
protected static int |
DEFAULT_INTERPOLATION_ORDER
Default number of interpolated points. |
protected static int |
DEFAULT_PREVIOUS_INDEX
Default previous index. |
protected double[] |
durationFromTab
The array of time duration from the first entry of data, chronologically sorted. |
protected Frame |
frame
Reference frame. |
protected AbsoluteDateInterval |
interpolationInterval
Ephemeris interval of validity. |
protected int |
interpOrder
Interpolation order. |
protected boolean |
isFirstIntervalInterp
True if it is the first interpolation on this interval. |
protected AbsoluteDate |
maxDate
Last date in range. |
protected AbsoluteDate |
minDate
First date in range. |
protected double |
mu
Mu. |
protected int |
previousIndex
At each call, the index is kept. |
protected ISearchIndex |
sortingAlgorithm
Search index algorithm. |
protected SpacecraftState[] |
stateTab
The SpacecraftStates array, chronologically sorted. |
Fields inherited from class org.orekit.propagation.AbstractPropagator |
---|
MASS |
Fields inherited from interface org.orekit.propagation.Propagator |
---|
EPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE |
Constructor Summary | |
---|---|
AbstractEphemeris(SpacecraftState[] tab)
Simple constructor of class AbstractEphemeris, with interpolation order equal to 2. |
|
AbstractEphemeris(SpacecraftState[] tab,
int order)
Simple constructor of class AbstractEphemeris with defined interpolation order. |
|
AbstractEphemeris(SpacecraftState[] tab,
int order,
ISearchIndex algo)
Constructor of class AbstractEphemeris where a search index algorithm is passed on the constructor. |
|
AbstractEphemeris(SpacecraftState[] tab,
ISearchIndex algo)
Constructor of class AbstractEphemeris where a search index algorithm is passed on the constructor and the order is by default equal to 2. |
Method Summary | |
---|---|
protected Attitude[] |
attitudesInterpolation(SpacecraftState[] tab,
int order,
int i0,
AbsoluteDate date)
This method is called only if attitudes are supported. |
protected SpacecraftState |
basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features. |
protected SpacecraftState |
checkBounds(double date)
Returns spacecraftstate on bounds if duration is on bounds. |
protected double[] |
convertTab(SpacecraftState[] tab,
int order)
Convert the SpacecraftState[] into a double[] which represents the duration from the first state date. |
static SpacecraftState[] |
generateSpacecraftState(PVCoordinatesProvider pvProv,
AttitudeProvider attProvForces,
AttitudeProvider attProvEvents,
double step,
AbsoluteDateInterval ptsInterval,
Frame frame,
double mu)
Creates a spacecraft array with constant step size. |
SpacecraftState |
getInitialState()
Get the propagator initial state. |
protected abstract SpacecraftState |
getInterpolatedSpacecraftState(AbsoluteDate date)
Get the interpolated spacecraft state. |
AbsoluteDate |
getMaxDate()
Get the last date of the range. |
AbsoluteDate |
getMinDate()
Get the first date of the range. |
protected int |
indexValidity(SpacecraftState[] tab,
int index)
Checks if interpolation is valid : meaning if 0<= index +1 -interpOrder/2 or index + interpOrder/2 <= maximalIndex |
protected AbsoluteDateInterval |
intervalValidity(SpacecraftState[] tab)
Corrects the min and max dates with the constraint of the number of interpolations points required. |
protected Orbit |
propagateOrbit(AbsoluteDate date)
Extrapolate an orbit up to a specific target date. |
void |
resetInitialState(SpacecraftState state)
Reset the propagator initial state. |
void |
setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider for forces and events computation. |
void |
setAttitudeProviderEvents(AttitudeProvider attProviderEvents)
Set attitude provider for events computation. |
void |
setAttitudeProviderForces(AttitudeProvider attProviderForces)
Set attitude provider for forces computation. |
Methods inherited from class org.orekit.propagation.AbstractPropagator |
---|
acceptStep, addAdditionalStateProvider, addAdditionalStateProvider, addEventDetector, clearEventsDetectors, getAttitudeProvider, getAttitudeProviderEvents, getAttitudeProviderForces, getEventsDetectors, getFrame, getGeneratedEphemeris, getMode, getPVCoordinates, getPvProvider, manageStateFrame, propagate, propagate, setEphemerisMode, setMasterMode, setMasterMode, setOrbitFrame, setSlaveMode, setStartDate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.orekit.propagation.Propagator |
---|
addEventDetector, clearEventsDetectors, getAttitudeProvider, getAttitudeProviderEvents, getAttitudeProviderForces, getEventsDetectors, getFrame, getGeneratedEphemeris, getMode, propagate, propagate, setEphemerisMode, setMasterMode, setMasterMode, setOrbitFrame, setSlaveMode |
Methods inherited from interface org.orekit.utils.PVCoordinatesProvider |
---|
getPVCoordinates |
Field Detail |
---|
protected static final int DEFAULT_INTERPOLATION_ORDER
protected static final int DEFAULT_PREVIOUS_INDEX
protected ISearchIndex sortingAlgorithm
protected AbsoluteDate minDate
protected AbsoluteDate maxDate
protected boolean areAddStatesSupported
protected boolean areAttitudesSupported
protected boolean isFirstIntervalInterp
protected AbsoluteDateInterval interpolationInterval
protected final int interpOrder
protected SpacecraftState[] stateTab
protected double[] durationFromTab
protected double mu
protected Frame frame
protected int previousIndex
Constructor Detail |
---|
public AbstractEphemeris(SpacecraftState[] tab) throws OrekitException
tab
- : a SpacecraftState[] sorted by chronological order (duplicates are allowed)
OrekitException
- if the tab is does not contains at least (order) points
if order < 2 (should never happen)
if the list of additional states does not always contain the same namespublic AbstractEphemeris(SpacecraftState[] tab, int order) throws OrekitException
tab
- : a SpacecraftState[] sorted by chronological order (duplicates are allowed)order
- : interpolation order. For example, it equals 2 for an Hermite interpolation,
and should be even for a Lagrange interpolation.
OrekitException
- if the tab is does not contains at least (order) points
if order < 2
if the list of additional states does not always contain the same namespublic AbstractEphemeris(SpacecraftState[] tab, ISearchIndex algo) throws OrekitException
tab
- : a SpacecraftState[] sorted by chronological order (duplicates are allowed)algo
- : an instance of a class implementing ISearchIndex. Contains the search index algorithm to use.
If null, a search index algorithm by default as a BinarySearchIndexOpenClosed is created.
OrekitException
- if order < 2
if the list of additional states does not always contain the same namespublic AbstractEphemeris(SpacecraftState[] tab, int order, ISearchIndex algo) throws OrekitException
tab
- : a SpacecraftState[] sorted by chronological order (duplicates are allowed)order
- : interpolation order. For example, it equals 2 for an Hermite interpolation,
and should be even for a Lagrange interpolation.algo
- : an instance of a class implementing ISearchIndex. Contains the search index algorithm to use.
If null, a search index algorithm by default as a BinarySearchIndexOpenClosed is created.
OrekitException
- if order < 2
if the list of additional states does not always contain the same namesMethod Detail |
---|
public AbsoluteDate getMinDate()
getMinDate
in interface BoundedPropagator
public AbsoluteDate getMaxDate()
getMaxDate
in interface BoundedPropagator
protected double[] convertTab(SpacecraftState[] tab, int order) throws OrekitException
tab
- the SpacecraftState array in inputorder
- : interpolation order. To do the interpolation, tab should have at least (order) points
OrekitException
- if the tab has less than order elementsprotected Attitude[] attitudesInterpolation(SpacecraftState[] tab, int order, int i0, AbsoluteDate date) throws OrekitException
tab
- : the spacecraftstate array, already sorted.order
- : number of points for interpolation.
For a Lagrange interpolation, it has to be even.
For an Hermite interpolation, it is equal to 2.i0
- : index associated with date.date
- : the date where the interpolation is done.
OrekitException
- should never happenprotected AbsoluteDateInterval intervalValidity(SpacecraftState[] tab) throws OrekitException
tab
- : the spacecraftstate array, already chronologically sorted.
OrekitException
- if order < 2protected int indexValidity(SpacecraftState[] tab, int index) throws OrekitException
tab
- : the SpacecraftState array, already chronologically sorted.index
- : the closest spacecraft state from a given date.
OrekitException
- if the index does not allow enough point to do the interpolation.protected SpacecraftState checkBounds(double date)
date
- duration
public static SpacecraftState[] generateSpacecraftState(PVCoordinatesProvider pvProv, AttitudeProvider attProvForces, AttitudeProvider attProvEvents, double step, AbsoluteDateInterval ptsInterval, Frame frame, double mu) throws OrekitException
pvProv
- pv coordinates providerattProvForces
- attitude provider for forces computationattProvEvents
- attitude provider for events computationstep
- step sizeptsInterval
- time interval the array should coverframe
- reference framemu
- mu
OrekitException
- if default attitude cannot be computed (when attProv is null)protected abstract SpacecraftState getInterpolatedSpacecraftState(AbsoluteDate date) throws OrekitException
WARNING: when implementing this method. a call to checkBounds(double)
should be performed
first to properly handle date on bounds since none of search index convention are able to properly handle
both bounds.
date
- interpolation date
OrekitException
- bcs of class SimpleTimeStampArrayprotected SpacecraftState basicPropagate(AbsoluteDate date) throws PropagationException
AbstractPropagator
This method is similar in spirit to the AbstractPropagator.propagate(org.orekit.time.AbsoluteDate)
method,
except that it does not call any handler during
propagation, nor any discrete events. It always stop exactly at
the specified date.
basicPropagate
in class AbstractPropagator
date
- target date for propagation
PropagationException
- if propagation cannot reach specified dateprotected Orbit propagateOrbit(AbsoluteDate date) throws PropagationException
AbstractPropagator
propagateOrbit
in class AbstractPropagator
date
- target date for the orbit
PropagationException
- if some parameters are out of boundspublic SpacecraftState getInitialState() throws OrekitException
getInitialState
in interface Propagator
getInitialState
in class AbstractPropagator
OrekitException
- if state cannot be retrievedpublic void resetInitialState(SpacecraftState state) throws PropagationException
resetInitialState
in interface Propagator
resetInitialState
in class AbstractPropagator
state
- new initial state to consider
PropagationException
- if initial state cannot be resetpublic void setAttitudeProvider(AttitudeProvider attitudeProvider)
AbstractPropagator
ConstantAttitudeLaw
.
setAttitudeProvider
in interface Propagator
setAttitudeProvider
in class AbstractPropagator
attitudeProvider
- attitude providerpublic void setAttitudeProviderForces(AttitudeProvider attProviderForces)
AbstractPropagator
ConstantAttitudeLaw
.
setAttitudeProviderForces
in interface Propagator
setAttitudeProviderForces
in class AbstractPropagator
attProviderForces
- attitude provider for forces computationpublic void setAttitudeProviderEvents(AttitudeProvider attProviderEvents)
AbstractPropagator
ConstantAttitudeLaw
.
setAttitudeProviderEvents
in interface Propagator
setAttitudeProviderEvents
in class AbstractPropagator
attProviderEvents
- attitude provider for events computation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |