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 org.orekit.estimation.leastsquares.AbstractBatchLSModel;
  19. import org.orekit.estimation.leastsquares.ModelObserver;
  20. import org.orekit.estimation.measurements.ObservedMeasurement;
  21. import org.orekit.frames.Frame;
  22. import org.orekit.orbits.Orbit;
  23. import org.orekit.orbits.OrbitType;
  24. import org.orekit.orbits.PositionAngleType;
  25. import org.orekit.propagation.Propagator;
  26. import org.orekit.time.AbsoluteDate;
  27. import org.orekit.utils.ParameterDriversList;

  28. import java.util.List;

  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 extends Cloneable {

  34.     /** Create a new instance identical to this one.
  35.      * @return new instance identical to this one
  36.      * @deprecated as of 12.2, replaced by {@link Object#clone()}
  37.      */
  38.     @Deprecated
  39.     PropagatorBuilder copy();

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

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

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

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

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

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

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

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

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

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

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

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

  115. }