|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.propagation.AbstractPropagator
public abstract class AbstractPropagator
Common handling of Propagator
methods for analytical propagators.
This abstract class allows to provide easily the full set of Propagator
methods, including all propagation modes support and discrete events support for
any simple propagation method. Only one method must be implemented by derived
classes: propagateOrbit(AbsoluteDate)
.
The first method should perform straightforward propagation starting from some
internally stored initial state up to the specified target date.
Field Summary | |
---|---|
static String |
MASS
Default prefix for additional state provider from MassProvider. |
Fields inherited from interface org.orekit.propagation.Propagator |
---|
EPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE |
Constructor Summary | |
---|---|
protected |
AbstractPropagator(AttitudeProvider attitudeProvider)
Build a new instance. |
protected |
AbstractPropagator(AttitudeProvider attitudeProviderForces,
AttitudeProvider attitudeProviderEvents)
Build a new instance. |
Method Summary | |
---|---|
protected SpacecraftState |
acceptStep(AbsoluteDate target,
double epsilon)
Accept a step, triggering events and step handlers. |
void |
addAdditionalStateProvider(AdditionalStateProvider additionalStateProvider)
Add a set of user-specified state parameters to be computed along with the orbit propagation. |
void |
addAdditionalStateProvider(MassProvider massProvider)
Add a set of state parameters from MassProvider to be computed along with the orbit propagation. |
void |
addEventDetector(EventDetector detector)
Add an event detector. |
protected SpacecraftState |
basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features. |
void |
clearEventsDetectors()
Remove all events detectors. |
AttitudeProvider |
getAttitudeProvider()
Get attitude provider. |
AttitudeProvider |
getAttitudeProviderEvents()
Get attitude provider for events computation. |
AttitudeProvider |
getAttitudeProviderForces()
Get attitude provider for forces computation. |
Collection<EventDetector> |
getEventsDetectors()
Get all the events detectors that have been added. |
Frame |
getFrame()
Get the frame in which the orbit is propagated. |
BoundedPropagator |
getGeneratedEphemeris()
Get the ephemeris generated during propagation. |
SpacecraftState |
getInitialState()
Get the propagator initial state. |
int |
getMode()
Get the current operating mode of the propagator. |
PVCoordinates |
getPVCoordinates(AbsoluteDate date,
Frame frame)
Get the PVCoordinates of the body in the selected frame. |
PVCoordinatesProvider |
getPvProvider()
Get PV coordinates provider. |
protected void |
manageStateFrame()
Manage the state frame : the orbit to propagate is converted in the propagation frame. |
SpacecraftState |
propagate(AbsoluteDate target)
Propagate towards a target date. |
SpacecraftState |
propagate(AbsoluteDate start,
AbsoluteDate target)
Propagate from a start date towards a target date. |
protected abstract 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. |
void |
setEphemerisMode()
Set the propagator to ephemeris generation mode. |
void |
setMasterMode(double h,
OrekitFixedStepHandler handler)
Set the propagator to master mode with fixed steps. |
void |
setMasterMode(OrekitStepHandler handler)
Set the propagator to master mode with variable steps. |
void |
setOrbitFrame(Frame frame)
Set propagation frame. |
void |
setSlaveMode()
Set the propagator to slave mode. |
protected void |
setStartDate(AbsoluteDate startDate)
Set a start date. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MASS
Constructor Detail |
---|
protected AbstractPropagator(AttitudeProvider attitudeProvider)
attitudeProvider
- provider for attitude computation in case of both forces and events computationprotected AbstractPropagator(AttitudeProvider attitudeProviderForces, AttitudeProvider attitudeProviderEvents)
attitudeProviderForces
- provider for attitude computation in case of forces computationattitudeProviderEvents
- provider for attitude computation in case of events computationMethod Detail |
---|
protected void setStartDate(AbsoluteDate startDate)
startDate
- start datepublic AttitudeProvider getAttitudeProvider()
getAttitudeProvider
in interface Propagator
public AttitudeProvider getAttitudeProviderForces()
getAttitudeProviderForces
in interface Propagator
public AttitudeProvider getAttitudeProviderEvents()
getAttitudeProviderEvents
in interface Propagator
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
ConstantAttitudeLaw
.
setAttitudeProvider
in interface Propagator
attitudeProvider
- attitude providerpublic void setAttitudeProviderForces(AttitudeProvider attProviderForces)
ConstantAttitudeLaw
.
setAttitudeProviderForces
in interface Propagator
attProviderForces
- attitude provider for forces computationpublic void setAttitudeProviderEvents(AttitudeProvider attProviderEvents)
ConstantAttitudeLaw
.
setAttitudeProviderEvents
in interface Propagator
attProviderEvents
- attitude provider for events computationpublic void setOrbitFrame(Frame frame) throws OrekitException
setOrbitFrame
in interface Propagator
frame
- the frame to use.
This frame must be inertial or pseudo-inertial, otherwise an exception is raised.
OrekitException
- if frame is not inertial or pseudo-inertialpublic PVCoordinatesProvider getPvProvider()
public SpacecraftState getInitialState() throws OrekitException
getInitialState
in interface Propagator
OrekitException
- if state cannot be retrievedpublic int getMode()
getMode
in interface Propagator
Propagator.SLAVE_MODE
, Propagator.MASTER_MODE
,
Propagator.EPHEMERIS_GENERATION_MODE
Propagator.setSlaveMode()
,
Propagator.setMasterMode(double, OrekitFixedStepHandler)
,
Propagator.setMasterMode(OrekitStepHandler)
,
Propagator.setEphemerisMode()
public Frame getFrame()
4 cases are possible:
Propagator.setOrbitFrame(Frame)
): it is returned.
getFrame
in interface Propagator
public void setSlaveMode()
This mode is used when the user needs only the final orbit at the target time. The (slave) propagator computes this result and return it to the calling (master) application, without any intermediate feedback.
This is the default mode.
setSlaveMode
in interface Propagator
Propagator.setMasterMode(double, OrekitFixedStepHandler)
,
Propagator.setMasterMode(OrekitStepHandler)
,
Propagator.setEphemerisMode()
,
Propagator.getMode()
,
Propagator.SLAVE_MODE
public void setMasterMode(double h, OrekitFixedStepHandler handler)
This mode is used when the user needs to have some custom function called at the end of each finalized step during integration. The (master) propagator integration loop calls the (slave) application callback methods at each finalized step.
setMasterMode
in interface Propagator
h
- fixed stepsize (s)handler
- handler called at the end of each finalized stepPropagator.setSlaveMode()
,
Propagator.setMasterMode(OrekitStepHandler)
,
Propagator.setEphemerisMode()
,
Propagator.getMode()
,
Propagator.MASTER_MODE
public void setMasterMode(OrekitStepHandler handler)
This mode is used when the user needs to have some custom function called at the end of each finalized step during integration. The (master) propagator integration loop calls the (slave) application callback methods at each finalized step.
setMasterMode
in interface Propagator
handler
- handler called at the end of each finalized stepPropagator.setSlaveMode()
,
Propagator.setMasterMode(double, OrekitFixedStepHandler)
,
Propagator.setEphemerisMode()
,
Propagator.getMode()
,
Propagator.MASTER_MODE
public void setEphemerisMode()
This mode is used when the user needs random access to the orbit state at any time between the initial and target times, and in no sequential order. A typical example is the implementation of search and iterative algorithms that may navigate forward and backward inside the propagation range before finding their result.
Beware that since this mode stores all intermediate results, it may be memory intensive for long integration ranges and high precision/short time steps.
setEphemerisMode
in interface Propagator
Propagator.getGeneratedEphemeris()
,
Propagator.setSlaveMode()
,
Propagator.setMasterMode(double, OrekitFixedStepHandler)
,
Propagator.setMasterMode(OrekitStepHandler)
,
Propagator.getMode()
,
Propagator.EPHEMERIS_GENERATION_MODE
public BoundedPropagator getGeneratedEphemeris()
getGeneratedEphemeris
in interface Propagator
Propagator.setEphemerisMode()
public void addEventDetector(EventDetector detector)
addEventDetector
in interface Propagator
detector
- event detector to addPropagator.clearEventsDetectors()
,
Propagator.getEventsDetectors()
public Collection<EventDetector> getEventsDetectors()
getEventsDetectors
in interface Propagator
Propagator.addEventDetector(EventDetector)
,
Propagator.clearEventsDetectors()
public void clearEventsDetectors()
clearEventsDetectors
in interface Propagator
Propagator.addEventDetector(EventDetector)
,
Propagator.getEventsDetectors()
public void addAdditionalStateProvider(AdditionalStateProvider additionalStateProvider)
additionalStateProvider
- provider for additional statepublic void addAdditionalStateProvider(MassProvider massProvider)
massProvider
- mass provider for additional statepublic SpacecraftState propagate(AbsoluteDate target) throws PropagationException
Simple propagators use only the target date as the specification for computing the propagated state. More feature rich propagators can consider other information and provide different operating modes or G-stop facilities to stop at pinpointed events occurrences. In these cases, the target date is only a hint, not a mandatory objective.
propagate
in interface Propagator
target
- target date towards which orbit state should be propagated
PropagationException
- if state cannot be propagatedpublic SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws PropagationException
Those propagators use a start date and a target date to compute the propagated state. For propagators using event detection mechanism, if the provided start date is different from the initial state date, a first, simple propagation is performed, without processing any event computation. Then complete propagation is performed from start date to target date.
propagate
in interface Propagator
start
- start date from which orbit state should be propagatedtarget
- target date to which orbit state should be propagated
PropagationException
- if state cannot be propagatedprotected SpacecraftState acceptStep(AbsoluteDate target, double epsilon) throws OrekitException, TooManyEvaluationsException, NoBracketingException
target
- final propagation timeepsilon
- threshold for end date detection
OrekitException
- if the switching function cannot be evaluated
TooManyEvaluationsException
- if an event cannot be located
NoBracketingException
- if bracketing cannot be performedprotected void manageStateFrame() throws OrekitException
OrekitException
- if the frame of the initial state is not inertial or pseudo-inertialpublic PVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame) throws OrekitException
PVCoordinates
of the body in the selected frame.
getPVCoordinates
in interface PVCoordinatesProvider
date
- current dateframe
- the frame where to define the position
OrekitException
- if position cannot be computed in given frameprotected SpacecraftState basicPropagate(AbsoluteDate date) throws PropagationException
This method is similar in spirit to the 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.
date
- target date for propagation
PropagationException
- if propagation cannot reach specified dateprotected abstract Orbit propagateOrbit(AbsoluteDate date) throws PropagationException
date
- target date for the orbit
PropagationException
- if some parameters are out of boundspublic void resetInitialState(SpacecraftState state) throws PropagationException
resetInitialState
in interface Propagator
state
- new initial state to consider
PropagationException
- if initial state cannot be reset
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |