use of org.hipparchus.ode.nonstiff.DormandPrince853Integrator in project Orekit by CS-SI.
the class CloseEventsNumericalDP853Test 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(1e-3, initialOrbit, OrbitType.CARTESIAN);
final NumericalPropagator propagator = new NumericalPropagator(new DormandPrince853Integrator(stepSize, stepSize, tol[0], tol[1]));
propagator.setInitialState(new SpacecraftState(initialOrbit));
propagator.setOrbitType(OrbitType.CARTESIAN);
return propagator;
}
use of org.hipparchus.ode.nonstiff.DormandPrince853Integrator in project Orekit by CS-SI.
the class DateDetectorTest method setUp.
@Before
public void setUp() {
try {
Utils.setDataRoot("regular-data");
final double mu = 3.9860047e14;
final Vector3D position = new Vector3D(-6142438.668, 3492467.560, -25767.25680);
final Vector3D velocity = new Vector3D(505.8479685, 942.7809215, 7435.922231);
iniDate = new AbsoluteDate(1969, 7, 28, 4, 0, 0.0, TimeScalesFactory.getTT());
iniOrbit = new EquinoctialOrbit(new PVCoordinates(position, velocity), FramesFactory.getEME2000(), iniDate, mu);
SpacecraftState initialState = new SpacecraftState(iniOrbit);
double[] absTolerance = { 0.001, 1.0e-9, 1.0e-9, 1.0e-6, 1.0e-6, 1.0e-6, 0.001 };
double[] relTolerance = { 1.0e-7, 1.0e-4, 1.0e-4, 1.0e-7, 1.0e-7, 1.0e-7, 1.0e-7 };
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(0.001, 1000, absTolerance, relTolerance);
integrator.setInitialStepSize(60);
propagator = new NumericalPropagator(integrator);
propagator.setInitialState(initialState);
dt = 60.;
maxCheck = 10.;
threshold = 10.e-10;
evtno = 0;
} catch (OrekitException oe) {
Assert.fail(oe.getLocalizedMessage());
}
}
use of org.hipparchus.ode.nonstiff.DormandPrince853Integrator in project Orekit by CS-SI.
the class AlignmentDetectorTest method setUp.
@Before
public void setUp() {
try {
Utils.setDataRoot("regular-data");
double mu = 3.9860047e14;
final Vector3D position = new Vector3D(-6142438.668, 3492467.560, -25767.25680);
final Vector3D velocity = new Vector3D(505.8479685, 942.7809215, 7435.922231);
iniDate = new AbsoluteDate(1969, 7, 28, 4, 0, 0.0, TimeScalesFactory.getTT());
final Orbit orbit = new EquinoctialOrbit(new PVCoordinates(position, velocity), FramesFactory.getEME2000(), iniDate, mu);
initialState = new SpacecraftState(orbit);
double[] absTolerance = { 0.001, 1.0e-9, 1.0e-9, 1.0e-6, 1.0e-6, 1.0e-6, 0.001 };
double[] relTolerance = { 1.0e-7, 1.0e-4, 1.0e-4, 1.0e-7, 1.0e-7, 1.0e-7, 1.0e-7 };
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(0.001, 1000, absTolerance, relTolerance);
integrator.setInitialStepSize(60);
propagator = new NumericalPropagator(integrator);
propagator.setInitialState(initialState);
} catch (OrekitException oe) {
Assert.fail(oe.getLocalizedMessage());
}
}
use of org.hipparchus.ode.nonstiff.DormandPrince853Integrator 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;
}
use of org.hipparchus.ode.nonstiff.DormandPrince853Integrator in project Orekit by CS-SI.
the class EclipseDetectorTest method setUp.
@Before
public void setUp() {
try {
Utils.setDataRoot("regular-data");
mu = 3.9860047e14;
final Vector3D position = new Vector3D(-6142438.668, 3492467.560, -25767.25680);
final Vector3D velocity = new Vector3D(505.8479685, 942.7809215, 7435.922231);
iniDate = new AbsoluteDate(1969, 7, 28, 4, 0, 0.0, TimeScalesFactory.getTT());
final Orbit orbit = new EquinoctialOrbit(new PVCoordinates(position, velocity), FramesFactory.getGCRF(), iniDate, mu);
initialState = new SpacecraftState(orbit);
double[] absTolerance = { 0.001, 1.0e-9, 1.0e-9, 1.0e-6, 1.0e-6, 1.0e-6, 0.001 };
double[] relTolerance = { 1.0e-7, 1.0e-4, 1.0e-4, 1.0e-7, 1.0e-7, 1.0e-7, 1.0e-7 };
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(0.001, 1000, absTolerance, relTolerance);
integrator.setInitialStepSize(60);
propagator = new NumericalPropagator(integrator);
propagator.setInitialState(initialState);
sun = CelestialBodyFactory.getSun();
earth = CelestialBodyFactory.getEarth();
sunRadius = 696000000.;
earthRadius = 6400000.;
} catch (OrekitException oe) {
Assert.fail(oe.getLocalizedMessage());
}
}
Aggregations