ContinuousScheduler.java

  1. /* Copyright 2002-2025 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.estimation.measurements.generation;

  18. import org.orekit.estimation.measurements.EstimatedMeasurementBase;
  19. import org.orekit.estimation.measurements.ObservedMeasurement;
  20. import org.orekit.time.AbsoluteDate;
  21. import org.orekit.time.DatesSelector;

  22. import java.util.function.Predicate;

  23. /** {@link Scheduler} generating measurements sequences continuously.
  24.  * <p>
  25.  * Continuous schedulers continuously generate measurements following a repetitive pattern.
  26.  * The repetitive pattern can be either a continuous stream of measurements separated by
  27.  * a constant step (for example one measurement every 60s), or several sequences of measurements
  28.  * at high rate up to a maximum number, with a rest period between sequences (for example
  29.  * sequences of up to 256 measurements every 100ms with 300s between each sequence).
  30.  * </p>
  31.  * @param <T> the type of the measurement
  32.  * @author Luc Maisonobe
  33.  * @since 9.3
  34.  */
  35. public class ContinuousScheduler<T extends ObservedMeasurement<T>> extends AbstractScheduler<T> {

  36.     /** Simple constructor.
  37.      * <p>
  38.      * BEWARE! Dates selectors often store internally the last selected dates, so they are not
  39.      * reusable across several {@link EventBasedScheduler instances}. A separate selector
  40.      * should be used for each scheduler.
  41.      * </p>
  42.      * <p>
  43.      * This constructor calls {@link #ContinuousScheduler(MeasurementBuilder, DatesSelector, Predicate)}
  44.      * whith the predicate set to accept all generated measurements.
  45.      * </p>
  46.      * @param builder builder for individual measurements
  47.      * @param selector selector for dates (beware that selectors are generally not
  48.      * reusable across several {@link EventBasedScheduler instances}, each selector should
  49.      * be dedicated to one scheduler
  50.      */
  51.     public ContinuousScheduler(final MeasurementBuilder<T> builder, final DatesSelector selector) {
  52.         super(builder, selector, e -> true);
  53.     }

  54.     /** Simple constructor.
  55.      * <p>
  56.      * BEWARE! Dates selectors often store internally the last selected dates, so they are not
  57.      * reusable across several {@link EventBasedScheduler instances}. A separate selector
  58.      * should be used for each scheduler.
  59.      * </p>
  60.      * @param builder builder for individual measurements
  61.      * @param selector selector for dates (beware that selectors are generally not
  62.      * reusable across several {@link EventBasedScheduler instances}, each selector should
  63.      * be dedicated to one scheduler
  64.      * @param filter predicate for a posteriori filtering of generated measurements
  65.      *               (measurements are accepted if the predicates evaluates to {@code true})
  66.      * @since 13.0
  67.      */
  68.     public ContinuousScheduler(final MeasurementBuilder<T> builder, final DatesSelector selector,
  69.                                final Predicate<EstimatedMeasurementBase<T>> filter) {
  70.         super(builder, selector, filter);
  71.     }

  72.     /** {@inheritDoc} */
  73.     @Override
  74.     public boolean measurementIsFeasible(final AbsoluteDate date) {
  75.         return true;
  76.     }


  77. }