Class BooleanEventFunction
- java.lang.Object
-
- org.orekit.propagation.events.functions.BooleanEventFunction
-
- All Implemented Interfaces:
EventFunction
public class BooleanEventFunction extends Object implements EventFunction
This class provides AND and OR operations for event functions. This class treats positive values of the g function as true and negative values as false.- Since:
- 14.0
- Author:
- Evan Ward, Romain Serra
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BooleanEventFunctionandCombine(List<EventFunction> eventFunctions)Builds an AND instance.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).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 BooleanEventFunctionorCombine(List<EventFunction> eventFunctions)Builds an OR instance.<T extends CalculusFieldElement<T>>
Tvalue(FieldSpacecraftState<T> fieldState)Evaluate Field function.doublevalue(SpacecraftState s)Evaluate function.
-
-
-
Method Detail
-
orCombine
public static BooleanEventFunction orCombine(List<EventFunction> eventFunctions)
Builds an OR instance.- Parameters:
eventFunctions- functions to reduce- Returns:
- reduced event function
-
andCombine
public static BooleanEventFunction andCombine(List<EventFunction> eventFunctions)
Builds an AND instance.- Parameters:
eventFunctions- functions to reduce- Returns:
- reduced event function
-
value
public double value(SpacecraftState s)
Description copied from interface:EventFunctionEvaluate function.- Specified by:
valuein interfaceEventFunction- Parameters:
s- spacecraft state- Returns:
- value
-
value
public <T extends CalculusFieldElement<T>> T value(FieldSpacecraftState<T> fieldState)
Description copied from interface:EventFunctionEvaluate 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.- Specified by:
valuein interfaceEventFunction- Type Parameters:
T- field type- Parameters:
fieldState- spacecraft state- Returns:
- value
-
dependsOnTimeOnly
public boolean dependsOnTimeOnly()
Description copied from interface:EventFunctionMethod 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.- Specified by:
dependsOnTimeOnlyin interfaceEventFunction- Returns:
- flag
-
dependsOnMainVariablesOnly
public boolean dependsOnMainVariablesOnly()
Description copied from interface:EventFunctionMethod 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.- Specified by:
dependsOnMainVariablesOnlyin interfaceEventFunction- Returns:
- flag
-
-