Class EventBasedScheduler<T extends ObservedMeasurement<T>>

  • Type Parameters:
    T - the type of the measurement
    All Implemented Interfaces:
    Scheduler<T>

    public class EventBasedScheduler<T extends ObservedMeasurement<T>>
    extends AbstractScheduler<T>
    Scheduler based on EventDetector for generating measurements sequences.

    Event-based schedulers generate measurements following a repetitive pattern when the a detector provided at construction is in a measurement feasible state. It is important that the sign of the g function of the underlying event detector is not arbitrary, but has a semantic meaning, e.g. in or out, true or false. This class works well with event detectors that detect entry to or exit from a region, e.g. EclipseDetector, ElevationDetector, LatitudeCrossingDetector. Using this scheduler with detectors that are not based on entry to or exit from a region, e.g. DateDetector, LongitudeCrossingDetector, will likely lead to unexpected results.

    The repetitive pattern can be either a continuous stream of measurements separated by a constant step (for example one measurement every 60s), or several sequences of measurements at high rate up to a maximum number, with a rest period between sequences (for example sequences of up to 256 measurements every 100ms with 300s between each sequence).

    Since:
    9.3
    Author:
    Luc Maisonobe
    • Constructor Detail

      • EventBasedScheduler

        public EventBasedScheduler​(MeasurementBuilder<T> builder,
                                   DatesSelector selector,
                                   Propagator propagator,
                                   EventDetector detector,
                                   SignSemantic signSemantic)
        Simple constructor.

        The event detector instance should not be already bound to the propagator. It will be wrapped in an adapter in order to manage time ranges when measurements are feasible. The wrapping adapter will be automatically added to the propagator by this constructor.

        BEWARE! Dates selectors often store internally the last selected dates, so they are not reusable across several instances. A separate selector should be used for each scheduler.

        This constructor calls EventBasedScheduler(MeasurementBuilder, DatesSelector, Predicate, Propagator, EventDetector, SignSemantic) whith the predicate set to accept all generated measurements.

        Parameters:
        builder - builder for individual measurements
        selector - selector for dates (beware that selectors are generally not reusable across several instances, each selector should be dedicated to one scheduler
        propagator - propagator associated with this scheduler
        detector - detector for checking measurements feasibility
        signSemantic - semantic of the detector g function sign to use
      • EventBasedScheduler

        public EventBasedScheduler​(MeasurementBuilder<T> builder,
                                   DatesSelector selector,
                                   Predicate<EstimatedMeasurementBase<T>> filter,
                                   Propagator propagator,
                                   EventDetector detector,
                                   SignSemantic signSemantic)
        Simple constructor.

        The event detector instance should not be already bound to the propagator. It will be wrapped in an adapter in order to manage time ranges when measurements are feasible. The wrapping adapter will be automatically added to the propagator by this constructor.

        BEWARE! Dates selectors often store internally the last selected dates, so they are not reusable across several instances. A separate selector should be used for each scheduler.

        Parameters:
        builder - builder for individual measurements
        selector - selector for dates (beware that selectors are generally not reusable across several instances, each selector should be dedicated to one scheduler
        filter - predicate for a posteriori filtering of generated measurements (measurements are accepted if the predicates evaluates to true)
        propagator - propagator associated with this scheduler
        detector - detector for checking measurements feasibility
        signSemantic - semantic of the detector g function sign to use
        Since:
        13.0