use of org.orekit.orbits.KeplerianOrbit in project Orekit by CS-SI.
the class ImpulseManeuverTest method testBackward.
@Test
public void testBackward() throws OrekitException {
final AbsoluteDate iniDate = new AbsoluteDate(2003, 5, 1, 17, 30, 0.0, TimeScalesFactory.getUTC());
final Orbit initialOrbit = new KeplerianOrbit(7e6, 1.0e-4, FastMath.toRadians(98.5), FastMath.toRadians(87.0), FastMath.toRadians(216.1807), FastMath.toRadians(319.779), PositionAngle.MEAN, FramesFactory.getEME2000(), iniDate, Constants.EIGEN5C_EARTH_MU);
KeplerianPropagator propagator = new KeplerianPropagator(initialOrbit, new LofOffset(initialOrbit.getFrame(), LOFType.VNC));
DateDetector dateDetector = new DateDetector(iniDate.shiftedBy(-300));
Vector3D deltaV = new Vector3D(12.0, 1.0, -4.0);
final double isp = 300;
ImpulseManeuver<DateDetector> maneuver = new ImpulseManeuver<DateDetector>(dateDetector, deltaV, isp).withMaxCheck(3600.0).withThreshold(1.0e-6);
propagator.addEventDetector(maneuver);
SpacecraftState finalState = propagator.propagate(initialOrbit.getDate().shiftedBy(-900));
Assert.assertTrue(finalState.getMass() > propagator.getInitialState().getMass());
Assert.assertTrue(finalState.getDate().compareTo(propagator.getInitialState().getDate()) < 0);
}
use of org.orekit.orbits.KeplerianOrbit in project Orekit by CS-SI.
the class SmallManeuverAnalyticalModelTest method testEccentricOrbit.
@Test
public void testEccentricOrbit() throws OrekitException {
Orbit heo = new KeplerianOrbit(90000000.0, 0.92, FastMath.toRadians(98.0), FastMath.toRadians(12.3456), FastMath.toRadians(123.456), FastMath.toRadians(1.23456), PositionAngle.MEAN, FramesFactory.getEME2000(), new AbsoluteDate(new DateComponents(2004, 01, 01), new TimeComponents(23, 30, 00.000), TimeScalesFactory.getUTC()), Constants.EIGEN5C_EARTH_MU);
double mass = 5600.0;
AbsoluteDate t0 = heo.getDate().shiftedBy(1000.0);
Vector3D dV = new Vector3D(-0.01, 0.02, 0.03);
double f = 20.0;
double isp = 315.0;
BoundedPropagator withoutManeuver = getEphemeris(heo, mass, t0, Vector3D.ZERO, f, isp);
BoundedPropagator withManeuver = getEphemeris(heo, mass, t0, dV, f, isp);
SmallManeuverAnalyticalModel model = new SmallManeuverAnalyticalModel(withoutManeuver.propagate(t0), dV, isp);
Assert.assertEquals(t0, model.getDate());
for (AbsoluteDate t = withoutManeuver.getMinDate(); t.compareTo(withoutManeuver.getMaxDate()) < 0; t = t.shiftedBy(600.0)) {
PVCoordinates pvWithout = withoutManeuver.getPVCoordinates(t, heo.getFrame());
PVCoordinates pvWith = withManeuver.getPVCoordinates(t, heo.getFrame());
PVCoordinates pvModel = model.apply(withoutManeuver.propagate(t)).getPVCoordinates(heo.getFrame());
double nominalDeltaP = new PVCoordinates(pvWith, pvWithout).getPosition().getNorm();
double modelError = new PVCoordinates(pvWith, pvModel).getPosition().getNorm();
if (t.compareTo(t0) < 0) {
// before maneuver, all positions should be equal
Assert.assertEquals(0, nominalDeltaP, 1.0e-10);
Assert.assertEquals(0, modelError, 1.0e-10);
} else {
// despite nominal deltaP exceeds 300 kilometers at perigee, after 3 orbits
if (t.durationFrom(t0) > 0.01 * heo.getKeplerianPeriod()) {
Assert.assertTrue(modelError < 0.005 * nominalDeltaP);
}
Assert.assertTrue(modelError < 1700);
}
}
}
use of org.orekit.orbits.KeplerianOrbit in project Orekit by CS-SI.
the class SolarRadiationPressureTest method testGlobalStateJacobianIsotropicClassical.
@Test
public void testGlobalStateJacobianIsotropicClassical() throws OrekitException {
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(2003, 03, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, FramesFactory.getEME2000(), date, Constants.EIGEN5C_EARTH_MU);
OrbitType integrationType = OrbitType.CARTESIAN;
double[][] tolerances = NumericalPropagator.tolerances(0.01, orbit, integrationType);
NumericalPropagator propagator = new NumericalPropagator(new DormandPrince853Integrator(1.0e-3, 120, tolerances[0], tolerances[1]));
propagator.setOrbitType(integrationType);
SolarRadiationPressure forceModel = new SolarRadiationPressure(CelestialBodyFactory.getSun(), Constants.WGS84_EARTH_EQUATORIAL_RADIUS, new IsotropicRadiationClassicalConvention(2.5, 0.7, 0.2));
propagator.addForceModel(forceModel);
SpacecraftState state0 = new SpacecraftState(orbit);
checkStateJacobian(propagator, state0, date.shiftedBy(3.5 * 3600.0), 1e6, tolerances[0], 2.0e-5);
}
use of org.orekit.orbits.KeplerianOrbit in project Orekit by CS-SI.
the class SolarRadiationPressureTest method testLocalJacobianIsotropicClassicalVs80Implementation.
@Test
public void testLocalJacobianIsotropicClassicalVs80Implementation() throws OrekitException {
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(2003, 03, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, FramesFactory.getEME2000(), date, Constants.EIGEN5C_EARTH_MU);
final SolarRadiationPressure forceModel = new SolarRadiationPressure(CelestialBodyFactory.getSun(), Constants.WGS84_EARTH_EQUATORIAL_RADIUS, new IsotropicRadiationClassicalConvention(2.5, 0.7, 0.2));
checkStateJacobianVs80Implementation(new SpacecraftState(orbit), forceModel, new LofOffset(orbit.getFrame(), LOFType.VVLH), 1.0e-15, false);
}
use of org.orekit.orbits.KeplerianOrbit in project Orekit by CS-SI.
the class SolarRadiationPressureTest method testGlobalStateJacobianIsotropicSingle.
@Test
public void testGlobalStateJacobianIsotropicSingle() throws OrekitException {
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(2003, 03, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, FramesFactory.getEME2000(), date, Constants.EIGEN5C_EARTH_MU);
OrbitType integrationType = OrbitType.CARTESIAN;
double[][] tolerances = NumericalPropagator.tolerances(0.01, orbit, integrationType);
NumericalPropagator propagator = new NumericalPropagator(new DormandPrince853Integrator(1.0e-3, 120, tolerances[0], tolerances[1]));
propagator.setOrbitType(integrationType);
SolarRadiationPressure forceModel = new SolarRadiationPressure(CelestialBodyFactory.getSun(), Constants.WGS84_EARTH_EQUATORIAL_RADIUS, new IsotropicRadiationSingleCoefficient(2.5, 0.7));
propagator.addForceModel(forceModel);
SpacecraftState state0 = new SpacecraftState(orbit);
checkStateJacobian(propagator, state0, date.shiftedBy(3.5 * 3600.0), 1e3, tolerances[0], 2.0e-5);
}
Aggregations