AccelerationModel.java

  1. /* Copyright 2002-2022 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 java.util.List;

  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.ParameterDriver;

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

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

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

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

  62.     /** Get the drivers for acceleration model parameters.
  63.      * @return drivers for acceleration model parameters
  64.      */
  65.     List<ParameterDriver> getParametersDrivers();

  66. }