D - an event detectorpublic class ExtremaGenericDetector<D extends EventDetector> extends AbstractDetector
underlyingDetector.
The extrema detector switching function simply returns the difference of the switching function values of underlying
detector assessed at {date+halfComputationStep and {date-halfComputationStep .
The default implementation behavior is to
continue propagation at min detection
and to continue propagation at max
detection. This can be changed by using provided constructors.
| Modifier and Type | Class and Description |
|---|---|
static class |
ExtremaGenericDetector.ExtremumType
Enumerate defining the type of extrema looked for.
|
EventDetector.Action| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_HALF_COMPUTATION_STEP
Default half computation step.
|
static double |
DEFAULT_MAXCHECK
Default maximum checking interval in seconds
|
actionAtEntry, actionAtExit, DEFAULT_MAXITER, DEFAULT_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlagDECREASING, INCREASING, INCREASING_DECREASING| Constructor and Description |
|---|
ExtremaGenericDetector(D underlyingDetector,
ExtremaGenericDetector.ExtremumType extremumType)
Builds an extrema direction occultation detector.
|
ExtremaGenericDetector(D underlyingDetector,
ExtremaGenericDetector.ExtremumType extremumType,
double halfComputationStep)
Builds an extrema direction occultation detector.
|
ExtremaGenericDetector(D underlyingDetector,
ExtremaGenericDetector.ExtremumType extremumType,
double halfComputationStep,
double maxCheck)
Builds an extrema events detector.
|
ExtremaGenericDetector(D underlyingDetector,
ExtremaGenericDetector.ExtremumType extremumType,
double halfComputationStep,
double maxCheck,
double threshold)
Builds an extrema direction occultation detector.
|
ExtremaGenericDetector(D underlyingDetector,
ExtremaGenericDetector.ExtremumType extremumType,
double halfComputationStep,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax)
Builds an extrema events detector.
|
ExtremaGenericDetector(D underlyingDetector,
ExtremaGenericDetector.ExtremumType extremumType,
double halfComputationStep,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax,
boolean removeAtMin,
boolean removeAtMax)
Builds an extrema events detector.
|
| Modifier and Type | Method and Description |
|---|---|
ExtremaGenericDetector<D> |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
SpacecraftState |
logExtremaEventsOverTimeInterval(CodedEventsLogger eventsLogger,
Propagator satProp,
AbsoluteDateInterval interval)
Log extrema events into the entered events logger.
|
filterEvent, getActionAtEntry, getActionAtExit, getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init, isRemoveAtEntry, isRemoveAtExit, logEventsOverTimeInterval, resetState, setMaxCheckInterval, setMaxIter, shouldBeRemovedpublic static final double DEFAULT_MAXCHECK
public static final double DEFAULT_HALF_COMPUTATION_STEP
public ExtremaGenericDetector(D underlyingDetector, ExtremaGenericDetector.ExtremumType extremumType)
This constructor takes default values for half computation step (DEFAULT_HALF_COMPUTATION_STEP
), maximal checking interval (DEFAULT_MAXCHECK) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD).
The default implementation behavior is to
continue propagation at min
detection and to continue
propagation at max detection.
The default implementation behavior is to keep the detector at min detection and to keep the detector at max detection.
public ExtremaGenericDetector(D underlyingDetector, ExtremaGenericDetector.ExtremumType extremumType, double halfComputationStep)
This constructor takes default values for maximal checking interval (DEFAULT_MAXCHECK) and convergence
threshold (AbstractDetector.DEFAULT_THRESHOLD).
The default implementation behavior is to
continue propagation at min
detection and to continue
propagation at max detection.
The default implementation behavior is to keep the detector at min detection and to keep the detector at max detection.
underlyingDetector - zero crossing detector whose extrema are looked forextremumType - extremum type (MIN, MAX or MIN_MAX)halfComputationStep - current extrema detector g function is computed by difference of g function values of underlyingDetector
between
{date-halfComputationStep} and {date+halfComputationStep}public ExtremaGenericDetector(D underlyingDetector, ExtremaGenericDetector.ExtremumType extremumType, double halfComputationStep, double maxCheck)
This constructor takes default value for convergence threshold (AbstractDetector.DEFAULT_THRESHOLD).
The default implementation behavior is to
continue propagation at min
detection and to continue
propagation at max detection.
The default implementation behavior is to keep the detector at min detection and to keep the detector at max detection.
underlyingDetector - zero crossing detector whose extrema are looked forextremumType - extremum type (MIN, MAX or MIN_MAX)halfComputationStep - current extrema detector g function is computed by difference of g function values of underlyingDetector
between
{date-halfComputationStep} and {date+halfComputationStep}maxCheck - default maximum checking interval in seconds (see AbstractDetector)public ExtremaGenericDetector(D underlyingDetector, ExtremaGenericDetector.ExtremumType extremumType, double halfComputationStep, double maxCheck, double threshold)
The default implementation behavior is to
continue propagation at min
detection and to continue
propagation at max detection.
The default implementation behavior is to keep the detector at min detection and to keep the detector at max detection.
underlyingDetector - zero crossing detector whose extrema are looked forextremumType - extremum type (MIN, MAX or MIN_MAX)halfComputationStep - current extrema detector g function is computed by difference of g function values of underlyingDetector
between
{date-halfComputationStep} and {date+halfComputationStep}maxCheck - default maximum checking interval in seconds (see AbstractDetector)threshold - default convergence threshold (see AbstractDetector)public ExtremaGenericDetector(D underlyingDetector, ExtremaGenericDetector.ExtremumType extremumType, double halfComputationStep, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax)
The default implementation behavior is to keep the detector at min detection and to keep the detector at max detection.
underlyingDetector - zero crossing detector whose extrema are looked forextremumType - extremum type (MIN, MAX or MIN_MAX)halfComputationStep - current extrema detector g function is computed by difference of g function values of underlyingDetector
between
{date-halfComputationStep} and {date+halfComputationStep}maxCheck - default maximum checking interval in seconds (see AbstractDetector)threshold - default convergence threshold (see AbstractDetector)actionMin - action performed at maskingactionMax - action performed when masking endspublic ExtremaGenericDetector(D underlyingDetector, ExtremaGenericDetector.ExtremumType extremumType, double halfComputationStep, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax, boolean removeAtMin, boolean removeAtMax)
underlyingDetector - zero crossing detector whose extrema are looked forextremumType - extremum type (MIN, MAX or MIN_MAX)halfComputationStep - current extrema detector g function is computed by difference of g function values of underlyingDetector
between
{date-halfComputationStep} and {date+halfComputationStep}maxCheck - default maximum checking interval in seconds (see AbstractDetector)threshold - default convergence threshold (see AbstractDetector)actionMin - action performed at maskingactionMax - action performed when masking endsremoveAtMin - true if detector shall be removed at maskingremoveAtMax - true if detector shall be removed when masking endspublic EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The scheduling between this method and the PatriusStepHandler method handleStep() is to call this method first
and handleStep afterwards. This scheduling allows the propagator to pass true as the
isLast parameter to the step handler to make it aware the step will be the last one if this method
returns EventDetector.Action.STOP. As the interpolator may be used to navigate back throughout the last
step (as OrekitStepNormalizer does for example), user code called by this method and user code called by step handlers
may experience apparently out of order values of the independent time variable. As an example, if the same user
object implements both this EventDetector interface and the OrekitFixedStepHandler interface, a forward integration may call its eventOccurred method
with a state at 2000-01-01T00:00:10 first and call its handleStep method with a state at
2000-01-01T00:00:09 afterwards. Such out of order calls are limited to the size of the integration step for
variable step handlers and to the size of
the fixed step for fixed step
handlers.
eventOccurred in interface EventDetectoreventOccurred in class AbstractDetectors - the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesincreasing - if true, the value of the switching function increases when times increases
around event (note that increase is measured with respect to physical time, not with
respect to propagation which may go backward in time)forward - if true, the integration variable (time) increases during integration.EventDetector.Action.STOP, EventDetector.Action.RESET_STATE,
EventDetector.Action.RESET_DERIVATIVES, EventDetector.Action.CONTINUEPatriusException - if some specific error occurspublic ExtremaGenericDetector<D> copy()
public double g(SpacecraftState s) throws PatriusException
g in interface EventDetectorg in class AbstractDetectors - the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesPatriusException - if some specific error occurspublic SpacecraftState logExtremaEventsOverTimeInterval(CodedEventsLogger eventsLogger, Propagator satProp, AbsoluteDateInterval interval) throws PatriusException
eventsLogger - input events logger in which the events must be recordedsatProp - spacecraft orbit propagatorinterval - time interval on which the events are computedPatriusException - if spacecraft state cannot be propagatedCopyright © 2025 CNES. All rights reserved.