Class ParameterDrivenDateIntervalDetector

java.lang.Object
org.orekit.propagation.events.AbstractDetector<ParameterDrivenDateIntervalDetector>
org.orekit.propagation.events.ParameterDrivenDateIntervalDetector
All Implemented Interfaces:
EventDetector

public class ParameterDrivenDateIntervalDetector extends AbstractDetector<ParameterDrivenDateIntervalDetector>
Detector for date intervals that may be offset thanks to parameter drivers.

Two dual views can be used for date intervals: either start date/stop date or median date/duration. start/stop drivers and median/duration drivers work in pair. Both drivers in one pair can be selected and their changes will be propagated to the other pair, but attempting to select drivers in both pairs at the same time will trigger an exception. Changing the value of a driver that is not selected should be avoided as it leads to inconsistencies between the pairs.

. Warning, startDate driver, stopDate driver, duration driver and medianDate driver must all have the same number of values to estimate (same number of span in valueSpanMap), that is is to say that the ParameterDriver.addSpans(AbsoluteDate, AbsoluteDate, double) should be called with same arguments.
Since:
11.1
Author:
Luc Maisonobe
See Also:
  • Field Details

  • Constructor Details

    • ParameterDrivenDateIntervalDetector

      public ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refMedian, double refDuration)
      Build a new instance.
      Parameters:
      prefix - prefix to use for parameter drivers names
      refMedian - reference interval median date
      refDuration - reference duration
    • ParameterDrivenDateIntervalDetector

      public ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refStart, AbsoluteDate refStop)
      Build a new instance.
      Parameters:
      prefix - prefix to use for parameter drivers names
      refStart - reference interval start date
      refStop - reference interval stop date
    • ParameterDrivenDateIntervalDetector

      protected ParameterDrivenDateIntervalDetector(EventDetectionSettings detectionSettings, EventHandler handler, DateDriver start, DateDriver stop, DateDriver median, ParameterDriver duration)
      Protected constructor with full parameters.

      This constructor is not public as users are expected to use the builder API with the various withXxx() methods to set up the instance in a readable manner without using a huge amount of parameters.

      Parameters:
      detectionSettings - event detection settings
      handler - event handler to call at event occurrences
      start - reference interval start driver
      stop - reference interval stop driver
      median - median date driver
      duration - duration driver
      Since:
      13.0
  • Method Details

    • getDefaultDetectionSettings

      public static EventDetectionSettings getDefaultDetectionSettings(AbsoluteDate refStart, AbsoluteDate refStop)
      Get default detection settings.
      Parameters:
      refStart - reference interval start date
      refStop - reference interval stop date
      Returns:
      default detection settings
      Since:
      13.0
    • create

      protected ParameterDrivenDateIntervalDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler)
      Build a new instance.
      Specified by:
      create in class AbstractDetector<ParameterDrivenDateIntervalDetector>
      Parameters:
      detectionSettings - detection settings
      newHandler - event handler to call at event occurrences
      Returns:
      a new instance of the appropriate sub-type
    • getStartDriver

      public DateDriver getStartDriver()
      Get the driver for start date.

      Note that the start date is automatically adjusted if either median date or duration are selected and changed.

      Returns:
      driver for start date
    • getStopDriver

      public DateDriver getStopDriver()
      Get the driver for stop date.

      Note that the stop date is automatically adjusted if either median date or duration are selected changed.

      Returns:
      driver for stop date
    • getMedianDriver

      public DateDriver getMedianDriver()
      Get the driver for median date.

      Note that the median date is automatically adjusted if either getStartDriver() start date or stop date are selected changed.

      Returns:
      driver for median date
    • getDurationDriver

      public ParameterDriver getDurationDriver()
      Get the driver for duration.

      Note that the duration is automatically adjusted if either getStartDriver() start date or stop date are selected changed.

      Returns:
      driver for duration
    • getEventFunction

      public EventFunction getEventFunction()
      Description copied from interface: EventDetector
      Get the event function. It defines g both for double and Field.
      Specified by:
      getEventFunction in interface EventDetector
      Overrides:
      getEventFunction in class AbstractDetector<ParameterDrivenDateIntervalDetector>
      Returns:
      event function
    • g

      public double g(SpacecraftState s)
      Compute the value of the switching function.

      The function is positive for dates within the interval defined by applying the parameter drivers shifts to reference dates, and negative for dates outside of this interval. Note that if Δt_start - Δt_stop is less than ref_stop.durationFrom(ref_start), then the interval degenerates to empty and the function never reaches positive values.

      Parameters:
      s - the current state information: date, kinematics, attitude
      Returns:
      value of the switching function