use of org.hipparchus.ode.nonstiff.AdamsMoultonIntegrator in project Orekit by CS-SI.
the class CloseEventsNumericalAMTest method getPropagator.
/**
* Create a propagator using the {@link #initialOrbit}.
*
* @param stepSize of integrator.
* @return a usable propagator.
* @throws OrekitException
*/
public Propagator getPropagator(double stepSize) throws OrekitException {
double[][] tol = NumericalPropagator.tolerances(1, initialOrbit, OrbitType.CARTESIAN);
final AdamsMoultonIntegrator integrator = new AdamsMoultonIntegrator(4, stepSize, stepSize, tol[0], tol[1]);
final DormandPrince853Integrator starter = new DormandPrince853Integrator(stepSize / 100, stepSize / 10, tol[0], tol[1]);
starter.setInitialStepSize(stepSize / 20);
integrator.setStarterIntegrator(starter);
final NumericalPropagator propagator = new NumericalPropagator(integrator);
propagator.setInitialState(new SpacecraftState(initialOrbit));
propagator.setOrbitType(OrbitType.CARTESIAN);
return propagator;
}
Aggregations