Serializable
, EventDetector
AlignmentDetector
, AltitudeDetector
, AngularSeparationDetector
, ApsideDetector
, BooleanDetector
, CircularFieldOfViewDetector
, DateDetector
, EclipseDetector
, ElevationDetector
, ElevationExtremumDetector
, EventEnablingPredicateFilter
, EventShifter
, EventSlopeFilter
, FieldOfViewDetector
, FootprintOverlapDetector
, FunctionalDetector
, GeographicZoneDetector
, GroundFieldOfViewDetector
, ImpulseManeuver
, LatitudeCrossingDetector
, LatitudeExtremumDetector
, LongitudeCrossingDetector
, LongitudeExtremumDetector
, NegateDetector
, NodeDetector
, PositionAngleDetector
public abstract class AbstractDetector<T extends EventDetector> extends Object implements EventDetector
Propagator.addEventDetector(EventDetector)
,
Serialized FormModifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_MAX_ITER |
Default cmaximum number of iterations in the event time search.
|
static double |
DEFAULT_MAXCHECK |
Default maximum checking interval (s).
|
static double |
DEFAULT_THRESHOLD |
Default convergence threshold (s).
|
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractDetector(double maxCheck,
double threshold,
int maxIter,
EventHandler<? super T> handler) |
Build a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
protected abstract T |
create(double newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler<? super T> newHandler) |
Build a new instance.
|
EventHandler.Action |
eventOccurred(SpacecraftState s,
boolean increasing) |
Handle the event.
|
abstract double |
g(SpacecraftState s) |
Compute the value of the switching function.
|
EventHandler<? super T> |
getHandler() |
Get the handler.
|
double |
getMaxCheckInterval() |
Get maximal time interval between switching function checks.
|
int |
getMaxIterationCount() |
Get maximal number of iterations in the event time search.
|
double |
getThreshold() |
Get the convergence threshold in the event time search.
|
void |
init(SpacecraftState s0,
AbsoluteDate t) |
Initialize event handler at the start of a propagation.
|
boolean |
isForward() |
Check if the current propagation is forward or backward.
|
SpacecraftState |
resetState(SpacecraftState oldState) |
Reset the state prior to continue propagation.
|
T |
withHandler(EventHandler<? super T> newHandler) |
Setup the event handler to call at event occurrences.
|
T |
withMaxCheck(double newMaxCheck) |
Setup the maximum checking interval.
|
T |
withMaxIter(int newMaxIter) |
Setup the maximum number of iterations in the event time search.
|
T |
withThreshold(double newThreshold) |
Setup the convergence threshold.
|
public static final double DEFAULT_MAXCHECK
public static final double DEFAULT_THRESHOLD
public static final int DEFAULT_MAX_ITER
protected AbstractDetector(double maxCheck, double threshold, int maxIter, EventHandler<? super T> handler)
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencespublic void init(SpacecraftState s0, AbsoluteDate t) throws OrekitException
This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
The default implementation does nothing
This implementation sets the direction of propagation and initializes the event
handler. If a subclass overrides this method it should call
super.init(s0, t)
.
init
in interface EventDetector
s0
- initial statet
- target time for the integrationOrekitException
- if some specific error occurspublic abstract double g(SpacecraftState s) throws OrekitException
g
in interface EventDetector
s
- the current state information: date, kinematics, attitudeOrekitException
- if some specific error occurspublic double getMaxCheckInterval()
getMaxCheckInterval
in interface EventDetector
public int getMaxIterationCount()
getMaxIterationCount
in interface EventDetector
public double getThreshold()
getThreshold
in interface EventDetector
public T withMaxCheck(double newMaxCheck)
This will override a maximum checking interval if it has been configured previously.
newMaxCheck
- maximum checking interval (s)public T withMaxIter(int newMaxIter)
This will override a number of iterations if it has been configured previously.
newMaxIter
- maximum number of iterations in the event time searchpublic T withThreshold(double newThreshold)
This will override a convergence threshold if it has been configured previously.
newThreshold
- convergence threshold (s)public T withHandler(EventHandler<? super T> newHandler)
This will override a handler if it has been configured previously.
newHandler
- event handler to call at event occurrencespublic EventHandler<? super T> getHandler()
public EventHandler.Action eventOccurred(SpacecraftState s, boolean increasing) throws OrekitException
eventOccurred
in interface EventDetector
s
- SpaceCraft state to be used in the evaluationincreasing
- with the event occurred in an "increasing" or "decreasing" slope directionOrekitException
- if some specific error occurspublic SpacecraftState resetState(SpacecraftState oldState) throws OrekitException
This method is called after the step handler has returned and
before the next step is started, but only when EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean)
has itself returned the EventHandler.Action.RESET_STATE
indicator. It allows the user to reset the state for the next step,
without perturbing the step handler of the finishing step. If the
EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean)
never returns the EventHandler.Action.RESET_STATE
indicator, this function will never be called, and it is safe to simply return null.
The default implementation simply returns its argument.
resetState
in interface EventDetector
oldState
- old stateOrekitException
- if the state cannot be resetedprotected abstract T create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super T> newHandler)
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic boolean isForward()
Copyright © 2002-2018 CS Systèmes d'information. All rights reserved.