Interface EventFunctionModifier

All Superinterfaces:
EventFunction
All Known Implementing Classes:
FieldAbstractCartesianCost.FieldSwitchFunction, NegateEventFunction, ShiftedEventFunction

public interface EventFunctionModifier extends EventFunction
Event function modifier. Default implementations simply wrap the base function.
Since:
14.0
Author:
Romain Serra
See Also:
  • Method Details

    • getBaseFunction

      EventFunction getBaseFunction()
      Get the base event function.
      Returns:
      base event function
    • value

      default double value(SpacecraftState state)
      Description copied from interface: EventFunction
      Evaluate function.
      Specified by:
      value in interface EventFunction
      Parameters:
      state - spacecraft state
      Returns:
      value
    • value

      default <T extends CalculusFieldElement<T>> T value(FieldSpacecraftState<T> fieldState)
      Description copied from interface: EventFunction
      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.
      Specified by:
      value in interface EventFunction
      Type Parameters:
      T - field type
      Parameters:
      fieldState - spacecraft state
      Returns:
      value
    • dependsOnTimeOnly

      default boolean dependsOnTimeOnly()
      Description copied from interface: EventFunction
      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.
      Specified by:
      dependsOnTimeOnly in interface EventFunction
      Returns:
      flag
    • dependsOnMainVariablesOnly

      default boolean dependsOnMainVariablesOnly()
      Description copied from interface: EventFunction
      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.
      Specified by:
      dependsOnMainVariablesOnly in interface EventFunction
      Returns:
      flag
    • addReal

      static EventFunctionModifier addReal(EventFunction eventFunction, double increment)
      Create a modifier that adds a real increment to the event function value.
      Parameters:
      eventFunction - base event function
      increment - real increment to add
      Returns:
      modifier wrapping the base function
    • addFieldValue

      static <S extends CalculusFieldElement<S>> EventFunctionModifier addFieldValue(EventFunction eventFunction, S increment)
      Create a modifier that adds a field element increment to the event function value.
      Type Parameters:
      S - type of the field element increment
      Parameters:
      eventFunction - base event function
      increment - field element increment to add
      Returns:
      modifier wrapping the base function