public class MultiAdaptedStepHandler extends Object implements MultiPatriusStepInterpolator, StepHandler, MultiModeHandler
This class is copied from AdaptedStepHandler
and adapted to multi
propagation.
Adapt an MultiPatriusStepHandler
to commons-math StepHandler
interface.
Constructor and Description |
---|
MultiAdaptedStepHandler(MultiPatriusStepHandler multiHandler)
Build an instance.
|
Modifier and Type | Method and Description |
---|---|
MultiAdaptedStepHandler |
copy()
Copy this.
|
AbsoluteDate |
getCurrentDate()
Get the current grid date.
|
AbsoluteDate |
getInterpolatedDate()
Get the interpolated date.
|
Map<String,SpacecraftState> |
getInterpolatedStates()
Get all the interpolated states.
|
AbsoluteDate |
getPreviousDate()
Get the previous grid date.
|
void |
handleStep(StepInterpolator interpolator,
boolean isLast)
Handle the last accepted step
|
void |
init(double t0,
double[] y0,
double t)
Initialize step handler at the start of an ODE integration.
|
void |
initialize(OrbitType orbit,
PositionAngle angle,
Map<String,AttitudeProvider> attProvidersForces,
Map<String,AttitudeProvider> attProvidersEvents,
MultiStateVectorInfo stateVectorInfo,
boolean activateHandlers,
AbsoluteDate reference,
Map<String,Frame> frameMap,
Map<String,Double> muMap)
Initialize the mode handler.
|
boolean |
isForward()
Check is integration direction is forward in date.
|
void |
setInterpolatedDate(AbsoluteDate date)
Set the interpolated date.
|
void |
setReference(AbsoluteDate newReference)
Define new reference date.
|
public MultiAdaptedStepHandler(MultiPatriusStepHandler multiHandler)
multiHandler
- underlying handler to wrappublic void initialize(OrbitType orbit, PositionAngle angle, Map<String,AttitudeProvider> attProvidersForces, Map<String,AttitudeProvider> attProvidersEvents, MultiStateVectorInfo stateVectorInfo, boolean activateHandlers, AbsoluteDate reference, Map<String,Frame> frameMap, Map<String,Double> muMap)
initialize
in interface MultiModeHandler
orbit
- orbit typeangle
- position angle typeattProvidersForces
- attitude providers for forces computation for each stateattProvidersEvents
- attitude providers for events computation for each statestateVectorInfo
- the state vector informationsactivateHandlers
- if handlers shall be activereference
- reference dateframeMap
- the map of reference frame for each statemuMap
- the map of central body attraction coefficient for each statepublic void init(double t0, double[] y0, double t)
This method is called once at the start of the integration. It may be used by the step handler to initialize some internal data if needed.
init
in interface StepHandler
t0
- start value of the independent time variabley0
- array containing the start value of the state vectort
- target time for the integrationpublic void handleStep(StepInterpolator interpolator, boolean isLast)
handleStep
in interface StepHandler
interpolator
- interpolator for the last accepted step. For
efficiency purposes, the various integrators reuse the same
object on each call, so if the instance wants to keep it across
all calls (for example to provide at the end of the integration a
continuous model valid throughout the integration range, as the
ContinuousOutputModel
class does), it should build a local copy
using the clone method of the interpolator and store this copy.
Keeping only a reference to the interpolator and reusing it will
result in unpredictable behavior (potentially crashing the application).isLast
- true if the step is the last onepublic AbsoluteDate getCurrentDate()
getCurrentDate
in interface MultiPatriusStepInterpolator
public AbsoluteDate getPreviousDate()
getPreviousDate
in interface MultiPatriusStepInterpolator
public AbsoluteDate getInterpolatedDate()
If setInterpolatedDate
has not been called, the date returned is the
same as getCurrentDate
.
If setInterpolatedDate
has not been called, the date returned is the
same as getCurrentDate
.
getInterpolatedDate
in interface MultiPatriusStepInterpolator
MultiPatriusStepInterpolator.setInterpolatedDate(AbsoluteDate)
,
MultiPatriusStepInterpolator.getInterpolatedStates()
public void setInterpolatedDate(AbsoluteDate date) throws PropagationException
It is possible to set the interpolation date outside of the current step range, but accuracy will decrease as date is farther.
setInterpolatedDate
in interface MultiPatriusStepInterpolator
date
- interpolated date to setPropagationException
- if underlying interpolator cannot handle
the dateMultiPatriusStepInterpolator.getInterpolatedDate()
,
MultiPatriusStepInterpolator.getInterpolatedStates()
public Map<String,SpacecraftState> getInterpolatedStates() throws PatriusException
getInterpolatedStates
in interface MultiPatriusStepInterpolator
PatriusException
- if a state cannot be interpolated or convertedMultiPatriusStepInterpolator.getInterpolatedDate()
,
MultiPatriusStepInterpolator.setInterpolatedDate(AbsoluteDate)
public boolean isForward()
isForward
in interface MultiPatriusStepInterpolator
public MultiAdaptedStepHandler copy()
Copy this.
Following attributes are deeply copied:
orbitType
(primitive data type)angleType
(primitive data type)activate
(primitive data type)rawInterpolator
Following attributes reference is passed (no deep copy):
public void setReference(AbsoluteDate newReference)
To be called by NumericalPropagator
only.
setReference
in interface MultiModeHandler
newReference
- new reference dateCopyright © 2017 CNES. All rights reserved.