1 /* Copyright 2022-2025 Romain Serra
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.orbits.Orbit;
21 import org.orekit.orbits.PositionAngleType;
22 import org.orekit.propagation.PropagationType;
23 import org.orekit.propagation.integration.AbstractIntegratedPropagator;
24
25 /**
26 * Abstract class for builders for integrator-based propagators.
27 * @param <T> field type
28 * @since 13.0
29 * @author Romain Serra
30 */
31 public abstract class AbstractIntegratedPropagatorBuilder<T extends AbstractIntegratedPropagator>
32 extends AbstractPropagatorBuilder<T> {
33
34 /** First order integrator builder for propagation. */
35 private final ODEIntegratorBuilder builder;
36
37 /** Type of the orbit used for the propagation.*/
38 private final PropagationType propagationType;
39
40 /** Build a new instance.
41 * @param templateOrbit reference orbit from which real orbits will be built
42 * @param builder integrator builder
43 * @param positionAngleType position angle type
44 * @param positionScale scaling factor used for orbital parameters normalization
45 * (typically set to the expected standard deviation of the position)
46 * @param propagationType type of the orbit used for the propagation (mean or osculating)
47 * @param attitudeProvider attitude law.
48 * @param mass initial mass
49 */
50 protected AbstractIntegratedPropagatorBuilder(final Orbit templateOrbit, final ODEIntegratorBuilder builder,
51 final PositionAngleType positionAngleType, final double positionScale,
52 final PropagationType propagationType,
53 final AttitudeProvider attitudeProvider, final double mass) {
54 super(templateOrbit, positionAngleType, positionScale, true, attitudeProvider, mass);
55 this.builder = builder;
56 this.propagationType = propagationType;
57 }
58
59 /**
60 * Getter for integrator builder.
61 * @return builder
62 */
63 public ODEIntegratorBuilder getIntegratorBuilder() {
64 return builder;
65 }
66
67 /**
68 * Getter for the propagation type.
69 * @return propagation type
70 */
71 public PropagationType getPropagationType() {
72 return propagationType;
73 }
74
75 /** {@inheritDoc} */
76 @Override
77 public abstract T buildPropagator(double[] normalizedParameters);
78
79 /** {@inheritDoc} */
80 @Override
81 public T buildPropagator() {
82 return buildPropagator(getSelectedNormalizedParameters());
83 }
84
85 }