Interface EventFunction

All Known Subinterfaces:
EventFunctionModifier
All Known Implementing Classes:
AbstractElevationCrossingFunction, AbstractGeodeticEventFunction, AbstractGeodeticExtremumEventFunction, AbstractTopocentricEventFunction, AltitudeEventFunction, ApsideEventFunction, BooleanEventFunction, ControlSwitchFunction, ElevationExtremumEventFunction, ElevationValueCrossingFunction, ExtremumAngularSeparationFunction, FieldAbstractCartesianCost.FieldSwitchFunction, GroundAtNightEventFunction, LatitudeExtremumEventFunction, LatitudeValueCrossingFunction, LongitudeExtremumEventFunction, LongitudeValueCrossingFunction, MaskedElevationEventFunction, NegateEventFunction, NodeEventFunction, PenumbraEventFunction, PlaneCrossingFunction, ShiftedEventFunction, SingleDateEventFunction, TimeIntervalEventFunction, UmbraEventFunction
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:
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    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 boolean
    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>>
    EventFunction
    of(Field<T> field, Function<FieldSpacecraftState<T>,T> fieldStateFunction)
    Builds an instance from a mapping with a single Field.
    default <T extends CalculusFieldElement<T>>
    T
    value(FieldSpacecraftState<T> fieldState)
    Evaluate Field function.
    double
    Evaluate function.
  • Method Details

    • 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 field
      fieldStateFunction - Field function
      Returns:
      generic event function working for any field