Serializable, EventDetectorpublic class FunctionalDetector extends AbstractDetector<FunctionalDetector>
g(SpacecraftState) function using a lambda that
can be set using withFunction(ToDoubleFunction).
For example, to create a simple date detector use:
FunctionalDetector d = new FunctionalDetector()
.withGFunction((s) -> s.getDate().durationFrom(triggerDate))
.withMaxCheck(1e10);
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
FunctionalDetector.GFunction |
Deprecated.
Use
ToDoubleFunction |
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD| Constructor | Description |
|---|---|
FunctionalDetector() |
Create an event detector with the default values.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected FunctionalDetector |
create(double newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler<? super FunctionalDetector> newHandler) |
Build a new instance.
|
double |
g(SpacecraftState s) |
Compute the value of the switching function.
|
ToDoubleFunction<SpacecraftState> |
getFunction() |
Get the switching function.
|
FunctionalDetector.GFunction |
getGFunction() |
Deprecated.
use
getFunction() instead. Will be removed in next major
release. |
FunctionalDetector |
withFunction(ToDoubleFunction<SpacecraftState> newGFunction) |
Create a new event detector with a new g function, keeping all other attributes the
same.
|
FunctionalDetector |
withGFunction(FunctionalDetector.GFunction newGFunction) |
Deprecated.
Use
withFunction(ToDoubleFunction) instead. Will be removed in
next major release. |
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThresholdpublic FunctionalDetector()
AbstractDetector.DEFAULT_MAXCHECK, AbstractDetector.DEFAULT_THRESHOLD, AbstractDetector.DEFAULT_MAX_ITER, ContinueOnEvent, and a g function that is identically unity.public double g(SpacecraftState s)
AbstractDetectorg in interface EventDetectorg in class AbstractDetector<FunctionalDetector>s - the current state information: date, kinematics, attitudeprotected FunctionalDetector create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super FunctionalDetector> newHandler)
AbstractDetectorcreate in class AbstractDetector<FunctionalDetector>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 FunctionalDetector withFunction(ToDoubleFunction<SpacecraftState> newGFunction)
AbstractDetector.withMaxCheck(double) and AbstractDetector.withThreshold(double) to set appropriate values for this g function.newGFunction - the new g function.@Deprecated public FunctionalDetector withGFunction(FunctionalDetector.GFunction newGFunction)
withFunction(ToDoubleFunction) instead. Will be removed in
next major release.AbstractDetector.withMaxCheck(double) and AbstractDetector.withThreshold(double) to set appropriate values for this g function.newGFunction - the new g function.@Deprecated public FunctionalDetector.GFunction getGFunction()
getFunction() instead. Will be removed in next major
release.g(SpacecraftState).public ToDoubleFunction<SpacecraftState> getFunction()
g(SpacecraftState).Copyright © 2002-2019 CS Systèmes d'information. All rights reserved.