Commit 31b45a48 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Fixed incompatibilities with 11.0.2.

parent dbe9df7f
Pipeline #1584 passed with stages
in 20 minutes and 42 seconds
......@@ -28,6 +28,7 @@ import org.orekit.forces.gravity.ThirdBodyAttractionEpoch;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.integration.AdditionalDerivativesProvider;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.ParameterDriver;
import org.orekit.utils.ParameterDriversList;
......@@ -67,7 +68,10 @@ import org.orekit.utils.ParameterDriversList;
* @author Luc Maisonobe
* @since 10.2
*/
public class EpochDerivativesEquations implements AdditionalDerivativesProvider {
@SuppressWarnings("deprecation")
public class EpochDerivativesEquations
implements AdditionalDerivativesProvider,
org.orekit.propagation.integration.AdditionalEquations {
/** Propagator computing state evolution. */
private final NumericalPropagator propagator;
......@@ -252,6 +256,19 @@ public class EpochDerivativesEquations implements AdditionalDerivativesProvider
return new AbsoluteJacobiansMapper(name, selected);
}
/** {@inheritDoc} */
public void init(final SpacecraftState initialState, final AbsoluteDate target) {
// FIXME: remove in 12.0 when AdditionalEquations is removed
AdditionalDerivativesProvider.super.init(initialState, target);
}
/** {@inheritDoc} */
public double[] computeDerivatives(final SpacecraftState s, final double[] pDot) {
// FIXME: remove in 12.0 when AdditionalEquations is removed
System.arraycopy(derivatives(s), 0, pDot, 0, pDot.length);
return null;
}
/** {@inheritDoc} */
public double[] derivatives(final SpacecraftState s) {
......
......@@ -24,13 +24,17 @@ import org.hipparchus.linear.RealMatrix;
import org.orekit.bodies.CR3BPSystem;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.integration.AdditionalDerivativesProvider;
import org.orekit.time.AbsoluteDate;
/** Class calculating the state transition matrix coefficient for CR3BP Computation.
* @see "Dynamical systems, the three-body problem, and space mission design, Koon, Lo, Marsden, Ross"
* @author Vincent Mouraux
* @since 10.2
*/
public class STMEquations implements AdditionalDerivativesProvider {
@SuppressWarnings("deprecation")
public class STMEquations
implements AdditionalDerivativesProvider,
org.orekit.propagation.integration.AdditionalEquations {
/** Matrix Dimension. */
private static final int DIM = 6;
......@@ -81,6 +85,19 @@ public class STMEquations implements AdditionalDerivativesProvider {
return s.addAdditionalState(name, phi);
}
/** {@inheritDoc} */
public void init(final SpacecraftState initialState, final AbsoluteDate target) {
// FIXME: remove in 12.0 when AdditionalEquations is removed
AdditionalDerivativesProvider.super.init(initialState, target);
}
/** {@inheritDoc} */
public double[] computeDerivatives(final SpacecraftState s, final double[] pDot) {
// FIXME: remove in 12.0 when AdditionalEquations is removed
System.arraycopy(derivatives(s), 0, pDot, 0, pDot.length);
return null;
}
/** {@inheritDoc} */
public double[] derivatives(final SpacecraftState s) {
......
......@@ -102,7 +102,9 @@ public abstract class AbstractMultipleShooting implements MultipleShooting {
this(initialGuessList, propagatorList, arcDuration,
additionalEquations.
stream().
map(ae -> new org.orekit.propagation.integration.AdditionalEquationsAdapter(ae, () -> propagatorList.get(0).getInitialState())).
map(ae -> ae instanceof AdditionalDerivativesProvider ?
(AdditionalDerivativesProvider) ae :
new org.orekit.propagation.integration.AdditionalEquationsAdapter(ae, () -> propagatorList.get(0).getInitialState())).
collect(Collectors.toList()),
tolerance, additionalName);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment