PropagatorBuilder.java

  1. /* Copyright 2002-2024 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.propagation.conversion;

  18. import java.util.List;

  19. import org.orekit.estimation.leastsquares.AbstractBatchLSModel;
  20. import org.orekit.estimation.leastsquares.ModelObserver;
  21. import org.orekit.estimation.measurements.ObservedMeasurement;
  22. import org.orekit.frames.Frame;
  23. import org.orekit.orbits.Orbit;
  24. import org.orekit.orbits.OrbitType;
  25. import org.orekit.orbits.PositionAngleType;
  26. import org.orekit.propagation.Propagator;
  27. import org.orekit.time.AbsoluteDate;
  28. import org.orekit.utils.ParameterDriversList;

  29. /** This interface is the top-level abstraction to build propagators for conversion.
  30.  * @author Pascal Parraud
  31.  * @since 6.0
  32.  */
  33. public interface PropagatorBuilder {

  34.     /** Create a new instance identical to this one.
  35.      * @return new instance identical to this one
  36.      */
  37.     PropagatorBuilder copy();

  38.     /** Build a propagator.
  39.      * @param normalizedParameters normalized values for the selected parameters
  40.      * @return an initialized propagator
  41.      */
  42.     Propagator buildPropagator(double[] normalizedParameters);

  43.     /** Build a propagator from current value of selected normalized parameters.
  44.      * @return an initialized propagator
  45.      */
  46.     default Propagator buildPropagator() {
  47.         return buildPropagator(getSelectedNormalizedParameters());
  48.     }

  49.     /** Build a new batch least squares model.
  50.      * @param builders builders to use for propagation
  51.      * @param measurements measurements
  52.      * @param estimatedMeasurementsParameters estimated measurements parameters
  53.      * @param observer observer to be notified at model calls
  54.      * @return a new model for the Batch Least Squares orbit determination
  55.      * @since 12.0
  56.      */
  57.     AbstractBatchLSModel buildLeastSquaresModel(PropagatorBuilder[] builders,
  58.                                                 List<ObservedMeasurement<?>> measurements,
  59.                                                 ParameterDriversList estimatedMeasurementsParameters,
  60.                                                 ModelObserver observer);

  61.     /** Get the current value of selected normalized parameters.
  62.      * @return current value of selected normalized parameters
  63.      */
  64.     double[] getSelectedNormalizedParameters();

  65.     /** Get the orbit type expected for the 6 first parameters in
  66.      * {@link #buildPropagator(double[])}.
  67.      * @return orbit type to use in {@link #buildPropagator(double[])}
  68.      * @see #buildPropagator(double[])
  69.      * @see #getPositionAngleType()
  70.      * @since 7.1
  71.      */
  72.     OrbitType getOrbitType();

  73.     /** Get the position angle type expected for the 6 first parameters in
  74.      * {@link #buildPropagator(double[])}.
  75.      * @return position angle type to use in {@link #buildPropagator(double[])}
  76.      * @see #buildPropagator(double[])
  77.      * @see #getOrbitType()
  78.      * @since 7.1
  79.      */
  80.     PositionAngleType getPositionAngleType();

  81.     /** Get the date of the initial orbit.
  82.      * @return date of the initial orbit
  83.      */
  84.     AbsoluteDate getInitialOrbitDate();

  85.     /** Get the frame in which the orbit is propagated.
  86.      * @return frame in which the orbit is propagated
  87.      */
  88.     Frame getFrame();

  89.     /** Get the central attraction coefficient (µ - m³/s²) value.
  90.      * @return the central attraction coefficient (µ - m³/s²) value
  91.      * @since 12.0
  92.      */
  93.     double getMu();

  94.     /** Get the drivers for the configurable orbital parameters.
  95.      * Orbital drivers should have only 1 value estimated (1 span)
  96.      * @return drivers for the configurable orbital parameters
  97.      * @since 8.0
  98.      */
  99.     ParameterDriversList getOrbitalParametersDrivers();

  100.     /** Get the drivers for the configurable propagation parameters.
  101.      * <p>
  102.      * The parameters typically correspond to force models.
  103.      * </p>
  104.      * @return drivers for the configurable propagation parameters
  105.      * @since 8.0
  106.      */
  107.     ParameterDriversList getPropagationParametersDrivers();

  108.     /** Reset the orbit in the propagator builder.
  109.      * @param newOrbit New orbit to set in the propagator builder
  110.      * @since 12.0
  111.      */
  112.     void resetOrbit(Orbit newOrbit);

  113. }