public interface MultiPropagator
This interface is copied from Propagator
and adapted to multi propagation.
This interface provides a way to propagate several SpacecraftState
(including orbit, attitudes and additional
states) at any time.
This interface is the top-level abstraction for multi states propagation. An initial state is identified by its ID.
It could be added to the propagator through addInitialState(SpacecraftState, String)
. All initial states
added should have the same initial state. Each initial state is defined with a proper frame with can be retrieved
using getFrame(String)
. This interface only allows propagation to a predefined date by calling
propagate(AbsoluteDate)
or propagate(AbsoluteDate, AbsoluteDate)
.
This interface is implemented by numerical integrators using rich force models and by continuous models built after numerical integration has been completed and dense output data as been gathered.
Modifier and Type | Field and Description |
---|---|
static int |
EPHEMERIS_GENERATION_MODE
Indicator for ephemeris generation mode.
|
static int |
MASTER_MODE
Indicator for master mode.
|
static int |
SLAVE_MODE
Indicator for slave mode.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventDetector(EventDetector detector,
String satId)
Add an event detector to a specific spacecraft.
|
void |
addEventDetector(MultiEventDetector detector)
Add a multi spacecraft event detector.
|
void |
addInitialState(SpacecraftState initialState,
String satId)
Add a new spacecraft state to be propagated.
|
void |
clearEventsDetectors()
Remove all events detectors.
|
MultiAttitudeProvider |
getAttitudeProvider(String satId)
Get the default attitude provider.
|
MultiAttitudeProvider |
getAttitudeProviderEvents(String satId)
Get the attitude provider for events computation.
|
MultiAttitudeProvider |
getAttitudeProviderForces(String satId)
Get the attitude provider for forces computation.
|
Collection<MultiEventDetector> |
getEventsDetectors()
Get all the events
detectors that have been added. |
Frame |
getFrame(String satId)
Get the frame in which the orbit is propagated.
|
BoundedPropagator |
getGeneratedEphemeris(String satId)
Get the ephemeris generated during propagation for a defined spacecraft.
|
Map<String,SpacecraftState> |
getInitialStates()
Get the propagator initial states.
|
int |
getMode()
Get the current operating mode of the propagator.
|
Map<String,SpacecraftState> |
propagate(AbsoluteDate target)
Propagate towards a target date.
|
Map<String,SpacecraftState> |
propagate(AbsoluteDate start,
AbsoluteDate target)
Propagate from a start date towards a target date.
|
void |
setAttitudeProvider(AttitudeProvider attitudeProvider,
String satId)
Set attitude provider for defined spacecraft.
|
void |
setAttitudeProviderEvents(AttitudeProvider attitudeProviderEvents,
String satId)
Set attitude provider for events computation.
|
void |
setAttitudeProviderForces(AttitudeProvider attitudeProviderForces,
String satId)
Set attitude provider for forces computation.
|
void |
setEphemerisMode()
Set the propagator to ephemeris generation mode.
|
void |
setMasterMode(double h,
MultiPatriusFixedStepHandler handler)
Set the propagator to master mode with fixed steps.
|
void |
setMasterMode(MultiPatriusStepHandler handler)
Set the propagator to master mode with variable steps.
|
void |
setSlaveMode()
Set the propagator to slave mode.
|
static final int SLAVE_MODE
static final int MASTER_MODE
static final int EPHEMERIS_GENERATION_MODE
int getMode()
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.
void setMasterMode(double h, MultiPatriusFixedStepHandler 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.
h
- fixed stepsize (s)handler
- handler called at the end of each finalized stepsetSlaveMode()
,
setMasterMode(MultiPatriusStepHandler)
,
setEphemerisMode()
,
getMode()
,
MASTER_MODE
void setMasterMode(MultiPatriusStepHandler 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.
handler
- handler called at the end of each finalized stepsetSlaveMode()
,
setMasterMode(double, MultiPatriusFixedStepHandler)
,
setEphemerisMode()
,
getMode()
,
MASTER_MODE
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.
BoundedPropagator getGeneratedEphemeris(String satId)
satId
- the spacecraft IDIllegalStateException
- if the propagator was not set in ephemeris generation mode before propagationsetEphemerisMode()
Map<String,SpacecraftState> getInitialStates() throws PatriusException
PatriusException
- if state cannot be retrievedvoid addEventDetector(MultiEventDetector detector)
detector
- event detector to addclearEventsDetectors()
,
getEventsDetectors()
void addEventDetector(EventDetector detector, String satId)
addInitialState(SpacecraftState, String)
.detector
- event detector to addsatId
- the spacecraft IDclearEventsDetectors()
,
getEventsDetectors()
Collection<MultiEventDetector> getEventsDetectors()
detectors
that have been added.addEventDetector(MultiEventDetector)
,
addEventDetector(EventDetector, String)
,
clearEventsDetectors()
void clearEventsDetectors()
MultiAttitudeProvider getAttitudeProvider(String satId)
Get the default attitude provider.
The unique attitude provider given by default is returned. If null, the attitude provider for forces computation, and then the attitude provider for events computation is returned.
Warning: if you provided an AttitudeProvider
then to get back your AttitudeProvider
, the
returned MultiAttitudeProvider
should be cast to MultiAttitudeProviderWrapper
and method
MultiAttitudeProviderWrapper.getAttitudeProvider()
should be used.
satId
- the spacecraft IDMultiAttitudeProvider getAttitudeProviderForces(String satId)
Get the attitude provider for forces computation.
Warning: if you provided an AttitudeProvider
then to get back your AttitudeProvider
, the
returned MultiAttitudeProvider
should be cast to MultiAttitudeProviderWrapper
and method
MultiAttitudeProviderWrapper.getAttitudeProvider()
should be used.
satId
- the spacecraft IDMultiAttitudeProvider getAttitudeProviderEvents(String satId)
Get the attitude provider for events computation.
Warning: if you provided an AttitudeProvider
then to get back your AttitudeProvider
, the
returned MultiAttitudeProvider
should be cast to MultiAttitudeProviderWrapper
and method
MultiAttitudeProviderWrapper.getAttitudeProvider()
should be used.
satId
- the spacecraft IDvoid setAttitudeProvider(AttitudeProvider attitudeProvider, String satId)
Set attitude provider for defined spacecraft.
A default attitude provider is available in ConstantAttitudeLaw
.
The spacecraft defined by the input ID should already be added using
addInitialState(SpacecraftState, String)
.
satId
- the spacecraft IDattitudeProvider
- attitude providervoid setAttitudeProviderForces(AttitudeProvider attitudeProviderForces, String satId)
Set attitude provider for forces computation.
A default attitude provider is available in ConstantAttitudeLaw
.
The spacecraft defined by the input ID should already be added using
addInitialState(SpacecraftState, String)
.
satId
- the spacecraft IDattitudeProviderForces
- attitude provider for forces computationvoid setAttitudeProviderEvents(AttitudeProvider attitudeProviderEvents, String satId)
Set attitude provider for events computation.
A default attitude provider is available in ConstantAttitudeLaw
.
The spacecraft defined by the input ID should already be added using
addInitialState(SpacecraftState, String)
.
satId
- the spacecraft IDattitudeProviderEvents
- attitude provider for events computationFrame getFrame(String satId)
The propagation frame is the definition frame of the initial state, so this method should be called after this state has been set.
The spacecraft defined by the input ID should already be added using
addInitialState(SpacecraftState, String)
.
satId
- the spacecraft IDaddInitialState(SpacecraftState, String)
void addInitialState(SpacecraftState initialState, String satId) throws PatriusException
satId
- the spacecraft IDinitialState
- the new spacecraft statePatriusException
- if an initial state is already defined with this ID.
if the input ID is null.
if the date of the initial state is different from the initial states already defined in the
propagator.Map<String,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.
target
- target date towards which orbit state should be propagatedPropagationException
- if state cannot be propagatedMap<String,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.
start
- start date from which orbit state should be propagatedtarget
- target date to which orbit state should be propagatedPropagationException
- if state cannot be propagatedCopyright © 2020 CNES. All rights reserved.