T
- type of the field elementspublic class FieldBooleanDetector<T extends org.hipparchus.CalculusFieldElement<T>> extends FieldAbstractDetector<FieldBooleanDetector<T>,T>
One example for an imaging satellite might be to only detect events when a satellite is overhead (elevation > 0) AND when the ground point is sunlit (Sun elevation > 0). Another slightly contrived example using the OR operator would be to detect access to a set of ground stations and only report events when the satellite enters or leaves the field of view of the set, but not hand-offs between the ground stations.
For the FieldBooleanDetector is important that the sign of the g function of the
underlying event detector is not arbitrary, but has a semantic meaning, e.g. in or out,
true or false. This class works well with event detectors that detect entry to or exit
from a region, e.g. FieldEclipseDetector
, FieldElevationDetector
, FieldLatitudeCrossingDetector
. Using this detector with detectors that are not based on
entry to or exit from a region, e.g. FieldDateDetector
, will likely lead to
unexpected results. To apply conditions to this latter type of event detectors a
FieldEventEnablingPredicateFilter
is usually more appropriate.
andCombine(Collection)
,
orCombine(Collection)
,
notCombine(FieldEventDetector)
,
EventEnablingPredicateFilter
,
EventSlopeFilter
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Modifier | Constructor and Description |
---|---|
protected |
FieldBooleanDetector(List<FieldEventDetector<T>> detectors,
org.orekit.propagation.events.FieldBooleanDetector.Operator operator,
FieldAdaptableInterval<T> newMaxCheck,
T newThreshold,
int newMaxIter,
FieldEventHandler<T> newHandler)
Private constructor with all the parameters.
|
Modifier and Type | Method and Description |
---|---|
static <T extends org.hipparchus.CalculusFieldElement<T>> |
andCombine(Collection<? extends FieldEventDetector<T>> detectors)
Create a new event detector that is the logical AND of the given event detectors.
|
static <T extends org.hipparchus.CalculusFieldElement<T>> |
andCombine(FieldEventDetector<T>... detectors)
Create a new event detector that is the logical AND of the given event detectors.
|
protected FieldBooleanDetector<T> |
create(FieldAdaptableInterval<T> newMaxCheck,
T newThreshold,
int newMaxIter,
FieldEventHandler<T> newHandler)
Build a new instance.
|
T |
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.
|
List<FieldEventDetector<T>> |
getDetectors()
Get the list of original detectors.
|
void |
init(FieldSpacecraftState<T> s0,
FieldAbsoluteDate<T> t)
Initialize event handler at the start of a propagation.
|
static <T extends org.hipparchus.CalculusFieldElement<T>> |
notCombine(FieldEventDetector<T> detector)
Create a new event detector that negates the g function of another detector.
|
static <T extends org.hipparchus.CalculusFieldElement<T>> |
orCombine(Collection<? extends FieldEventDetector<T>> detectors)
Create a new event detector that is the logical OR of the given event detectors.
|
static <T extends org.hipparchus.CalculusFieldElement<T>> |
orCombine(FieldEventDetector<T>... detectors)
Create a new event detector that is the logical OR of the given event detectors.
|
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
protected FieldBooleanDetector(List<FieldEventDetector<T>> detectors, org.orekit.propagation.events.FieldBooleanDetector.Operator operator, FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
detectors
- the operands.operator
- reduction operator to apply to value of the g function of the
operands.newMaxCheck
- max check interval.newThreshold
- convergence threshold in seconds.newMaxIter
- max iterations.newHandler
- event handler.@SafeVarargs public static <T extends org.hipparchus.CalculusFieldElement<T>> FieldBooleanDetector<T> andCombine(FieldEventDetector<T>... detectors)
The created event detector's g function is positive if and only if the g
functions of all detectors in detectors
are positive.
The starting interval, threshold, and iteration count are set to the most
stringent (minimum) of all the detectors
. The event handlers of the
underlying detectors
are not used, instead the default handler is FieldContinueOnEvent
.
T
- type of the field elementsdetectors
- the operands. Must contain at least one detector.NoSuchElementException
- if detectors
is empty.FieldBooleanDetector
,
andCombine(Collection)
,
orCombine(FieldEventDetector...)
,
notCombine(FieldEventDetector)
public static <T extends org.hipparchus.CalculusFieldElement<T>> FieldBooleanDetector<T> andCombine(Collection<? extends FieldEventDetector<T>> detectors)
The created event detector's g function is positive if and only if the g
functions of all detectors in detectors
are positive.
The starting interval, threshold, and iteration count are set to the most
stringent (minimum) of the detectors
. The event handlers of the
underlying detectors
are not used, instead the default handler is FieldContinueOnEvent
.
T
- type of the field elementsdetectors
- the operands. Must contain at least one detector.NoSuchElementException
- if detectors
is empty.FieldBooleanDetector
,
andCombine(FieldEventDetector...)
,
orCombine(Collection)
,
notCombine(FieldEventDetector)
@SafeVarargs public static <T extends org.hipparchus.CalculusFieldElement<T>> FieldBooleanDetector<T> orCombine(FieldEventDetector<T>... detectors)
The created event detector's g function is positive if and only if at least
one of g functions of the event detectors in detectors
is positive.
The starting interval, threshold, and iteration count are set to the most
stringent (minimum) of the detectors
. The event handlers of the
underlying EventDetectors are not used, instead the default handler is FieldContinueOnEvent
.
T
- type of the field elementsdetectors
- the operands. Must contain at least one detector.NoSuchElementException
- if detectors
is empty.FieldBooleanDetector
,
orCombine(Collection)
,
andCombine(FieldEventDetector...)
,
notCombine(FieldEventDetector)
public static <T extends org.hipparchus.CalculusFieldElement<T>> FieldBooleanDetector<T> orCombine(Collection<? extends FieldEventDetector<T>> detectors)
The created event detector's g function is positive if and only if at least
one of g functions of the event detectors in detectors
is positive.
The starting interval, threshold, and iteration count are set to the most
stringent (minimum) of the detectors
. The event handlers of the
underlying EventDetectors are not used, instead the default handler is FieldContinueOnEvent
.
T
- type of the field elementsdetectors
- the operands. Must contain at least one detector.NoSuchElementException
- if detectors
is empty.FieldBooleanDetector
,
orCombine(FieldEventDetector...)
,
andCombine(Collection)
,
notCombine(FieldEventDetector)
public static <T extends org.hipparchus.CalculusFieldElement<T>> FieldNegateDetector<T> notCombine(FieldEventDetector<T> detector)
This detector will be initialized with the same FieldEventDetector.getMaxCheckInterval()
, FieldEventDetector.getThreshold()
, and
FieldEventDetector.getMaxIterationCount()
as detector
. The event handler
of the underlying detector is not used, instead the default handler is FieldContinueOnEvent
.
T
- type of the field elementsdetector
- to negate.detector
.andCombine(Collection)
,
orCombine(Collection)
,
FieldBooleanDetector
public T g(FieldSpacecraftState<T> s)
FieldAbstractDetector
g
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
g
in class FieldAbstractDetector<FieldBooleanDetector<T extends org.hipparchus.CalculusFieldElement<T>>,T extends org.hipparchus.CalculusFieldElement<T>>
s
- the current state information: date, kinematics, attitudeprotected FieldBooleanDetector<T> create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
FieldAbstractDetector
create
in class FieldAbstractDetector<FieldBooleanDetector<T extends org.hipparchus.CalculusFieldElement<T>>,T extends org.hipparchus.CalculusFieldElement<T>>
newMaxCheck
- maximum checking intervalnewThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
FieldAbstractDetector
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
init
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
init
in class FieldAbstractDetector<FieldBooleanDetector<T extends org.hipparchus.CalculusFieldElement<T>>,T extends org.hipparchus.CalculusFieldElement<T>>
s0
- initial statet
- target time for the integrationpublic List<FieldEventDetector<T>> getDetectors()
Copyright © 2002-2023 CS GROUP. All rights reserved.