Commit f9e96852 authored by Luc Maisonobe's avatar Luc Maisonobe

Added ContinuousScheduler.

parent c8a79f60
......@@ -67,6 +67,7 @@
class "EventBasedScheduler<T>" as EventBasedScheduler_T_
class "ContinuousScheduler<T>" as ContinuousScheduler_T_
interface "Scheduler<T>" as Scheduler_T_ {
+Propagator getPropagator()
......@@ -78,6 +79,7 @@
XXXMeasurementBuilder -up-> RandomVectorGenerator
SignSemantic "1" <--* EventBasedScheduler_T_
Scheduler_T_ <|.left. EventBasedScheduler_T_
ContinuousScheduler_T_ .right.|> Scheduler_T_
Scheduler_T_ "*" <--* Generator
EventBasedScheduler_T_ *-right-> "1" EventsDetector
/* Copyright 2002-2018 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* See the License for the specific language governing permissions and
* limitations under the License.
package org.orekit.estimation.measurements.generation;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
import org.orekit.estimation.measurements.ObservedMeasurement;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.sampling.OrekitStepInterpolator;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.DatesSelector;
/** {@link Scheduler} generating measurements sequences continuously.
* <p>
* Continuous schedulers continuously generate measurements following a repetitive pattern.
* 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).
* </p>
* @param <T> the type of the measurement
* @author Luc Maisonobe
* @since 9.3
public class ContinuousScheduler<T extends ObservedMeasurement<T>> extends AbstractScheduler<T> {
/** Simple constructor.
* @param builder builder for individual measurements
* @param selector selector for dates
* @param propagator propagator associated with this scheduler
public ContinuousScheduler(final MeasurementBuilder<T> builder, final DatesSelector selector,
final Propagator propagator) {
super(builder, selector, propagator);
/** {@inheritDoc} */
public SortedSet<T> generate(final List<OrekitStepInterpolator> interpolators) {
// select dates in the current step, using arbitrarily interpolator 0
// as all interpolators cover the same range
final List<AbsoluteDate> dates = getSelector().selectDates(interpolators.get(0).getPreviousState().getDate(),
// generate measurements when feasible
final SortedSet<T> measurements = new TreeSet<>();
for (final AbsoluteDate date : dates) {
// interpolate states at measurement date
final SpacecraftState[] states = new SpacecraftState[interpolators.size()];
for (int i = 0; i < states.length; ++i) {
states[i] = interpolators.get(i).getInterpolatedState(date);
// generate measurement
return measurements;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment