AbsolutePartialDerivativesEquations.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.propagation.numerical;

  18. import org.orekit.errors.OrekitException;
  19. import org.orekit.errors.OrekitMessages;
  20. import org.orekit.forces.ForceModel;
  21. import org.orekit.propagation.SpacecraftState;
  22. import org.orekit.propagation.integration.AdditionalDerivativesProvider;
  23. import org.orekit.utils.ParameterDriver;

  24. /** {@link AdditionalDerivativesProvider derivatives provider} computing the partial derivatives
  25.  * of the state (orbit) with respect to initial state and force models parameters.
  26.  * <p>
  27.  * This set of equations are automatically added to a {@link NumericalPropagator numerical propagator}
  28.  * in order to compute partial derivatives of the orbit along with the orbit itself. This is
  29.  * useful for example in orbit determination applications.
  30.  * </p>
  31.  * <p>
  32.  * The partial derivatives with respect to initial state can be either dimension 6
  33.  * (orbit only) or 7 (orbit and mass).
  34.  * </p>
  35.  * <p>
  36.  * The partial derivatives with respect to force models parameters has a dimension
  37.  * equal to the number of selected parameters. Parameters selection is implemented at
  38.  * {@link ForceModel force models} level. Users must retrieve a {@link ParameterDriver
  39.  * parameter driver} using {@link ForceModel#getParameterDriver(String)} and then
  40.  * select it by calling {@link ParameterDriver#setSelected(boolean) setSelected(true)}.
  41.  * </p>
  42.  * <p>
  43.  * If several force models provide different {@link ParameterDriver drivers} for the
  44.  * same parameter name, selecting any of these drivers has the side effect of
  45.  * selecting all the drivers for this shared parameter. In this case, the partial
  46.  * derivatives will be the sum of the partial derivatives contributed by the
  47.  * corresponding force models. This case typically arises for central attraction
  48.  * coefficient, which has an influence on {@link org.orekit.forces.gravity.NewtonianAttraction
  49.  * Newtonian attraction}, {@link org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel
  50.  * gravity field}, and {@link org.orekit.forces.gravity.Relativity relativity}.
  51.  * </p>
  52.  * @deprecated as of 11.1, this class is not used anymore
  53.  * @author Vincent Mouraux
  54.  * @author Bryan Cazabonne
  55.  * @since 10.2
  56.  */
  57. @Deprecated
  58. public class AbsolutePartialDerivativesEquations extends PartialDerivativesEquations {

  59.     /** Name. */
  60.     private final String name;

  61.     /** Simple constructor.
  62.      * <p>
  63.      * Upon construction, this set of equations is <em>automatically</em> added to
  64.      * the propagator by calling its {@link
  65.      * NumericalPropagator#addAdditionalDerivativesProvider(AdditionalDerivativesProvider)} method. So
  66.      * there is no need to call this method explicitly for these equations.
  67.      * </p>
  68.      * @param name name of the partial derivatives equations
  69.      * @param propagator the propagator that will handle the orbit propagation
  70.      */
  71.     public AbsolutePartialDerivativesEquations(final String name, final NumericalPropagator propagator) {
  72.         super(name, propagator);
  73.         this.name = name;
  74.     }

  75.     /** Get a mapper between two-dimensional Jacobians and one-dimensional additional state.
  76.      * @return a mapper between two-dimensional Jacobians and one-dimensional additional state,
  77.      * with the same name as the instance
  78.      * @see #setInitialJacobians(SpacecraftState)
  79.      * @see #setInitialJacobians(SpacecraftState, double[][], double[][])
  80.      */
  81.     @Override
  82.     public AbsoluteJacobiansMapper getMapper() {
  83.         if (!isInitialize()) {
  84.             throw new OrekitException(OrekitMessages.STATE_JACOBIAN_NOT_INITIALIZED);
  85.         }
  86.         return new AbsoluteJacobiansMapper(name, getSelectedParameters());
  87.     }

  88. }