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 java.util.List;
20
21 import org.orekit.propagation.Propagator;
22 import org.orekit.propagation.SpacecraftState;
23
24 /** This interface is the top-level abstraction for propagators conversions.
25 * <p>
26 * It provides a way to convert a given propagator or a set of {@link SpacecraftState}
27 * into a wanted propagator that minimize the mean square error over a time span.
28 * </p>
29 * @author Pascal Parraud
30 * @since 6.0
31 */
32 public interface PropagatorConverter {
33
34 /** Convert a propagator into another one.
35 * @param source propagator to convert
36 * @param timeSpan time span considered for conversion
37 * @param nbPoints number of points for sampling over the time span
38 * @param freeParameters names of the free parameters
39 * @return adapted propagator
40 */
41 Propagator convert(Propagator source,
42 double timeSpan,
43 int nbPoints,
44 List<String> freeParameters);
45
46 /** Convert a propagator into another one.
47 * @param source propagator to convert
48 * @param timeSpan time span considered for conversion
49 * @param nbPoints number of points for sampling over the time span
50 * @param freeParameters names of the free parameters
51 * @return adapted propagator
52 */
53 Propagator convert(Propagator source,
54 double timeSpan,
55 int nbPoints,
56 String... freeParameters);
57
58 /** Find the propagator that minimize the mean square error for a sample of {@link SpacecraftState states}.
59 * @param states spacecraft states sample to fit
60 * @param positionOnly if true, consider only position data otherwise both position and velocity are used
61 * @param freeParameters names of the free parameters
62 * @return adapted propagator
63 */
64 Propagator convert(List<SpacecraftState> states,
65 boolean positionOnly,
66 List<String> freeParameters);
67
68 /** Find the propagator that minimize the mean square error for a sample of {@link SpacecraftState states}.
69 * @param states spacecraft states sample to fit
70 * @param positionOnly if true, consider only position data otherwise both position and velocity are used
71 * @param freeParameters names of the free parameters
72 * @return adapted propagator
73 */
74 Propagator convert(List<SpacecraftState> states,
75 boolean positionOnly,
76 String... freeParameters);
77
78 }