Class AdapterPropagator
- java.lang.Object
-
- org.orekit.propagation.AbstractPropagator
-
- org.orekit.propagation.analytical.AbstractAnalyticalPropagator
-
- org.orekit.propagation.analytical.AdapterPropagator
-
- All Implemented Interfaces:
Propagator
,PVCoordinatesProvider
public class AdapterPropagator extends AbstractAnalyticalPropagator
Orbit propagator that adapts an underlying propagator, addingdifferential effects
.This propagator is used when a reference propagator does not handle some effects that we need. A typical example would be an ephemeris that was computed for a reference orbit, and we want to compute a station-keeping maneuver on top of this ephemeris, changing its final state. The principal is to add one or more
small maneuvers analytical models
to it and use it as a new propagator, which takes the maneuvers into account.From a space flight dynamics point of view, this is a differential correction approach. From a computer science point of view, this is a use of the decorator design pattern.
- Author:
- Luc Maisonobe
- See Also:
Propagator
,SmallManeuverAnalyticalModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AdapterPropagator.DifferentialEffect
Interface for orbit differential effects.
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.Propagator
DEFAULT_LAW, DEFAULT_MASS, EPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE
-
-
Constructor Summary
Constructors Constructor Description AdapterPropagator(Propagator reference)
Build a propagator from an underlying reference propagator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEffect(AdapterPropagator.DifferentialEffect effect)
Add a differential effect.protected SpacecraftState
basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features.List<AdapterPropagator.DifferentialEffect>
getEffects()
Get the differential effects.SpacecraftState
getInitialState()
Get the propagator initial state.protected double
getMass(AbsoluteDate date)
Get the mass.Propagator
getPropagator()
Get the reference propagator.protected Orbit
propagateOrbit(AbsoluteDate date)
Extrapolate an orbit up to a specific target date.void
resetInitialState(SpacecraftState state)
Reset the propagator initial state.protected void
resetIntermediateState(SpacecraftState state, boolean forward)
Reset an intermediate state.-
Methods inherited from class org.orekit.propagation.analytical.AbstractAnalyticalPropagator
acceptStep, addEventDetector, clearEventsDetectors, getEventsDetectors, getGeneratedEphemeris, getPvProvider, propagate
-
Methods inherited from class org.orekit.propagation.AbstractPropagator
addAdditionalStateProvider, getAdditionalStateProviders, getAttitudeProvider, getFixedStepSize, getFrame, getManagedAdditionalStates, getMode, getPVCoordinates, getStartDate, getStepHandler, isAdditionalStateManaged, propagate, setAttitudeProvider, setEphemerisMode, setEphemerisMode, setMasterMode, setMasterMode, setSlaveMode, setStartDate, updateAdditionalStates
-
-
-
-
Constructor Detail
-
AdapterPropagator
public AdapterPropagator(Propagator reference)
Build a propagator from an underlying reference propagator.The reference propagator can be almost anything, numerical, analytical, and even an ephemeris. It may already take some maneuvers into account.
- Parameters:
reference
- reference propagator
-
-
Method Detail
-
addEffect
public void addEffect(AdapterPropagator.DifferentialEffect effect)
Add a differential effect.- Parameters:
effect
- differential effect
-
getPropagator
public Propagator getPropagator()
Get the reference propagator.- Returns:
- reference propagator
-
getEffects
public List<AdapterPropagator.DifferentialEffect> getEffects()
Get the differential effects.- Returns:
- differential effects models, as an unmodifiable list
-
getInitialState
public SpacecraftState getInitialState()
Get the propagator initial state.- Specified by:
getInitialState
in interfacePropagator
- Overrides:
getInitialState
in classAbstractPropagator
- Returns:
- initial state
-
resetInitialState
public void resetInitialState(SpacecraftState state)
Reset the propagator initial state.- Specified by:
resetInitialState
in interfacePropagator
- Overrides:
resetInitialState
in classAbstractPropagator
- Parameters:
state
- new initial state to consider
-
resetIntermediateState
protected void resetIntermediateState(SpacecraftState state, boolean forward)
Reset an intermediate state.- Specified by:
resetIntermediateState
in classAbstractAnalyticalPropagator
- Parameters:
state
- new intermediate state to considerforward
- if true, the intermediate state is valid for propagations after itself
-
basicPropagate
protected SpacecraftState basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features.This method is similar in spirit to the
AbstractAnalyticalPropagator.propagate(org.orekit.time.AbsoluteDate, org.orekit.time.AbsoluteDate)
method, except that it does not call any handler during propagation, nor any discrete events, not additional states. It always stop exactly at the specified date.- Overrides:
basicPropagate
in classAbstractAnalyticalPropagator
- Parameters:
date
- target date for propagation- Returns:
- state at specified date
-
propagateOrbit
protected Orbit propagateOrbit(AbsoluteDate date)
Extrapolate an orbit up to a specific target date.- Specified by:
propagateOrbit
in classAbstractAnalyticalPropagator
- Parameters:
date
- target date for the orbit- Returns:
- extrapolated parameters
-
getMass
protected double getMass(AbsoluteDate date)
Get the mass.- Specified by:
getMass
in classAbstractAnalyticalPropagator
- Parameters:
date
- target date for the orbit- Returns:
- mass mass
-
-