Commit 576d837c authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Fixed call to ForceModel.init() in AbstractGaussianContribution class.

Fixes #670
parent 199fa5ae
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.0" date="TBD" description="TBD">
<action dev="bryan" type="fix" issue="670">
Fixed call to ForceModel.init() in AbstractGaussianContribution class.
</action>
<action dev="thomas" type="add" issue="712">
Added IGS clock file support.
</action>
......
......@@ -202,7 +202,7 @@ public class DSSTJacobiansMapper extends AbstractJacobiansMapper {
final Gradient zero = dsState.getDate().getField().getZero();
final List<FieldShortPeriodTerms<Gradient>> shortPeriodTerms = new ArrayList<>();
shortPeriodTerms.addAll(forceModel.initialize(auxiliaryElements, propagationType, dsParameters));
shortPeriodTerms.addAll(forceModel.initializeShortPeriodTerms(auxiliaryElements, propagationType, dsParameters));
forceModel.updateShortPeriodTerms(dsParameters, dsState);
final Gradient[] shortPeriod = new Gradient[6];
Arrays.fill(shortPeriod, zero);
......
......@@ -259,7 +259,7 @@ public class DSSTPartialDerivativesEquations implements AdditionalEquations {
final FieldAuxiliaryElements<Gradient> auxiliaryElements = new FieldAuxiliaryElements<>(dsState.getOrbit(), I);
// "field" initialization of the force model if it was not done before
forceModel.initialize(auxiliaryElements, propagationType, parameters);
forceModel.initializeShortPeriodTerms(auxiliaryElements, propagationType, parameters);
final Gradient[] meanElementRate = forceModel.getMeanElementRate(dsState, auxiliaryElements, parameters);
final double[] derivativesA = meanElementRate[0].getGradient();
final double[] derivativesEx = meanElementRate[1].getGradient();
......
......@@ -476,7 +476,7 @@ public class DSSTPropagator extends AbstractIntegratedPropagator {
final List<ShortPeriodTerms> shortPeriodTerms = new ArrayList<ShortPeriodTerms>();
for (final DSSTForceModel force : forces) {
force.registerAttitudeProvider(attitudeProvider);
shortPeriodTerms.addAll(force.initialize(aux, PropagationType.OSCULATING, force.getParameters()));
shortPeriodTerms.addAll(force.initializeShortPeriodTerms(aux, PropagationType.OSCULATING, force.getParameters()));
force.updateShortPeriodTerms(force.getParameters(), mean);
}
......@@ -592,7 +592,7 @@ public class DSSTPropagator extends AbstractIntegratedPropagator {
// initialize all perturbing forces
final List<ShortPeriodTerms> shortPeriodTerms = new ArrayList<ShortPeriodTerms>();
for (final DSSTForceModel force : forceModels) {
shortPeriodTerms.addAll(force.initialize(aux, type, force.getParameters()));
shortPeriodTerms.addAll(force.initializeShortPeriodTerms(aux, type, force.getParameters()));
}
mapper.setShortPeriodTerms(shortPeriodTerms);
......@@ -684,7 +684,7 @@ public class DSSTPropagator extends AbstractIntegratedPropagator {
// Set the force models
final List<ShortPeriodTerms> shortPeriodTerms = new ArrayList<ShortPeriodTerms>();
for (final DSSTForceModel force : forceModels) {
shortPeriodTerms.addAll(force.initialize(aux, PropagationType.OSCULATING, force.getParameters()));
shortPeriodTerms.addAll(force.initializeShortPeriodTerms(aux, PropagationType.OSCULATING, force.getParameters()));
force.updateShortPeriodTerms(force.getParameters(), meanState);
}
......@@ -963,6 +963,14 @@ public class DSSTPropagator extends AbstractIntegratedPropagator {
}
/** {@inheritDoc} */
@Override
public void init(final SpacecraftState initialState, final AbsoluteDate target) {
for (final DSSTForceModel forceModel : forceModels) {
forceModel.init(initialState, target);
}
}
/** {@inheritDoc} */
@Override
public double[] computeDerivatives(final SpacecraftState state) {
......
......@@ -62,6 +62,7 @@ import org.orekit.propagation.semianalytical.dsst.utilities.FieldAuxiliaryElemen
import org.orekit.propagation.semianalytical.dsst.utilities.FieldFixedNumberInterpolationGrid;
import org.orekit.propagation.semianalytical.dsst.utilities.FieldInterpolationGrid;
import org.orekit.propagation.semianalytical.dsst.utilities.FieldMaxGapInterpolationGrid;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
import org.orekit.utils.ParameterDriver;
import org.orekit.utils.ParameterObserver;
......@@ -525,7 +526,7 @@ public class FieldDSSTPropagator<T extends RealFieldElement<T>> extends FieldAbs
for (final DSSTForceModel force : forces) {
final T[] parameters = force.getParameters(mean.getDate().getField());
force.registerAttitudeProvider(attitudeProvider);
shortPeriodTerms.addAll(force.initialize(aux, PropagationType.OSCULATING, parameters));
shortPeriodTerms.addAll(force.initializeShortPeriodTerms(aux, PropagationType.OSCULATING, parameters));
force.updateShortPeriodTerms(parameters, mean);
}
......@@ -644,7 +645,7 @@ public class FieldDSSTPropagator<T extends RealFieldElement<T>> extends FieldAbs
// initialize all perturbing forces
final List<FieldShortPeriodTerms<T>> shortPeriodTerms = new ArrayList<FieldShortPeriodTerms<T>>();
for (final DSSTForceModel force : forceModels) {
shortPeriodTerms.addAll(force.initialize(aux, type, force.getParameters(field)));
shortPeriodTerms.addAll(force.initializeShortPeriodTerms(aux, type, force.getParameters(field)));
}
mapper.setShortPeriodTerms(shortPeriodTerms);
......@@ -739,7 +740,7 @@ public class FieldDSSTPropagator<T extends RealFieldElement<T>> extends FieldAbs
final List<FieldShortPeriodTerms<T>> shortPeriodTerms = new ArrayList<FieldShortPeriodTerms<T>>();
for (final DSSTForceModel force : forceModel) {
final T[] parameters = force.getParameters(osculating.getDate().getField());
shortPeriodTerms.addAll(force.initialize(aux, PropagationType.OSCULATING, parameters));
shortPeriodTerms.addAll(force.initializeShortPeriodTerms(aux, PropagationType.OSCULATING, parameters));
force.updateShortPeriodTerms(parameters, meanState);
}
......@@ -1021,6 +1022,11 @@ public class FieldDSSTPropagator<T extends RealFieldElement<T>> extends FieldAbs
/** {@inheritDoc} */
@Override
public void init(final FieldSpacecraftState<T> initialState, final FieldAbsoluteDate<T> target) {
final SpacecraftState stateD = initialState.toSpacecraftState();
final AbsoluteDate targetD = target.toAbsoluteDate();
for (final DSSTForceModel forceModel : forceModels) {
forceModel.init(stateD, targetD);
}
}
/** {@inheritDoc} */
......
......@@ -185,6 +185,13 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
gaussianFieldSPCoefs = new HashMap<>();
}
/** {@inheritDoc} */
@Override
public void init(final SpacecraftState initialState, final AbsoluteDate target) {
// Initialize the numerical force model
contribution.init(initialState, target);
}
/** {@inheritDoc} */
@Override
public ParameterDriver[] getParametersDrivers() {
......@@ -220,7 +227,7 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public List<ShortPeriodTerms> initialize(final AuxiliaryElements auxiliaryElements, final PropagationType type,
public List<ShortPeriodTerms> initializeShortPeriodTerms(final AuxiliaryElements auxiliaryElements, final PropagationType type,
final double[] parameters) {
final List<ShortPeriodTerms> list = new ArrayList<ShortPeriodTerms>();
......@@ -233,7 +240,7 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(
final FieldAuxiliaryElements<T> auxiliaryElements, final PropagationType type, final T[] parameters) {
final Field<T> field = auxiliaryElements.getDate().getField();
......
......@@ -29,6 +29,7 @@ import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.events.FieldEventDetector;
import org.orekit.propagation.semianalytical.dsst.utilities.AuxiliaryElements;
import org.orekit.propagation.semianalytical.dsst.utilities.FieldAuxiliaryElements;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.ParameterDriver;
/** This interface represents a force modifying spacecraft motion for a {@link
......@@ -40,7 +41,7 @@ import org.orekit.utils.ParameterDriver;
* </p>
* <p>
* The propagator will call at the very beginning of a propagation the {@link
* #initialize(AuxiliaryElements, PropagationType, double[])} method allowing
* #initializeShortPeriodTerms(AuxiliaryElements, PropagationType, double[])} method allowing
* preliminary computation such as truncation if needed.
* </p>
* <p>
......@@ -59,6 +60,17 @@ import org.orekit.utils.ParameterDriver;
*/
public interface DSSTForceModel {
/**
* Initialize the force model at the start of propagation.
* <p> The default implementation of this method does nothing.</p>
*
* @param initialState spacecraft state at the start of propagation.
* @param target date of propagation. Not equal to {@code initialState.getDate()}.
* @since 11.0
*/
default void init(SpacecraftState initialState, AbsoluteDate target) {
}
/** Performs initialization prior to propagation for the current force model.
* <p>
* This method aims at being called at the very beginning of a propagation.
......@@ -69,8 +81,8 @@ public interface DSSTForceModel {
* @return a list of objects that will hold short period terms (the objects
* are also retained by the force model, which will update them during propagation)
*/
List<ShortPeriodTerms> initialize(AuxiliaryElements auxiliaryElements,
PropagationType type, double[] parameters);
List<ShortPeriodTerms> initializeShortPeriodTerms(AuxiliaryElements auxiliaryElements,
PropagationType type, double[] parameters);
/** Performs initialization prior to propagation for the current force model.
* <p>
......@@ -83,8 +95,8 @@ public interface DSSTForceModel {
* @return a list of objects that will hold short period terms (the objects
* are also retained by the force model, which will update them during propagation)
*/
<T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(FieldAuxiliaryElements<T> auxiliaryElements,
PropagationType type, T[] parameters);
<T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(FieldAuxiliaryElements<T> auxiliaryElements,
PropagationType type, T[] parameters);
/** Get force model parameters.
* @return force model parameters
......@@ -162,7 +174,7 @@ public interface DSSTForceModel {
* <p>
* The {@link ShortPeriodTerms short period terms} that will be updated
* are the ones that were returned during the call to {@link
* #initialize(AuxiliaryElements, PropagationType, double[])}.
* #initializeShortPeriodTerms(AuxiliaryElements, PropagationType, double[])}.
* </p>
* @param parameters values of the force model parameters
* @param meanStates mean states information: date, kinematics, attitude
......@@ -173,7 +185,7 @@ public interface DSSTForceModel {
* <p>
* The {@link ShortPeriodTerms short period terms} that will be updated
* are the ones that were returned during the call to {@link
* #initialize(AuxiliaryElements, PropagationType, double[])}.
* #initializeShortPeriodTerms(AuxiliaryElements, PropagationType, double[])}.
* </p>
* @param <T> type of the elements
* @param parameters values of the force model parameters
......
......@@ -77,7 +77,7 @@ public class DSSTNewtonianAttraction implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public List<ShortPeriodTerms> initialize(final AuxiliaryElements auxiliaryElements,
public List<ShortPeriodTerms> initializeShortPeriodTerms(final AuxiliaryElements auxiliaryElements,
final PropagationType type,
final double[] parameters) {
return Collections.emptyList();
......@@ -85,7 +85,7 @@ public class DSSTNewtonianAttraction implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(final FieldAuxiliaryElements<T> auxiliaryElements,
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(final FieldAuxiliaryElements<T> auxiliaryElements,
final PropagationType type,
final T[] parameters) {
return Collections.emptyList();
......
......@@ -328,7 +328,7 @@ public class DSSTTesseral implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public List<ShortPeriodTerms> initialize(final AuxiliaryElements auxiliaryElements,
public List<ShortPeriodTerms> initializeShortPeriodTerms(final AuxiliaryElements auxiliaryElements,
final PropagationType type,
final double[] parameters) {
......@@ -367,7 +367,7 @@ public class DSSTTesseral implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(final FieldAuxiliaryElements<T> auxiliaryElements,
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(final FieldAuxiliaryElements<T> auxiliaryElements,
final PropagationType type,
final T[] parameters) {
......
......@@ -183,7 +183,7 @@ public class DSSTThirdBody implements DSSTForceModel {
* @param parameters values of the force model parameters
*/
@Override
public List<ShortPeriodTerms> initialize(final AuxiliaryElements auxiliaryElements,
public List<ShortPeriodTerms> initializeShortPeriodTerms(final AuxiliaryElements auxiliaryElements,
final PropagationType type,
final double[] parameters) {
......@@ -207,7 +207,7 @@ public class DSSTThirdBody implements DSSTForceModel {
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(final FieldAuxiliaryElements<T> auxiliaryElements,
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(final FieldAuxiliaryElements<T> auxiliaryElements,
final PropagationType type,
final T[] parameters) {
......
......@@ -243,7 +243,7 @@ public class DSSTZonal implements DSSTForceModel {
* </p>
*/
@Override
public List<ShortPeriodTerms> initialize(final AuxiliaryElements auxiliaryElements,
public List<ShortPeriodTerms> initializeShortPeriodTerms(final AuxiliaryElements auxiliaryElements,
final PropagationType type,
final double[] parameters) {
......@@ -284,7 +284,7 @@ public class DSSTZonal implements DSSTForceModel {
* </p>
*/
@Override
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(final FieldAuxiliaryElements<T> auxiliaryElements,
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(final FieldAuxiliaryElements<T> auxiliaryElements,
final PropagationType type,
final T[] parameters) {
......
......@@ -113,7 +113,7 @@ public class DSSTAtmosphericDragTest {
// Force model parameters
final double[] parameters = drag.getParameters();
// Initialize force model
drag.initialize(auxiliaryElements, PropagationType.MEAN, parameters);
drag.initializeShortPeriodTerms(auxiliaryElements, PropagationType.MEAN, parameters);
// Register the attitude provider to the force model
AttitudeProvider attitudeProvider = new InertialProvider(rotation);
......@@ -180,7 +180,7 @@ public class DSSTAtmosphericDragTest {
final List<ShortPeriodTerms> shortPeriodTerms = new ArrayList<ShortPeriodTerms>();
drag.registerAttitudeProvider(attitudeProvider);
shortPeriodTerms.addAll(drag.initialize(aux, PropagationType.OSCULATING, drag.getParameters()));
shortPeriodTerms.addAll(drag.initializeShortPeriodTerms(aux, PropagationType.OSCULATING, drag.getParameters()));
drag.updateShortPeriodTerms(drag.getParameters(), meanState);
double[] y = new double[6];
......
......@@ -138,14 +138,14 @@ public class DSSTPartialDerivativesEquationsTest {
public Gradient l;
@Override
public List<ShortPeriodTerms> initialize(AuxiliaryElements auxiliaryElements,
public List<ShortPeriodTerms> initializeShortPeriodTerms(AuxiliaryElements auxiliaryElements,
PropagationType type,
double[] parameters) {
return new ArrayList<ShortPeriodTerms>();
}
@Override
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initialize(FieldAuxiliaryElements<T> auxiliaryElements,
public <T extends RealFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(FieldAuxiliaryElements<T> auxiliaryElements,
PropagationType type,
T[] parameters) {
return new ArrayList<FieldShortPeriodTerms<T>>();
......
......@@ -23,8 +23,12 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Stream;
import org.hamcrest.MatcherAssert;
import org.hipparchus.Field;
import org.hipparchus.RealFieldElement;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.RotationOrder;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.ode.ODEIntegrator;
......@@ -34,6 +38,7 @@ import org.hipparchus.ode.nonstiff.ClassicalRungeKuttaIntegrator;
import org.hipparchus.ode.nonstiff.DormandPrince54Integrator;
import org.hipparchus.ode.nonstiff.DormandPrince853Integrator;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathArrays;
import org.hipparchus.util.MathUtils;
import org.junit.After;
import org.junit.Assert;
......@@ -47,6 +52,7 @@ import org.orekit.bodies.CelestialBody;
import org.orekit.bodies.CelestialBodyFactory;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.forces.AbstractForceModel;
import org.orekit.forces.BoxAndSolarArraySpacecraft;
import org.orekit.forces.ForceModel;
import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel;
......@@ -70,22 +76,27 @@ import org.orekit.orbits.Orbit;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.BoundedPropagator;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.PropagationType;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.AltitudeDetector;
import org.orekit.propagation.events.DateDetector;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.events.FieldEventDetector;
import org.orekit.propagation.events.LatitudeCrossingDetector;
import org.orekit.propagation.events.NodeDetector;
import org.orekit.propagation.events.handlers.EventHandler;
import org.orekit.propagation.numerical.NumericalPropagator;
import org.orekit.propagation.semianalytical.dsst.forces.AbstractGaussianContribution;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal;
import org.orekit.propagation.semianalytical.dsst.utilities.AuxiliaryElements;
import org.orekit.propagation.semianalytical.dsst.utilities.FieldAuxiliaryElements;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.DateComponents;
import org.orekit.time.TimeComponents;
......@@ -94,6 +105,7 @@ import org.orekit.time.TimeScalesFactory;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
import org.orekit.utils.PVCoordinates;
import org.orekit.utils.ParameterDriver;
import org.orekit.utils.TimeStampedPVCoordinates;
public class DSSTPropagatorTest {
......@@ -1017,6 +1029,34 @@ public class DSSTPropagatorTest {
}
/** This test is based on the example given by Orekit user kris06 in https://gitlab.orekit.org/orekit/orekit/-/issues/670. */
@Test
public void testIssue670() {
final NumericalForce force = new NumericalForce();
final DSSTForce dsstForce = new DSSTForce(force, Constants.WGS84_EARTH_MU);
SpacecraftState state = getLEOState();
setDSSTProp(state);
dsstProp.addForceModel(dsstForce);
// Verify flag are false
Assert.assertFalse(force.initialized);
Assert.assertFalse(force.accComputed);
// Propagation of the initial state at t + dt
final double dt = 3200.;
final AbsoluteDate target = state.getDate().shiftedBy(dt);
dsstProp.propagate(target);
// Flag must be true
Assert.assertTrue(force.initialized);
Assert.assertTrue(force.accComputed);
}
private SpacecraftState getGEOState() throws IllegalArgumentException, OrekitException {
// No shadow at this date
final AbsoluteDate initDate = new AbsoluteDate(new DateComponents(2003, 05, 21), new TimeComponents(1, 0, 0.),
......@@ -1076,6 +1116,109 @@ public class DSSTPropagatorTest {
}
/** This class is based on the example given by Orekit user kris06 in https://gitlab.orekit.org/orekit/orekit/-/issues/670. */
private class DSSTForce extends AbstractGaussianContribution {
DSSTForce(ForceModel contribution, double mu) {
super("DSST mock -", 6.0e-10, contribution, mu);
}
/** {@inheritDoc} */
@Override
public EventDetector[] getEventsDetectors() {
return null;
}
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> FieldEventDetector<T>[] getFieldEventsDetectors(final Field<T> field) {
return null;
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] getParametersDriversWithoutMu() {
return new ParameterDriver[0];
}
/** {@inheritDoc} */
@Override
protected double[] getLLimits(SpacecraftState state,
AuxiliaryElements auxiliaryElements) {
return new double[] { -FastMath.PI + MathUtils.normalizeAngle(state.getLv(), 0),
FastMath.PI + MathUtils.normalizeAngle(state.getLv(), 0) };
}
/** {@inheritDoc} */
@Override
protected <T extends RealFieldElement<T>> T[] getLLimits(FieldSpacecraftState<T> state,
FieldAuxiliaryElements<T> auxiliaryElements) {
final Field<T> field = state.getDate().getField();
final T zero = field.getZero();
final T[] tab = MathArrays.buildArray(field, 2);
tab[0] = MathUtils.normalizeAngle(state.getLv(), zero).subtract(FastMath.PI);
tab[1] = MathUtils.normalizeAngle(state.getLv(), zero).add(FastMath.PI);
return tab;
}
}
/** This class is based on the example given by Orekit user kris06 in https://gitlab.orekit.org/orekit/orekit/-/issues/670. */
private class NumericalForce extends AbstractForceModel {
private boolean initialized;
private boolean accComputed;
NumericalForce() {
this.initialized = false;
}
/** {@inheritDoc} */
@Override
public void init(final SpacecraftState s0, final AbsoluteDate t) {
this.initialized = true;
this.accComputed = false;
}
/** {@inheritDoc} */
@Override
public boolean dependsOnPositionOnly() {
return false;
}
/** {@inheritDoc} */
@Override
public Vector3D acceleration(SpacecraftState s, double[] parameters) {
this.accComputed = true;
return Vector3D.ZERO;
}
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> FieldVector3D<T> acceleration(FieldSpacecraftState<T> s, T[] parameters) {
return FieldVector3D.getZero(s.getDate().getField());
}
/** {@inheritDoc} */
@Override
public Stream<EventDetector> getEventsDetectors() {
return Stream.empty();
}
/** {@inheritDoc} */
@Override
public <T extends RealFieldElement<T>> Stream<FieldEventDetector<T>> getFieldEventsDetectors(final Field<T> field) {
return Stream.empty();
}
@Override
public ParameterDriver[] getParametersDrivers() {
return new ParameterDriver[0];
}
}
@Before
public void setUp() throws IOException, ParseException {
Utils.setDataRoot("regular-data:potential/shm-format");
......
......@@ -105,7 +105,7 @@ public class DSSTSolarRadiationPressureTest {
// Force model parameters
final double[] parameters = srp.getParameters();
// Initialize force model
srp.initialize(auxiliaryElements, PropagationType.MEAN, parameters);
srp.initializeShortPeriodTerms(auxiliaryElements, PropagationType.MEAN, parameters);
// Register the attitude provider to the force model
AttitudeProvider attitudeProvider = new InertialProvider(rotation);
......@@ -170,7 +170,7 @@ public class DSSTSolarRadiationPressureTest {
final List<ShortPeriodTerms> shortPeriodTerms = new ArrayList<ShortPeriodTerms>();
srp.registerAttitudeProvider(attitudeProvider);
shortPeriodTerms.addAll(srp.initialize(aux, PropagationType.OSCULATING, srp.getParameters()));
shortPeriodTerms.addAll(srp.initializeShortPeriodTerms(aux, PropagationType.OSCULATING, srp.getParameters()));
srp.updateShortPeriodTerms(srp.getParameters(), meanState);
double[] y = new double[6];
......
......@@ -93,7 +93,7 @@ public class DSSTTesseralTest {
final double[] parameters = tesseral.getParameters();
// Initialize force model