Class PythonBoundedPropagator
- java.lang.Object
-
- org.orekit.propagation.PythonBoundedPropagator
-
- All Implemented Interfaces:
BoundedPropagator
,Propagator
,PVCoordinatesProvider
public class PythonBoundedPropagator extends Object implements BoundedPropagator
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.Propagator
DEFAULT_MASS
-
-
Constructor Summary
Constructors Constructor Description PythonBoundedPropagator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalStateProvider(AdditionalStateProvider additionalStateProvider)
Add a set of user-specified state parameters to be computed along with the orbit propagation.<T extends EventDetector>
voidaddEventDetector(T detector)
Add an event detector.void
clearEventsDetectors()
Remove all events detectors.void
finalize()
Part of JCC Python interface to objectList<AdditionalStateProvider>
getAdditionalStateProviders()
Get an unmodifiable list of providers for additional state.AttitudeProvider
getAttitudeProvider()
Get attitude provider.EphemerisGenerator
getEphemerisGenerator()
Set up an ephemeris generator that will monitor the propagation for building an ephemeris from it once completed.Collection<EventDetector>
getEventsDetectors()
Get all the events detectors that have been added.Frame
getFrame()
Get the frame in which the orbit is propagated.SpacecraftState
getInitialState()
Get the propagator initial state.String[]
getManagedAdditionalStates()
Get all the names of all managed states.AbsoluteDate
getMaxDate()
Get the last date of the range.AbsoluteDate
getMinDate()
Get the first date of the range.StepHandlerMultiplexer
getMultiplexer()
Get the multiplexer holding all step handlers.TimeStampedPVCoordinates
getPVCoordinates(AbsoluteDate date, Frame frame)
Get thePVCoordinates
of the body in the selected frame.boolean
isAdditionalStateManaged(String name)
Check if an additional state is managed.SpacecraftState
propagate(AbsoluteDate target)
Propagate towards a target date.SpacecraftState
propagate(AbsoluteDate start, AbsoluteDate target)
Propagate from a start date towards a target date.void
pythonDecRef()
Part of JCC Python interface to objectlong
pythonExtension()
Part of JCC Python interface to objectvoid
pythonExtension(long pythonObject)
Part of JCC Python interface to objectvoid
resetInitialState(SpacecraftState state)
Reset the propagator initial state.void
setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.Propagator
clearStepHandlers, setStepHandler, setStepHandler, setupMatricesComputation
-
Methods inherited from interface org.orekit.utils.PVCoordinatesProvider
getPosition
-
-
-
-
Method Detail
-
pythonExtension
public void pythonExtension(long pythonObject)
Part of JCC Python interface to object
-
pythonExtension
public long pythonExtension()
Part of JCC Python interface to object
-
finalize
public void finalize() throws Throwable
Part of JCC Python interface to object
-
pythonDecRef
public void pythonDecRef()
Part of JCC Python interface to object
-
getMinDate
public AbsoluteDate getMinDate()
Get the first date of the range.- Specified by:
getMinDate
in interfaceBoundedPropagator
- Returns:
- the first date of the range
-
getMaxDate
public AbsoluteDate getMaxDate()
Get the last date of the range.- Specified by:
getMaxDate
in interfaceBoundedPropagator
- Returns:
- the last date of the range
-
getMultiplexer
public StepHandlerMultiplexer getMultiplexer()
Get the multiplexer holding all step handlers.- Specified by:
getMultiplexer
in interfacePropagator
- Returns:
- multiplexer holding all step handlers
-
getEphemerisGenerator
public EphemerisGenerator getEphemerisGenerator()
Set up an ephemeris generator that will monitor the propagation for building an ephemeris from it once completed.This generator can be used when the user needs fast random access to the orbit state at any time between the initial and target times. 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 even if the propagator used is integration-based and only goes from one initial time to one target time.
Beware that when used with integration-based propagators, the generator will store all intermediate results. It is therefore memory intensive for long integration-based ranges and high precision/short time steps. When used with analytical propagators, the generator only stores start/stop time and a reference to the analytical propagator itself to call it back as needed, so it is less memory intensive.
The returned ephemeris generator will be initially empty, it will be filled with propagation data when a subsequent call to either
propagate(target)
orpropagate(start, target)
is called. The proper way to use this method is therefore to do:EphemerisGenerator generator = propagator.getEphemerisGenerator(); propagator.propagate(target); BoundedPropagator ephemeris = generator.getGeneratedEphemeris();
- Specified by:
getEphemerisGenerator
in interfacePropagator
- Returns:
- ephemeris generator
-
getInitialState
public SpacecraftState getInitialState()
Get the propagator initial state.- Specified by:
getInitialState
in interfacePropagator
- Returns:
- initial state
-
resetInitialState
public void resetInitialState(SpacecraftState state)
Reset the propagator initial state.- Specified by:
resetInitialState
in interfacePropagator
- Parameters:
state
- new initial state to consider
-
addAdditionalStateProvider
public void addAdditionalStateProvider(AdditionalStateProvider additionalStateProvider)
Add a set of user-specified state parameters to be computed along with the orbit propagation.- Specified by:
addAdditionalStateProvider
in interfacePropagator
- Parameters:
additionalStateProvider
- provider for additional state
-
getAdditionalStateProviders
public List<AdditionalStateProvider> getAdditionalStateProviders()
Get an unmodifiable list of providers for additional state.- Specified by:
getAdditionalStateProviders
in interfacePropagator
- Returns:
- providers for the additional states
-
isAdditionalStateManaged
public boolean isAdditionalStateManaged(String name)
Check if an additional state is managed.Managed states are states for which the propagators know how to compute its evolution. They correspond to additional states for which a
provider
has been registered by calling theaddAdditionalStateProvider
method.Additional states that are present in the
initial state
but have no evolution method registered are not considered as managed states. These unmanaged additional states are not lost during propagation, though. Their value are piecewise constant between state resets that may change them if some event handlerresetState
method is called at an event occurrence and happens to change the unmanaged additional state.- Specified by:
isAdditionalStateManaged
in interfacePropagator
- Parameters:
name
- name of the additional state- Returns:
- true if the additional state is managed
-
getManagedAdditionalStates
public String[] getManagedAdditionalStates()
Get all the names of all managed states.- Specified by:
getManagedAdditionalStates
in interfacePropagator
- Returns:
- names of all managed states
-
addEventDetector
public <T extends EventDetector> void addEventDetector(T detector)
Add an event detector.- Specified by:
addEventDetector
in interfacePropagator
- Type Parameters:
T
- class type for the generic version- Parameters:
detector
- event detector to add- See Also:
Propagator.clearEventsDetectors()
,Propagator.getEventsDetectors()
-
getEventsDetectors
public Collection<EventDetector> getEventsDetectors()
Get all the events detectors that have been added.- Specified by:
getEventsDetectors
in interfacePropagator
- Returns:
- an unmodifiable collection of the added detectors
- See Also:
Propagator.addEventDetector(EventDetector)
,Propagator.clearEventsDetectors()
-
clearEventsDetectors
public void clearEventsDetectors()
Remove all events detectors.- Specified by:
clearEventsDetectors
in interfacePropagator
- See Also:
Propagator.addEventDetector(EventDetector)
,Propagator.getEventsDetectors()
-
getAttitudeProvider
public AttitudeProvider getAttitudeProvider()
Get attitude provider.- Specified by:
getAttitudeProvider
in interfacePropagator
- Returns:
- attitude provider
-
setAttitudeProvider
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.- Specified by:
setAttitudeProvider
in interfacePropagator
- Parameters:
attitudeProvider
- attitude provider
-
getFrame
public Frame getFrame()
Get the frame in which the orbit is propagated.The propagation frame is the definition frame of the initial state, so this method should be called after this state has been set, otherwise it may return null.
- Specified by:
getFrame
in interfacePropagator
- Returns:
- frame in which the orbit is propagated
- See Also:
Propagator.resetInitialState(SpacecraftState)
-
propagate
public SpacecraftState propagate(AbsoluteDate target)
Propagate towards a target date.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.
- Specified by:
propagate
in interfacePropagator
- Parameters:
target
- target date towards which orbit state should be propagated- Returns:
- propagated state
-
propagate
public SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target)
Propagate from a start date towards a target date.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.
- Specified by:
propagate
in interfacePropagator
- Parameters:
start
- start date from which orbit state should be propagatedtarget
- target date to which orbit state should be propagated- Returns:
- propagated state
-
getPVCoordinates
public TimeStampedPVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame)
Get thePVCoordinates
of the body in the selected frame.- Specified by:
getPVCoordinates
in interfacePVCoordinatesProvider
- Parameters:
date
- current dateframe
- the frame where to define the position- Returns:
- time-stamped position/velocity of the body (m and m/s)
-
-