public class AdaptedStepHandler extends Object implements PatriusStepInterpolator, StepHandler, ModeHandler, Serializable
PatriusStepHandler
to commons-math StepHandler
interface.Constructor and Description |
---|
AdaptedStepHandler(PatriusStepHandler handlerIn)
Build an instance.
|
Modifier and Type | Method and Description |
---|---|
AdaptedStepHandler |
copy()
Copy this.
|
AbsoluteDate |
getCurrentDate()
Get the current grid date.
|
AbsoluteDate |
getInterpolatedDate()
Get the interpolated date.
|
SpacecraftState |
getInterpolatedState()
Get the interpolated state.
|
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,
AttitudeProvider attitudeProviderForces,
AttitudeProvider attitudeProviderEvents,
Map<String,AdditionalStateInfo> additionalStateInfos,
boolean activateHandlers,
AbsoluteDate reference,
Frame frame,
double mu)
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 AdaptedStepHandler(PatriusStepHandler handlerIn)
handlerIn
- underlying handler to wrappublic void initialize(OrbitType orbit, PositionAngle angle, AttitudeProvider attitudeProviderForces, AttitudeProvider attitudeProviderEvents, Map<String,AdditionalStateInfo> additionalStateInfos, boolean activateHandlers, AbsoluteDate reference, Frame frame, double mu)
initialize
in interface ModeHandler
orbit
- orbit typeangle
- position angle typeattitudeProviderForces
- attitude provider for forces computationattitudeProviderEvents
- attitude provider for events computationadditionalStateInfos
- additional states informationsactivateHandlers
- if handlers shall be activereference
- reference dateframe
- reference framemu
- central body attraction coefficientpublic 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 PatriusStepInterpolator
public AbsoluteDate getPreviousDate()
getPreviousDate
in interface PatriusStepInterpolator
public AbsoluteDate getInterpolatedDate()
If setInterpolatedDate
has not been called, the date returned is the
same as getCurrentDate
.
getInterpolatedDate
in interface PatriusStepInterpolator
setInterpolatedDate(AbsoluteDate)
,
getInterpolatedState()
public void setInterpolatedDate(AbsoluteDate date)
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 PatriusStepInterpolator
date
- interpolated date to setgetInterpolatedDate()
,
getInterpolatedState()
public SpacecraftState getInterpolatedState() throws PatriusException
getInterpolatedState
in interface PatriusStepInterpolator
PatriusException
- if state cannot be interpolated or convertedgetInterpolatedDate()
,
setInterpolatedDate(AbsoluteDate)
public boolean isForward()
isForward
in interface PatriusStepInterpolator
public AdaptedStepHandler copy()
Copy this.
Following attributes are deeply copied:
orbitType
(primitive data type)angleType
(primitive data type)initializedMu
(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 ModeHandler
newReference
- new reference dateCopyright © 2020 CNES. All rights reserved.