use of org.orekit.propagation.numerical.NumericalPropagator in project Orekit by CS-SI.
the class DSSTPropagatorTest method getLEOStatePropagatedBy30Minutes.
private SpacecraftState getLEOStatePropagatedBy30Minutes() throws IllegalArgumentException, OrekitException {
final Vector3D position = new Vector3D(-6142438.668, 3492467.560, -25767.25680);
final Vector3D velocity = new Vector3D(505.8479685, 942.7809215, 7435.922231);
// Spring equinoxe 21st mars 2003 1h00m
final AbsoluteDate initialDate = new AbsoluteDate(new DateComponents(2003, 03, 21), new TimeComponents(1, 0, 0.), TimeScalesFactory.getUTC());
final CartesianOrbit osculatingOrbit = new CartesianOrbit(new PVCoordinates(position, velocity), FramesFactory.getTOD(IERSConventions.IERS_1996, false), initialDate, Constants.WGS84_EARTH_MU);
// Adaptive step integrator
// with a minimum step of 0.001 and a maximum step of 1000
double minStep = 0.001;
double maxstep = 1000.0;
double positionTolerance = 10.0;
OrbitType propagationType = OrbitType.EQUINOCTIAL;
double[][] tolerances = NumericalPropagator.tolerances(positionTolerance, osculatingOrbit, propagationType);
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(minStep, maxstep, tolerances[0], tolerances[1]);
NumericalPropagator propagator = new NumericalPropagator(integrator);
propagator.setOrbitType(propagationType);
NormalizedSphericalHarmonicsProvider provider = GravityFieldFactory.getNormalizedProvider(5, 5);
ForceModel holmesFeatherstone = new HolmesFeatherstoneAttractionModel(FramesFactory.getITRF(IERSConventions.IERS_2010, true), provider);
propagator.addForceModel(holmesFeatherstone);
propagator.setInitialState(new SpacecraftState(osculatingOrbit));
return propagator.propagate(new AbsoluteDate(initialDate, 1800.));
}
use of org.orekit.propagation.numerical.NumericalPropagator in project Orekit by CS-SI.
the class AdditionalEquationsTest method testInitNumerical.
/**
* Test for issue #401
* with a numerical propagator
*/
@Test
public void testInitNumerical() throws OrekitException {
// setup
final double reference = 1.25;
InitCheckerEquations checker = new InitCheckerEquations(reference);
Assert.assertFalse(checker.wasCalled());
// action
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(0.001, 200, tolerance[0], tolerance[1]);
integrator.setInitialStepSize(60);
NumericalPropagator propagatorNumerical = new NumericalPropagator(integrator);
propagatorNumerical.setInitialState(initialState.addAdditionalState(checker.getName(), reference));
propagatorNumerical.addAdditionalEquations(checker);
propagatorNumerical.propagate(initDate.shiftedBy(600));
// verify
Assert.assertTrue(checker.wasCalled());
}
use of org.orekit.propagation.numerical.NumericalPropagator 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;
}
use of org.orekit.propagation.numerical.NumericalPropagator in project Orekit by CS-SI.
the class EventsLoggerTest 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.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);
count = 0;
umbraDetector = buildDetector(true);
penumbraDetector = buildDetector(false);
} catch (OrekitException oe) {
Assert.fail(oe.getLocalizedMessage());
}
}
use of org.orekit.propagation.numerical.NumericalPropagator in project Orekit by CS-SI.
the class CloseEventsNumericalGBSTest 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-1, initialOrbit, OrbitType.CARTESIAN);
final NumericalPropagator propagator = new NumericalPropagator(new GraggBulirschStoerIntegrator(stepSize, stepSize, tol[0], tol[1]));
propagator.setInitialState(new SpacecraftState(initialOrbit));
propagator.setOrbitType(OrbitType.CARTESIAN);
return propagator;
}
Aggregations