1   /* Copyright 2002-2015 CS Systèmes d'Information
2    * Licensed to CS Systèmes d'Information (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.numerical;
18  
19  import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
20  import org.orekit.errors.OrekitException;
21  import org.orekit.frames.Frame;
22  
23  /** Interface summing up the contribution of several forces into orbit and mass derivatives.
24   *
25   * <p>The aim of this interface is to gather the contributions of various perturbing
26   * forces expressed as accelerations into one set of time-derivatives of
27   * {@link org.orekit.orbits.Orbit} plus one mass derivatives. It implements Gauss
28   * equations for different kind of parameters.</p>
29   * <p>An implementation of this interface is automatically provided by {@link
30   * org.orekit.propagation.integration.AbstractIntegratedPropagator integration-based
31   * propagators}, which are either semi-analytical or numerical propagators.
32   * </p>
33   * @see org.orekit.forces.ForceModel
34   * @see org.orekit.propagation.numerical.NumericalPropagator
35   * @author Luc Maisonobe
36   * @author Fabien Maussion
37   * @author V&eacute;ronique Pommier-Maurussane
38   */
39  public interface TimeDerivativesEquations {
40  
41      /** Add the contribution of the Kepler evolution.
42       * <p>Since the Kepler evolution is the most important, it should
43       * be added after all the other ones, in order to improve
44       * numerical accuracy.</p>
45       * @param mu central body gravitational constant
46       */
47      void addKeplerContribution(final double mu);
48  
49      /** Add the contribution of an acceleration expressed in the inertial frame
50       *  (it is important to make sure this acceleration is defined in the
51       *  same frame as the orbit) .
52       * @param x acceleration along the X axis (m/s²)
53       * @param y acceleration along the Y axis (m/s²)
54       * @param z acceleration along the Z axis (m/s²)
55       */
56      void addXYZAcceleration(final double x, final double y, final double z);
57  
58      /** Add the contribution of an acceleration expressed in some inertial frame.
59       * @param gamma acceleration vector (m/s²)
60       * @param frame frame in which acceleration is defined (must be an inertial frame)
61       * @exception OrekitException if frame transforms cannot be computed
62       */
63      void addAcceleration(final Vector3D gamma, final Frame frame) throws OrekitException;
64  
65      /** Add the contribution of the flow rate (dm/dt).
66       * @param q the flow rate, must be negative (dm/dt)
67       * @exception IllegalArgumentException if flow-rate is positive
68       */
69      void addMassDerivative(final double q);
70  
71  
72  }