1 /* Copyright 2002-2021 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.forces.empirical;
18
19 import java.util.List;
20
21 import org.hipparchus.CalculusFieldElement;
22 import org.orekit.propagation.FieldSpacecraftState;
23 import org.orekit.propagation.SpacecraftState;
24 import org.orekit.time.AbsoluteDate;
25 import org.orekit.utils.ParameterDriver;
26
27 /** Acceleration model used by empirical force.
28 * @author Bryan Cazabonne
29 * @since 10.3
30 */
31 public interface AccelerationModel {
32
33 /** Initialize the acceleration model at the start of the propagation.
34 * <p>
35 * The default implementation of this method does nothing
36 * </p>
37 * @param initialState spacecraft state at the start of propagation.
38 * @param target date of propagation. Not equal to {@code initialState.getDate()}.
39 */
40 default void init(SpacecraftState initialState, AbsoluteDate target) {
41 // Nothing by default
42 }
43
44 /** Compute the signed amplitude of the acceleration.
45 * <p>
46 * The acceleration is the direction multiplied by the signed amplitude. So if
47 * signed amplitude is negative, the acceleratin is towards the opposite of the
48 * direction specified at construction.
49 * </p>
50 * @param state current state information: date, kinematics, attitude
51 * @param parameters values of the force model parameters
52 * @return norm of the acceleration
53 */
54 double signedAmplitude(SpacecraftState state, double[] parameters);
55
56 /** Compute the signed amplitude of the acceleration.
57 * <p>
58 * The acceleration is the direction multiplied by the signed amplitude. So if
59 * signed amplitude is negative, the acceleratin is towards the opposite of the
60 * direction specified at construction.
61 * </p>
62 * @param state current state information: date, kinematics, attitude
63 * @param parameters values of the force model parameters
64 * @param <T> type of the elements
65 * @return norm of the acceleration
66 */
67 <T extends CalculusFieldElement<T>> T signedAmplitude(FieldSpacecraftState<T> state, T[] parameters);
68
69 /** Get the drivers for acceleration model parameters.
70 * @return drivers for acceleration model parameters
71 */
72 List<ParameterDriver> getParametersDrivers();
73
74 }