Search in sources :

Example 1 with AdamsMoultonIntegrator

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;
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) NumericalPropagator(org.orekit.propagation.numerical.NumericalPropagator) DormandPrince853Integrator(org.hipparchus.ode.nonstiff.DormandPrince853Integrator) AdamsMoultonIntegrator(org.hipparchus.ode.nonstiff.AdamsMoultonIntegrator)

Aggregations

AdamsMoultonIntegrator (org.hipparchus.ode.nonstiff.AdamsMoultonIntegrator)1 DormandPrince853Integrator (org.hipparchus.ode.nonstiff.DormandPrince853Integrator)1 SpacecraftState (org.orekit.propagation.SpacecraftState)1 NumericalPropagator (org.orekit.propagation.numerical.NumericalPropagator)1