PropagatorBuilder.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.propagation.conversion;

  18. import org.orekit.attitudes.AttitudeProvider;
  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. import java.util.List;

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

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

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

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

  58.     /** Get the current value of selected normalized parameters.
  59.      * @return current value of selected normalized parameters
  60.      */
  61.     double[] getSelectedNormalizedParameters();

  62.     /**
  63.      * Get the attitude provider.
  64.      *
  65.      * @return the attitude provider
  66.      * @since 13.0
  67.      */
  68.     AttitudeProvider getAttitudeProvider();

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

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

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

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

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

  98.     /** Get the initial mass.
  99.      * @return the mass (kg)
  100.      * @since 13.0
  101.      */
  102.     double getMass();

  103.     /** Get the drivers for the configurable orbital parameters.
  104.      * Orbital drivers should have only 1 value estimated (1 span)
  105.      * @return drivers for the configurable orbital parameters
  106.      * @since 8.0
  107.      */
  108.     ParameterDriversList getOrbitalParametersDrivers();

  109.     /** Get the drivers for the configurable propagation parameters.
  110.      * <p>
  111.      * The parameters typically correspond to force models.
  112.      * </p>
  113.      * @return drivers for the configurable propagation parameters
  114.      * @since 8.0
  115.      */
  116.     ParameterDriversList getPropagationParametersDrivers();

  117.     /** Reset the orbit in the propagator builder.
  118.      * @param newOrbit New orbit to set in the propagator builder
  119.      * @since 12.0
  120.      */
  121.     void resetOrbit(Orbit newOrbit);

  122. }