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.
|
AbstractDetector.PropagationDelayType
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_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlag
DECREASING, 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.
Warning: The propagation is actually performed on an enlarged time interval with respect to the entered one, in order to detect all the extrema, included these shortly after interval beginning or shortly before interval end: The propagation starts -2*maxCheck prior to the interval beginning date The propagation stops 2*maxCheck after the interval end date The detection of events will take place in the enlarged time interval, therefore there may be some events detected outside the given input time interval. |
getActionAtEntry, getActionAtExit, getInertialFrame, getMaxCheckInterval, getMaxIterationCount, getPropagationDelayType, getSignalEmissionDate, getSignalReceptionDate, getSlopeSelection, getThreshold, init, isRemoveAtEntry, isRemoveAtExit, logEventsOverTimeInterval, resetState, setEpsilonSignalPropagation, setMaxCheckInterval, setMaxIterSignalPropagation, setPropagationDelayType, shouldBeRemoved
public 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 EventDetector
eventOccurred
in class AbstractDetector
s
- 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.CONTINUE
PatriusException
- if some specific error occurspublic ExtremaGenericDetector<D> copy()
public double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- 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 © 2023 CNES. All rights reserved.