AccelerationModel.java

  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. import org.hipparchus.CalculusFieldElement;
  19. import org.orekit.propagation.FieldSpacecraftState;
  20. import org.orekit.propagation.SpacecraftState;
  21. import org.orekit.time.AbsoluteDate;
  22. import org.orekit.utils.ParameterDriversProvider;

  23. /** Acceleration model used by empirical force.
  24.  * @author Bryan Cazabonne
  25.  * @since 10.3
  26.  */
  27. public interface AccelerationModel extends ParameterDriversProvider {

  28.     /** Initialize the acceleration model at the start of the propagation.
  29.      * <p>
  30.      * The default implementation of this method does nothing
  31.      * </p>
  32.      * @param initialState spacecraft state at the start of propagation.
  33.      * @param target       date of propagation. Not equal to {@code initialState.getDate()}.
  34.      */
  35.     default void init(SpacecraftState initialState, AbsoluteDate target) {
  36.         // Nothing by default
  37.     }

  38.     /** Compute the signed amplitude of the acceleration.
  39.      * <p>
  40.      * The acceleration is the direction multiplied by the signed amplitude. So if
  41.      * signed amplitude is negative, the acceleratin is towards the opposite of the
  42.      * direction specified at construction.
  43.      * </p>
  44.      * @param state current state information: date, kinematics, attitude
  45.      * @param parameters values of the force model parameters
  46.      * @return norm of the acceleration
  47.      */
  48.     double signedAmplitude(SpacecraftState state, double[] parameters);

  49.     /** Compute the signed amplitude of the acceleration.
  50.      * <p>
  51.      * The acceleration is the direction multiplied by the signed amplitude. So if
  52.      * signed amplitude is negative, the acceleratin is towards the opposite of the
  53.      * direction specified at construction.
  54.      * </p>
  55.      * @param state current state information: date, kinematics, attitude
  56.      * @param parameters values of the force model parameters
  57.      * @param <T> type of the elements
  58.      * @return norm of the acceleration
  59.      */
  60.     <T extends CalculusFieldElement<T>> T signedAmplitude(FieldSpacecraftState<T> state, T[] parameters);
  61. }