public abstract class SinglePointStoppablePropagator extends StoppablePropagator
Point at a specified time step until a StoppingCondition is
satisfied, returning the ephemeris computed and all events found by the
StoppingConditions (get).| Modifier | Constructor and Description |
|---|---|
protected |
SinglePointStoppablePropagator(EvaluatorGroup group,
SinglePointStoppablePropagatorDefinition definition,
List<StateElementAdapterDefinition> previousAdapters)
Initializes a new instance.
|
protected |
SinglePointStoppablePropagator(SinglePointStoppablePropagator existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected StoppablePropagatorResults |
createStoppedPropagatorResult(StoppingConditionEvent stoppingEvent,
List<StoppingConditionEvent> detectedEvents,
List<ITimeBasedState> savedStates,
boolean aborted)
Creates the results of the overall propagation after the stopping event has been found.
|
protected void |
dispose(boolean disposing)
Releases any resources associated with this instance.
|
ITimeBasedState |
getInitialState(IntegrationSense direction)
Creates the initial state from the wrapped propagator.
|
protected ReferenceFrame |
getPropagationFrame()
Gets the
ReferenceFrame to propagate the point in. |
protected Duration |
getPropagatorsRecommendedStep()
Gets the step size that the underlying propagator recommends to step.
|
protected abstract PointEvaluator |
initializePropagationPoint(JulianDate date,
Motion1<Cartesian> motion)
Creates the
PointEvaluator that will be sampled for propagation. |
void |
initializePropagator(ITimeBasedState initialState)
Initializes the wrapped propagator with the initial state.
|
SinglePointStoppablePropagatorResults |
propagateUntilStop(JulianDate initialDate,
Motion1<Cartesian> initialState,
IntegrationSense direction,
ITrackCalculationProgress progressTracker)
Propagates a
Point forward in time from the initial conditions. |
SinglePointStoppablePropagatorResults |
propagateUntilStop(JulianDate initialDate,
Motion1<Cartesian> initialState,
Iterable<? extends StoppingConditionEvaluator> conditions,
IntegrationSense direction,
int outputSparsity,
ITrackCalculationProgress progressTracker)
Propagates a
Point forward in time from the initial conditions. |
ITimeBasedState |
takeStep(Duration step,
boolean createNewState)
Makes the propagator take a step.
|
void |
updateEvaluatorReferences(CopyContext context)
Updates the evaluator references held by this object using the reference-to-reference
mapping in the specified
CopyContext. |
addEndOfAvailabilityStoppingConditions, addStepTaken, clone, dispose, getAdapters, getAvailabilityIntervals, getCachingWrapper, getCurrentDate, getCurrentState, getGroup, getInitialPropagationDirection, getIsThreadSafe, getPreviousDate, getStoppingConditionEvaluators, isAvailable, propagateUntilStop, propagateUntilStop, propagateUntilStop, propagateUntilStop, removeStepTaken, restep, setCurrentState, setPreviousDateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseprotected SinglePointStoppablePropagator(@Nonnull EvaluatorGroup group, @Nonnull SinglePointStoppablePropagatorDefinition definition, @Nonnull List<StateElementAdapterDefinition> previousAdapters)
group - The EvaluatorGroup to use when creating any needed evaluators.definition - The StoppablePropagatorDefinition creating this propagator.previousAdapters - The adapters to use to configure this propagators
Adapters (get).protected SinglePointStoppablePropagator(@Nonnull SinglePointStoppablePropagator existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext) for more information about how to implement this constructor
in a derived class.
existingInstance - The existing instance to copy.context - A CopyContext that controls the depth of the copy.ArgumentNullException - Thrown when existingInstance or context is null.public void updateEvaluatorReferences(CopyContext context)
CopyContext.
The following example shows how to implement this method for an evaluator that contains a nested evaluator:
@Override
public final void updateEvaluatorReferences(CopyContext context) {
m_nestedEvaluator = context.updateReference(m_nestedEvaluator);
}
This method is called by EvaluatorGroup and usually does not need to be
called directly by users. EvaluatorGroup uses this method to replace references
to shared evaluators with references to caching versions of the evaluators.
To implement this method, call CopyContext.updateReference(T) on each evaluator reference
held by your evaluator and assign the return value back to the field.
updateEvaluatorReferences in interface IEvaluatorupdateEvaluatorReferences in class StoppablePropagatorcontext - The context that specifies the reference mapping.protected void dispose(boolean disposing)
dispose in class StoppablePropagatordisposing - true to release both managed and unmanaged resources;
false to release only unmanaged resources.public ITimeBasedState getInitialState(@Nonnull IntegrationSense direction)
StoppablePropagator.propagateUntilStop(ITimeBasedState,Iterable,IntegrationSense,boolean,int,ITrackCalculationProgress)
method. However should the propagator be configured to have an initial state it should be
returned here.getInitialState in class StoppablePropagatordirection - Which direction the propagation is going.null, or the initial state of the wrapped propagator as initially configured.public final SinglePointStoppablePropagatorResults propagateUntilStop(@Nonnull JulianDate initialDate, @Nonnull Motion1<Cartesian> initialState, @Nonnull IntegrationSense direction, ITrackCalculationProgress progressTracker)
Point forward in time from the initial conditions.public final SinglePointStoppablePropagatorResults propagateUntilStop(@Nonnull JulianDate initialDate, @Nonnull Motion1<Cartesian> initialState, Iterable<? extends StoppingConditionEvaluator> conditions, @Nonnull IntegrationSense direction, int outputSparsity, ITrackCalculationProgress progressTracker)
Point forward in time from the initial conditions.initialDate - The date to start propagating from.initialState - The initial Motion1 to start propagating from.conditions - Additional stopping conditions to consider
for just this propagation.direction - Should propagation go forward or backward.outputSparsity - The interval at which to produce output samples.
By default this should be set to one, meaning that output will be saved in the saved states
for every step. If a thinner (but less accurate) ephemeris is desired you can set this
to a higher number. Two means that output is saved every other integration step, etc, etc.progressTracker - An optional progress tracker.@Nonnull protected Duration getPropagatorsRecommendedStep()
StoppingConditions can know how to sample themselves
and if their step size will be used if it is smaller than the propagators recommended value.
Also when this StoppablePropagator is restepping to find the exact event, this
value will be ignored.getPropagatorsRecommendedStep in class StoppablePropagatorprotected abstract PointEvaluator initializePropagationPoint(@Nonnull JulianDate date, @Nonnull Motion1<Cartesian> motion)
Creates the PointEvaluator that will be sampled for propagation. Note that it is possible,
and sometimes required, to make this PointEvaluator with a different EvaluatorGroup
than the one that made this propagator. Do not cache the group that made this propagator, and design your
derived propagator to have no undesired side effects or dependencies on the PointEvaluator
returned from this method.
date - The initial date of the point.motion - The initial Motion1 of the returned point.PointEvaluator that will be sampled by this stoppable propagator.public void initializePropagator(ITimeBasedState initialState)
initialState
is null, then it is the responsibility of the calling code for the initial state passed into the
StoppablePropagator.propagateUntilStop(ITimeBasedState,Iterable,IntegrationSense,boolean,int,ITrackCalculationProgress)
method to already be in the correct ReferenceFrame or Axes.initializePropagator in class StoppablePropagatorinitialState - The new initial state to propagate from.
This state will be processed by the Adapters (get).public ITimeBasedState takeStep(@Nonnull Duration step, boolean createNewState)
step matters, if
is it negative then the step should be taken backwards.takeStep in class StoppablePropagatorstep - The step to take from the CurrentDate (get). You do not need to
update the CurrentDate (get) or any other properties on the base type in the overridden
method.createNewState - For performance reasons, it is not always desirable to create a
new ITimeBasedState at every step. If this is true, you must create a
new instance of a state. If this is false, then this method can return a mutable state
that has just been updated with the current information.CurrentDate (get) plus the step.protected StoppablePropagatorResults createStoppedPropagatorResult(StoppingConditionEvent stoppingEvent, List<StoppingConditionEvent> detectedEvents, List<ITimeBasedState> savedStates, boolean aborted)
createStoppedPropagatorResult in class StoppablePropagatorstoppingEvent - The event that actually stopped propagation.detectedEvents - All of the events found during propagation.savedStates - All the states saved during propagation.aborted - If the run was aborted.protected final ReferenceFrame getPropagationFrame()
ReferenceFrame to propagate the point in.