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