use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.
the class DSSTPropagatorTest method testIssue364.
@Test
public void testIssue364() throws OrekitException {
Utils.setDataRoot("regular-data");
AbsoluteDate date = new AbsoluteDate("2003-06-18T00:00:00.000", TimeScalesFactory.getUTC());
CircularOrbit orbit = new CircularOrbit(7389068.5, 0.0, 0.0, 1.709573, 1.308398, 0, PositionAngle.MEAN, FramesFactory.getTOD(IERSConventions.IERS_2010, false), date, Constants.WGS84_EARTH_MU);
SpacecraftState osculatingState = new SpacecraftState(orbit, 1116.2829);
List<DSSTForceModel> dsstForceModels = new ArrayList<DSSTForceModel>();
dsstForceModels.add(new DSSTThirdBody(CelestialBodyFactory.getMoon()));
dsstForceModels.add(new DSSTThirdBody(CelestialBodyFactory.getSun()));
SpacecraftState meanState = DSSTPropagator.computeMeanState(osculatingState, null, dsstForceModels);
Assert.assertEquals(0.421, osculatingState.getA() - meanState.getA(), 1.0e-3);
Assert.assertEquals(-5.23e-8, osculatingState.getEquinoctialEx() - meanState.getEquinoctialEx(), 1.0e-10);
Assert.assertEquals(15.22e-8, osculatingState.getEquinoctialEy() - meanState.getEquinoctialEy(), 1.0e-10);
Assert.assertEquals(-3.15e-8, osculatingState.getHx() - meanState.getHx(), 1.0e-10);
Assert.assertEquals(2.83e-8, osculatingState.getHy() - meanState.getHy(), 1.0e-10);
Assert.assertEquals(15.96e-8, osculatingState.getLM() - meanState.getLM(), 1.0e-10);
}
use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.
the class DSSTPropagatorTest method testIssue339WithAccelerations.
@Test
public void testIssue339WithAccelerations() throws OrekitException {
final SpacecraftState osculatingState = getLEOStatePropagatedBy30Minutes();
final CelestialBody sun = CelestialBodyFactory.getSun();
final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
final BoxAndSolarArraySpacecraft boxAndWing = new BoxAndSolarArraySpacecraft(5.0, 2.0, 2.0, sun, 50.0, Vector3D.PLUS_J, 2.0, 0.1, 0.2, 0.6);
final Atmosphere atmosphere = new HarrisPriester(CelestialBodyFactory.getSun(), earth, 6);
final AttitudeProvider attitudeProvider = new LofOffset(osculatingState.getFrame(), LOFType.VVLH, RotationOrder.XYZ, 0.0, 0.0, 0.0);
// Surface force models that require an attitude provider
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(new DSSTAtmosphericDrag(atmosphere, boxAndWing));
final SpacecraftState meanState = DSSTPropagator.computeMeanState(osculatingState, attitudeProvider, forces);
final SpacecraftState computedOsculatingState = DSSTPropagator.computeOsculatingState(meanState, attitudeProvider, forces);
Assert.assertEquals(0.0, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), computedOsculatingState.getPVCoordinates().getPosition()), 5.0e-6);
}
use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.
the class DSSTPropagatorTest method testIssue257.
@Test
public void testIssue257() throws OrekitException {
final SpacecraftState meanState = getGEOState();
// Third Bodies Force Model (Moon + Sun)
final DSSTForceModel moon = new DSSTThirdBody(CelestialBodyFactory.getMoon());
final DSSTForceModel sun = new DSSTThirdBody(CelestialBodyFactory.getSun());
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(moon);
forces.add(sun);
final SpacecraftState osculatingState = DSSTPropagator.computeOsculatingState(meanState, null, forces);
Assert.assertEquals(734.3, Vector3D.distance(meanState.getPVCoordinates().getPosition(), osculatingState.getPVCoordinates().getPosition()), 1.0);
final SpacecraftState computedMeanState = DSSTPropagator.computeMeanState(osculatingState, null, forces);
Assert.assertEquals(734.3, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), computedMeanState.getPVCoordinates().getPosition()), 1.0);
Assert.assertEquals(0.0, Vector3D.distance(computedMeanState.getPVCoordinates().getPosition(), meanState.getPVCoordinates().getPosition()), 5.0e-6);
}
use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.
the class DSSTPropagatorTest method testPropagationWithThirdBody.
@Test
public void testPropagationWithThirdBody() throws OrekitException, IOException {
// Central Body geopotential 2x0
final UnnormalizedSphericalHarmonicsProvider provider = GravityFieldFactory.getUnnormalizedProvider(2, 0);
final Frame earthFrame = CelestialBodyFactory.getEarth().getBodyOrientedFrame();
DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame, Constants.WGS84_EARTH_ANGULAR_VELOCITY, provider, 2, 0, 0, 2, 2, 0, 0);
// Third Bodies Force Model (Moon + Sun)
DSSTForceModel moon = new DSSTThirdBody(CelestialBodyFactory.getMoon());
DSSTForceModel sun = new DSSTThirdBody(CelestialBodyFactory.getSun());
// SIRIUS Orbit
final AbsoluteDate initDate = new AbsoluteDate(2003, 7, 1, 0, 0, 00.000, TimeScalesFactory.getUTC());
final Orbit orbit = new KeplerianOrbit(42163393., 0.2684, FastMath.toRadians(63.435), FastMath.toRadians(270.0), FastMath.toRadians(285.0), FastMath.toRadians(344.0), PositionAngle.MEAN, FramesFactory.getEME2000(), initDate, provider.getMu());
// Set propagator with state and force model
setDSSTProp(new SpacecraftState(orbit));
dsstProp.addForceModel(zonal);
dsstProp.addForceModel(tesseral);
dsstProp.addForceModel(moon);
dsstProp.addForceModel(sun);
// 5 days propagation
final SpacecraftState state = dsstProp.propagate(initDate.shiftedBy(5. * 86400.));
// Ref Standalone_DSST:
// a = 42163393.0 m
// h/ey = -0.06893353670734315
// k/ex = -0.2592789733084587
// p/hy = -0.5968524904937771
// q/hx = 0.1595005111738418
// lM = 183°9386620425922
Assert.assertEquals(42163393.0, state.getA(), 1.e-1);
Assert.assertEquals(-0.2592789733084587, state.getEquinoctialEx(), 5.e-7);
Assert.assertEquals(-0.06893353670734315, state.getEquinoctialEy(), 2.e-7);
Assert.assertEquals(0.1595005111738418, state.getHx(), 2.e-7);
Assert.assertEquals(-0.5968524904937771, state.getHy(), 5.e-8);
Assert.assertEquals(183.9386620425922, FastMath.toDegrees(MathUtils.normalizeAngle(state.getLM(), FastMath.PI)), 3.e-2);
}
use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.
the class DSSTPropagatorTest method testIssue339.
@Test
public void testIssue339() throws OrekitException {
final SpacecraftState osculatingState = getLEOState();
final CelestialBody sun = CelestialBodyFactory.getSun();
final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
final BoxAndSolarArraySpacecraft boxAndWing = new BoxAndSolarArraySpacecraft(5.0, 2.0, 2.0, sun, 50.0, Vector3D.PLUS_J, 2.0, 0.1, 0.2, 0.6);
final Atmosphere atmosphere = new HarrisPriester(CelestialBodyFactory.getSun(), earth, 6);
final AttitudeProvider attitudeProvider = new LofOffset(osculatingState.getFrame(), LOFType.VVLH, RotationOrder.XYZ, 0.0, 0.0, 0.0);
// Surface force models that require an attitude provider
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(new DSSTSolarRadiationPressure(sun, Constants.WGS84_EARTH_EQUATORIAL_RADIUS, boxAndWing));
forces.add(new DSSTAtmosphericDrag(atmosphere, boxAndWing));
final SpacecraftState meanState = DSSTPropagator.computeMeanState(osculatingState, attitudeProvider, forces);
Assert.assertEquals(0.522, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), meanState.getPVCoordinates().getPosition()), 0.001);
final SpacecraftState computedOsculatingState = DSSTPropagator.computeOsculatingState(meanState, attitudeProvider, forces);
Assert.assertEquals(0.0, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), computedOsculatingState.getPVCoordinates().getPosition()), 5.0e-6);
}
Aggregations