Interface EventFunction
-
- All Known Subinterfaces:
EventFunctionModifier
- All Known Implementing Classes:
AbstractElevationEventFunction,AbstractGeodeticExtremumEventFunction,ApsideEventFunction,BooleanEventFunction,ElevationExtremumEventFunction,GroundAtNightEventFunction,LatitudeExtremumEventFunction,LongitudeExtremumEventFunction,MaskedElevationEventFunction,MinimumElevationEventFunction,NodeEventFunction,ShiftedEventFunction,SingleDateEventFunction,TimeIntervalEventFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface EventFunction
Interface for functions defining events via their roots a.k.a. zeroes. It regroups standard (double) and Field methods.- Since:
- 14.0
- Author:
- Romain Serra
- See Also:
EventDetector,FieldEventDetector
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleandependsOnMainVariablesOnly()Method returning true if and only if the event function does not depend on dependent variables, other than the Cartesian coordinates (or equivalent), mass and attitude (excepts for its rates).default booleandependsOnTimeOnly()Method returning true if and only if the event function does not depend on dependent variables, just the independent one i.e. time.static <T extends CalculusFieldElement<T>>
EventFunctionof(Field<T> field, Function<FieldSpacecraftState<T>,T> fieldStateFunction)Builds an instance from a mapping with a single Field.default <T extends CalculusFieldElement<T>>
Tvalue(FieldSpacecraftState<T> fieldState)Evaluate Field function.doublevalue(SpacecraftState state)Evaluate function.
-
-
-
Method Detail
-
value
double value(SpacecraftState state)
Evaluate function.- Parameters:
state- spacecraft state- Returns:
- value
-
value
default <T extends CalculusFieldElement<T>> T value(FieldSpacecraftState<T> fieldState)
Evaluate Field function. By default, calls the non-Field version. This is suitable for detection but not be for applications like automatic differentiation, where a proper implementation should be used instead.- Type Parameters:
T- field type- Parameters:
fieldState- spacecraft state- Returns:
- value
-
dependsOnTimeOnly
default boolean dependsOnTimeOnly()
Method returning true if and only if the event function does not depend on dependent variables, just the independent one i.e. time. This information is used for performance in propagation and derivatives correction with switches in the dynamics.- Returns:
- flag
-
dependsOnMainVariablesOnly
default boolean dependsOnMainVariablesOnly()
Method returning true if and only if the event function does not depend on dependent variables, other than the Cartesian coordinates (or equivalent), mass and attitude (excepts for its rates). It should thus return false if the STM is needed to evaluate the event. This information is used for performance in propagation.- Returns:
- flag
-
of
static <T extends CalculusFieldElement<T>> EventFunction of(Field<T> field, Function<FieldSpacecraftState<T>,T> fieldStateFunction)
Builds an instance from a mapping with a single Field. Generalizes naively to all other Field via real part. Flags are set to default values.- Type Parameters:
T- field type- Parameters:
field- original fieldfieldStateFunction- Field function- Returns:
- generic event function working for any field
-
-