fr.cnes.sirius.patrius.propagation
Interface MultiPropagator

All Known Implementing Classes:
MultiNumericalPropagator

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.

Since:
3.0
Version:
$Id: MultiPropagator.java 12732 2015-03-25 18:02:35Z maggiorani $
Author:
maggioranic

Field Summary
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.
 
Method Summary
 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.
 AttitudeProvider getAttitudeProvider(String satId)
           Get the default attitude provider.
 AttitudeProvider getAttitudeProviderEvents(String satId)
           Get the attitude provider for events computation.
 AttitudeProvider 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, MultiOrekitFixedStepHandler handler)
          Set the propagator to master mode with fixed steps.
 void setMasterMode(MultiOrekitStepHandler handler)
          Set the propagator to master mode with variable steps.
 void setSlaveMode()
          Set the propagator to slave mode.
 

Field Detail

SLAVE_MODE

static final int SLAVE_MODE
Indicator for slave mode.

See Also:
Constant Field Values

MASTER_MODE

static final int MASTER_MODE
Indicator for master mode.

See Also:
Constant Field Values

EPHEMERIS_GENERATION_MODE

static final int EPHEMERIS_GENERATION_MODE
Indicator for ephemeris generation mode.

See Also:
Constant Field Values
Method Detail

getMode

int getMode()
Get the current operating mode of the propagator.

Returns:
one of SLAVE_MODE, MASTER_MODE, EPHEMERIS_GENERATION_MODE
See Also:
setSlaveMode(), setMasterMode(double, MultiOrekitFixedStepHandler), setMasterMode(MultiOrekitStepHandler), setEphemerisMode()

setSlaveMode

void setSlaveMode()
Set the propagator to slave mode.

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.

See Also:
setMasterMode(double, MultiOrekitFixedStepHandler), setMasterMode(MultiOrekitStepHandler), setEphemerisMode(), getMode(), SLAVE_MODE

setMasterMode

void setMasterMode(double h,
                   MultiOrekitFixedStepHandler handler)
Set the propagator to master mode with fixed steps.

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.

Parameters:
h - fixed stepsize (s)
handler - handler called at the end of each finalized step
See Also:
setSlaveMode(), setMasterMode(MultiOrekitStepHandler), setEphemerisMode(), getMode(), MASTER_MODE

setMasterMode

void setMasterMode(MultiOrekitStepHandler handler)
Set the propagator to master mode with variable steps.

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.

Parameters:
handler - handler called at the end of each finalized step
See Also:
setSlaveMode(), setMasterMode(double, MultiOrekitFixedStepHandler), setEphemerisMode(), getMode(), MASTER_MODE

setEphemerisMode

void setEphemerisMode()
Set the propagator to ephemeris generation mode.

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.

See Also:
getGeneratedEphemeris(String), setSlaveMode(), setMasterMode(double, MultiOrekitFixedStepHandler), setMasterMode(MultiOrekitStepHandler), getMode(), EPHEMERIS_GENERATION_MODE

getGeneratedEphemeris

BoundedPropagator getGeneratedEphemeris(String satId)
Get the ephemeris generated during propagation for a defined spacecraft.

Parameters:
satId - the spacecraft ID
Returns:
generated ephemeris
Throws:
IllegalStateException - if the propagator was not set in ephemeris generation mode before propagation
See Also:
setEphemerisMode()

getInitialStates

Map<String,SpacecraftState> getInitialStates()
                                             throws OrekitException
Get the propagator initial states.

Returns:
initial states
Throws:
OrekitException - if state cannot be retrieved

addEventDetector

void addEventDetector(MultiEventDetector detector)
Add a multi spacecraft event detector.

Parameters:
detector - event detector to add
See Also:
clearEventsDetectors(), getEventsDetectors()

addEventDetector

void addEventDetector(EventDetector detector,
                      String satId)
Add an event detector to a specific spacecraft. The spacecraft defined by the input ID should already be added using addInitialState(SpacecraftState, String).

Parameters:
detector - event detector to add
satId - the spacecraft ID
See Also:
clearEventsDetectors(), getEventsDetectors()

getEventsDetectors

Collection<MultiEventDetector> getEventsDetectors()
Get all the events detectors that have been added.

Returns:
an unmodifiable collection of the added detectors
See Also:
addEventDetector(MultiEventDetector), addEventDetector(EventDetector, String), clearEventsDetectors()

clearEventsDetectors

void clearEventsDetectors()
Remove all events detectors.

See Also:
addEventDetector(MultiEventDetector), addEventDetector(EventDetector, String), getEventsDetectors()

getAttitudeProvider

AttitudeProvider 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.

Parameters:
satId - the spacecraft ID
Returns:
attitude provider for forces computation (by default)

getAttitudeProviderForces

AttitudeProvider getAttitudeProviderForces(String satId)

Get the attitude provider for forces computation.

Parameters:
satId - the spacecraft ID
Returns:
attitude provider for forces computation, return null if not defined.

getAttitudeProviderEvents

AttitudeProvider getAttitudeProviderEvents(String satId)

Get the attitude provider for events computation.

Parameters:
satId - the spacecraft ID
Returns:
attitude provider for events computation, return null if not defined.

setAttitudeProvider

void 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).

Parameters:
satId - the spacecraft ID
attitudeProvider - attitude provider

setAttitudeProviderForces

void 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).

Parameters:
satId - the spacecraft ID
attitudeProviderForces - attitude provider for forces computation

setAttitudeProviderEvents

void 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).

Parameters:
satId - the spacecraft ID
attitudeProviderEvents - attitude provider for events computation

getFrame

Frame getFrame(String satId)
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.

The spacecraft defined by the input ID should already be added using addInitialState(SpacecraftState, String).

Parameters:
satId - the spacecraft ID
Returns:
frame in which the orbit is propagated
See Also:
addInitialState(SpacecraftState, String)

addInitialState

void addInitialState(SpacecraftState initialState,
                     String satId)
                     throws OrekitException
Add a new spacecraft state to be propagated.

Parameters:
satId - the spacecraft ID
initialState - the new spacecraft state
Throws:
OrekitException - 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.

propagate

Map<String,SpacecraftState> propagate(AbsoluteDate target)
                                      throws PropagationException
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.

Parameters:
target - target date towards which orbit state should be propagated
Returns:
propagated state
Throws:
PropagationException - if state cannot be propagated

propagate

Map<String,SpacecraftState> propagate(AbsoluteDate start,
                                      AbsoluteDate target)
                                      throws PropagationException
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.

Parameters:
start - start date from which orbit state should be propagated
target - target date to which orbit state should be propagated
Returns:
propagated state
Throws:
PropagationException - if state cannot be propagated


Copyright © 2016 CNES. All Rights Reserved.