public class MultiAnalyticalPropagator extends Object implements MultiPropagator
This class is inspired from AbstractPropagator and adapted to multi propagation.
This class propagates N SpacecraftState using analytical propagators (any non-numerical propagator is
accepted). Each state is identified with an ID of type String.
Multi spacecraft analytical propagation requires at least one satellite to be added to the propagator using
addPropagator(Propagator, String).
The following general parameters can also be set :
addEventDetector(EventDetector, String), clearEventsDetectors())setSlaveMode(),
setMasterMode(double, MultiPatriusFixedStepHandler), setMasterMode(MultiPatriusStepHandler))Important notes:
NumericalPropagator is forbidden but any other class based on analytical
(e.g. Ephemeris) or semi-analytical (e.g. STELA) propagation is accepted, that is to say all implementations
of Propagator except NumericalPropagatorMultiEventDetector is not possible through
addEventDetector(MultiEventDetector), but can be used with addEventDetector(EventDetector, String)
under the condition that it also implements EventDetectorPatriusException with an PatriusMessages.ILLEGAL_STATE
messageThe same instance cannot be used simultaneously by different threads, the class is not thread-safe.
SpacecraftState,
AbstractPropagator,
MultiPatriusStepHandler,
MultiPatriusFixedStepHandlerEPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE| Constructor and Description |
|---|
MultiAnalyticalPropagator(AbsoluteDate referenceDate)
Default constructor with an empty map of propagators.
|
MultiAnalyticalPropagator(Map<String,Propagator> analyticalPropagatorsMap,
AbsoluteDate referenceDate)
Constructor with an input map of propagators.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,SpacecraftState> |
acceptStep(AbsoluteDate target,
double epsilon)
Accept a step, triggering events and step handlers.
|
void |
addEventDetector(EventDetector detector,
String satId)
Add an event detector to a specific spacecraft.
|
void |
addEventDetector(MultiEventDetector detector)
Not authorized method: throws an unchecked exception when called.
|
void |
addInitialState(SpacecraftState initialState,
String satId)
Add a new spacecraft state to be propagated.
|
void |
addPropagator(Propagator propagator,
String satId)
Add an additional propagator to the map of propagators.
|
protected Map<String,SpacecraftState> |
basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features.
|
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)
Not authorized method: throws an unchecked exception when called.
|
SpacecraftState |
getInitialState(String satId)
Get the propagator initial state of a single satellite.
|
Map<String,SpacecraftState> |
getInitialStates()
Get the propagator initial states.
|
int |
getMode()
Get the current operating mode of the propagator.
|
Map<String,SpacecraftStateProvider> |
getPropagators()
Get spacecraft state providers map.
|
AbsoluteDate |
getReferenceDate()
Get the reference date.
|
protected void |
manageStateFrame()
Manage the state frame: propagated orbits are projected in the propagation frame.
|
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 |
resetSingleInitialState(SpacecraftState newSpacecraftState,
String satId)
Reset the initial state of a single satellite in the initial states map.
|
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()
Not authorized method: throws an unchecked exception when called.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSpacecraftStatepublic MultiAnalyticalPropagator(AbsoluteDate referenceDate) throws PatriusException
referenceDate - date that is used as a reference to compute initial spacecraft statesPatriusException - if a state cannot be computed or if the propagator is numericalpublic MultiAnalyticalPropagator(Map<String,Propagator> analyticalPropagatorsMap, AbsoluteDate referenceDate) throws PatriusException
analyticalPropagatorsMap - map of propagators that shall all be analyticalreferenceDate - date that is used as a reference to compute initial spacecraft statesPatriusException - if a state cannot be computed or if the propagator is numericalpublic final void addPropagator(Propagator propagator, String satId) throws PatriusException
propagator - additional propagatorsatId - spacecraft ID whose state is propagatedPatriusException - if an initial state is already defined with this ID or if the input ID is nullpublic void addInitialState(SpacecraftState initialState, String satId) throws PatriusException
addInitialState in interface MultiPropagatorinitialState - the new spacecraft statesatId - the spacecraft IDPatriusException - 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.public Map<String,SpacecraftState> getInitialStates() throws PatriusException
getInitialStates in interface MultiPropagatorPatriusException - if state cannot be retrievedpublic SpacecraftState getInitialState(String satId) throws PatriusException
satId - ID of the satellitePatriusException - if state cannot be retrievedpublic Map<String,SpacecraftStateProvider> getPropagators()
public int getMode()
getMode in interface MultiPropagatorMultiPropagator.SLAVE_MODE, MultiPropagator.MASTER_MODE, MultiPropagator.EPHEMERIS_GENERATION_MODEMultiPropagator.setSlaveMode(),
MultiPropagator.setMasterMode(double, MultiPatriusFixedStepHandler),
MultiPropagator.setMasterMode(MultiPatriusStepHandler),
MultiPropagator.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.
public 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.
setMasterMode in interface MultiPropagatorh - fixed stepsize (s)handler - handler called at the end of each finalized stepMultiPropagator.setSlaveMode(),
MultiPropagator.setMasterMode(MultiPatriusStepHandler),
MultiPropagator.setEphemerisMode(),
MultiPropagator.getMode(),
MultiPropagator.MASTER_MODEpublic 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.
setMasterMode in interface MultiPropagatorhandler - handler called at the end of each finalized stepMultiPropagator.setSlaveMode(),
MultiPropagator.setMasterMode(double, MultiPatriusFixedStepHandler),
MultiPropagator.setEphemerisMode(),
MultiPropagator.getMode(),
MultiPropagator.MASTER_MODEpublic void setEphemerisMode()
setEphemerisMode in interface MultiPropagatorMultiPropagator.getGeneratedEphemeris(String),
MultiPropagator.setSlaveMode(),
MultiPropagator.setMasterMode(double, MultiPatriusFixedStepHandler),
MultiPropagator.setMasterMode(MultiPatriusStepHandler),
MultiPropagator.getMode(),
MultiPropagator.EPHEMERIS_GENERATION_MODEpublic BoundedPropagator getGeneratedEphemeris(String satId)
getGeneratedEphemeris in interface MultiPropagatorsatId - the spacecraft IDMultiPropagator.setEphemerisMode()public void addEventDetector(MultiEventDetector detector)
addEventDetector in interface MultiPropagatordetector - event detector to addMultiPropagator.clearEventsDetectors(),
MultiPropagator.getEventsDetectors()public void addEventDetector(EventDetector detector, String satId)
MultiPropagator.addInitialState(SpacecraftState, String).addEventDetector in interface MultiPropagatordetector - event detector to addsatId - the spacecraft IDMultiPropagator.clearEventsDetectors(),
MultiPropagator.getEventsDetectors()public Collection<MultiEventDetector> getEventsDetectors()
detectors that have been added.getEventsDetectors in interface MultiPropagatorMultiPropagator.addEventDetector(MultiEventDetector),
MultiPropagator.addEventDetector(EventDetector, String),
MultiPropagator.clearEventsDetectors()public void clearEventsDetectors()
public 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.
getAttitudeProvider in interface MultiPropagatorsatId - the spacecraft IDpublic MultiAttitudeProvider 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.
getAttitudeProviderForces in interface MultiPropagatorsatId - the spacecraft IDpublic MultiAttitudeProvider 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.
getAttitudeProviderEvents in interface MultiPropagatorsatId - the spacecraft IDpublic 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
MultiPropagator.addInitialState(SpacecraftState, String).
setAttitudeProvider in interface MultiPropagatorattitudeProvider - attitude providersatId - the spacecraft IDpublic 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
MultiPropagator.addInitialState(SpacecraftState, String).
setAttitudeProviderForces in interface MultiPropagatorattitudeProviderForces - attitude provider for forces computationsatId - the spacecraft IDpublic 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
MultiPropagator.addInitialState(SpacecraftState, String).
setAttitudeProviderEvents in interface MultiPropagatorattitudeProviderEvents - attitude provider for events computationsatId - the spacecraft IDpublic Frame 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
MultiPropagator.addInitialState(SpacecraftState, String).
getFrame in interface MultiPropagatorsatId - the spacecraft IDMultiPropagator.addInitialState(SpacecraftState, String)public 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.
propagate in interface MultiPropagatortarget - target date towards which orbit state should be propagatedPropagationException - if state cannot be propagatedpublic Map<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.
propagate in interface MultiPropagatorstart - start date from which orbit state should be propagatedtarget - target date to which orbit state should be propagatedPropagationException - if state cannot be propagatedprotected Map<String,SpacecraftState> basicPropagate(AbsoluteDate date) throws PropagationException
This method is similar in spirit to the propagate(fr.cnes.sirius.patrius.time.AbsoluteDate) method, except that it does not call
any handler during propagation, nor any discrete events. It always stops exactly at the specified date.
date - target date for propagationPropagationException - if propagation cannot reach specified dateprotected Map<String,SpacecraftState> acceptStep(AbsoluteDate target, double epsilon) throws PatriusException
target - final propagation timeepsilon - threshold for end date detectionPatriusException - if the switching function cannot be evaluatedpublic AbsoluteDate getReferenceDate()
public void resetSingleInitialState(SpacecraftState newSpacecraftState, String satId)
newSpacecraftState - new spacecraft state that shall be setsatId - satellite ID whose state shall be resetedprotected void manageStateFrame()
throws PatriusException
PatriusException - if the frame of the initial state is not inertial or pseudo-inertial or if the propagator's map is emptyCopyright © 2025 CNES. All rights reserved.