use of org.hipparchus.ode.nonstiff.AdamsBashforthIntegrator in project Orekit by CS-SI.
the class CloseEventsNumericalABTest 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(10000, initialOrbit, OrbitType.CARTESIAN);
final AdamsBashforthIntegrator integrator = new AdamsBashforthIntegrator(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