|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.orekit.propagation.AbstractPropagator
public abstract class AbstractPropagator
Common handling of Propagator methods for analytical-like 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 three methods must be implemented by
derived classes: getInitialState(), basicPropagate(AbsoluteDate)
and Propagator.resetInitialState(SpacecraftState). The second method should perform
straightforward propagation starting from some internally stored initial state
up to the specified target date. The third method should reset the initial state
when called.
| Field Summary |
|---|
| Fields inherited from interface org.orekit.propagation.Propagator |
|---|
EPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE |
| Constructor Summary | |
|---|---|
protected |
AbstractPropagator()
Build a new instance. |
| Method Summary | |
|---|---|
protected CombinedEventsDetectorsManager |
addEndDateChecker(AbsoluteDate startDate,
AbsoluteDate endDate,
CombinedEventsDetectorsManager manager)
Add an event handler for end date checking. |
void |
addEventDetector(EventDetector detector)
Add an event detector. |
protected abstract SpacecraftState |
basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features. |
void |
clearEventsDetectors()
Remove all events detectors. |
java.util.Collection<EventDetector> |
getEventsDetectors()
Get all the events detectors that have been added. |
BoundedPropagator |
getGeneratedEphemeris()
Get the ephemeris generated during propagation. |
abstract 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. |
SpacecraftState |
propagate(AbsoluteDate target)
Propagate towards a target date. |
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 |
setSlaveMode()
Set the propagator to slave mode. |
| 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 |
|---|
resetInitialState |
| Constructor Detail |
|---|
protected AbstractPropagator()
| Method Detail |
|---|
public int getMode()
getMode in interface PropagatorPropagator.SLAVE_MODE, Propagator.MASTER_MODE,
Propagator.EPHEMERIS_GENERATION_MODEPropagator.setSlaveMode(),
Propagator.setMasterMode(double, OrekitFixedStepHandler),
Propagator.setMasterMode(OrekitStepHandler),
Propagator.setEphemerisMode()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 PropagatorPropagator.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 Propagatorh - fixed stepsize (s)handler - handler called at the end of each finalized stepPropagator.setSlaveMode(),
Propagator.setMasterMode(OrekitStepHandler),
Propagator.setEphemerisMode(),
Propagator.getMode(),
Propagator.MASTER_MODEpublic 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 Propagatorhandler - handler called at the end of each finalized stepPropagator.setSlaveMode(),
Propagator.setMasterMode(double, OrekitFixedStepHandler),
Propagator.setEphemerisMode(),
Propagator.getMode(),
Propagator.MASTER_MODEpublic 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 PropagatorPropagator.getGeneratedEphemeris(),
Propagator.setSlaveMode(),
Propagator.setMasterMode(double, OrekitFixedStepHandler),
Propagator.setMasterMode(OrekitStepHandler),
Propagator.getMode(),
Propagator.EPHEMERIS_GENERATION_MODEpublic BoundedPropagator getGeneratedEphemeris()
getGeneratedEphemeris in interface PropagatorPropagator.setEphemerisMode()public void addEventDetector(EventDetector detector)
addEventDetector in interface Propagatordetector - event detector to addPropagator.clearEventsDetectors(),
Propagator.getEventsDetectors()public java.util.Collection<EventDetector> getEventsDetectors()
getEventsDetectors in interface PropagatorPropagator.addEventDetector(EventDetector),
Propagator.clearEventsDetectors()public void clearEventsDetectors()
clearEventsDetectors in interface PropagatorPropagator.addEventDetector(EventDetector),
Propagator.getEventsDetectors()
public 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 like the
ones implemented the extended interface Propagator 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 BasicPropagatortarget - target date towards which orbit state should be propagated
PropagationException - if state cannot be propagated
public PVCoordinates getPVCoordinates(AbsoluteDate date,
Frame frame)
throws OrekitException
PVCoordinates of the body in the selected frame.
getPVCoordinates in interface PVCoordinatesProviderdate - current dateframe - the frame where to define the position
OrekitException - if position cannot be computed in given framepublic abstract SpacecraftState getInitialState()
getInitialState in interface Propagator
protected abstract 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 date
protected CombinedEventsDetectorsManager addEndDateChecker(AbsoluteDate startDate,
AbsoluteDate endDate,
CombinedEventsDetectorsManager manager)
This method can be used to simplify handling of integration end date. It leverages the nominal stop condition with the exceptional stop conditions.
startDate - propagation start dateendDate - desired end datemanager - manager containing the user-defined handlers
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||