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  
19  import org.orekit.attitudes.AttitudeProvider;
20  import org.orekit.estimation.leastsquares.AbstractBatchLSModel;
21  import org.orekit.estimation.leastsquares.ModelObserver;
22  import org.orekit.estimation.measurements.ObservedMeasurement;
23  import org.orekit.frames.Frame;
24  import org.orekit.orbits.Orbit;
25  import org.orekit.orbits.OrbitType;
26  import org.orekit.orbits.PositionAngleType;
27  import org.orekit.propagation.Propagator;
28  import org.orekit.time.AbsoluteDate;
29  import org.orekit.utils.ParameterDriversList;
30  
31  import java.util.List;
32  
33  /** This interface is the top-level abstraction to build propagators for conversion.
34   * @author Pascal Parraud
35   * @since 6.0
36   */
37  public interface PropagatorBuilder extends Cloneable {
38  
39      /** Build a propagator.
40       * @param normalizedParameters normalized values for the selected parameters
41       * @return an initialized propagator
42       */
43      Propagator buildPropagator(double[] normalizedParameters);
44  
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  
52      /** Build a new batch least squares model.
53       * @param builders builders to use for propagation
54       * @param measurements measurements
55       * @param estimatedMeasurementsParameters estimated measurements parameters
56       * @param observer observer to be notified at model calls
57       * @return a new model for the Batch Least Squares orbit determination
58       * @since 12.0
59       */
60      AbstractBatchLSModel buildLeastSquaresModel(PropagatorBuilder[] builders,
61                                                  List<ObservedMeasurement<?>> measurements,
62                                                  ParameterDriversList estimatedMeasurementsParameters,
63                                                  ModelObserver observer);
64  
65      /** Get the current value of selected normalized parameters.
66       * @return current value of selected normalized parameters
67       */
68      double[] getSelectedNormalizedParameters();
69  
70      /**
71       * Get the attitude provider.
72       *
73       * @return the attitude provider
74       * @since 13.0
75       */
76      AttitudeProvider getAttitudeProvider();
77  
78      /** Get the orbit type expected for the 6 first parameters in
79       * {@link #buildPropagator(double[])}.
80       * @return orbit type to use in {@link #buildPropagator(double[])}
81       * @see #buildPropagator(double[])
82       * @see #getPositionAngleType()
83       * @since 7.1
84       */
85      OrbitType getOrbitType();
86  
87      /** Get the position angle type expected for the 6 first parameters in
88       * {@link #buildPropagator(double[])}.
89       * @return position angle type to use in {@link #buildPropagator(double[])}
90       * @see #buildPropagator(double[])
91       * @see #getOrbitType()
92       * @since 7.1
93       */
94      PositionAngleType getPositionAngleType();
95  
96      /** Get the date of the initial orbit.
97       * @return date of the initial orbit
98       */
99      AbsoluteDate getInitialOrbitDate();
100 
101     /** Get the frame in which the orbit is propagated.
102      * @return frame in which the orbit is propagated
103      */
104     Frame getFrame();
105 
106     /** Get the central attraction coefficient (µ - m³/s²) value.
107      * @return the central attraction coefficient (µ - m³/s²) value
108      * @since 12.0
109      */
110     double getMu();
111 
112     /** Get the initial mass.
113      * @return the mass (kg)
114      * @since 13.0
115      */
116     double getMass();
117 
118     /** Get the drivers for the configurable orbital parameters.
119      * Orbital drivers should have only 1 value estimated (1 span)
120      * @return drivers for the configurable orbital parameters
121      * @since 8.0
122      */
123     ParameterDriversList getOrbitalParametersDrivers();
124 
125     /** Get the drivers for the configurable propagation parameters.
126      * <p>
127      * The parameters typically correspond to force models.
128      * </p>
129      * @return drivers for the configurable propagation parameters
130      * @since 8.0
131      */
132     ParameterDriversList getPropagationParametersDrivers();
133 
134     /** Reset the orbit in the propagator builder.
135      * @param newOrbit New orbit to set in the propagator builder
136      * @since 12.0
137      */
138     void resetOrbit(Orbit newOrbit);
139 
140 }