Search in sources :

Example 1 with DSSTForceModel

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);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) DSSTThirdBody(org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody) CircularOrbit(org.orekit.orbits.CircularOrbit) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 2 with DSSTForceModel

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);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) BoxAndSolarArraySpacecraft(org.orekit.forces.BoxAndSolarArraySpacecraft) HarrisPriester(org.orekit.forces.drag.atmosphere.HarrisPriester) OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) Atmosphere(org.orekit.forces.drag.atmosphere.Atmosphere) CelestialBody(org.orekit.bodies.CelestialBody) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) LofOffset(org.orekit.attitudes.LofOffset) DSSTAtmosphericDrag(org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) Test(org.junit.Test)

Example 3 with DSSTForceModel

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);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) DSSTThirdBody(org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) Test(org.junit.Test)

Example 4 with DSSTForceModel

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);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) Frame(org.orekit.frames.Frame) DSSTThirdBody(org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) CartesianOrbit(org.orekit.orbits.CartesianOrbit) KeplerianOrbit(org.orekit.orbits.KeplerianOrbit) Orbit(org.orekit.orbits.Orbit) CircularOrbit(org.orekit.orbits.CircularOrbit) UnnormalizedSphericalHarmonicsProvider(org.orekit.forces.gravity.potential.UnnormalizedSphericalHarmonicsProvider) DSSTZonal(org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal) DSSTTesseral(org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral) KeplerianOrbit(org.orekit.orbits.KeplerianOrbit) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 5 with DSSTForceModel

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);
}
Also used : HarrisPriester(org.orekit.forces.drag.atmosphere.HarrisPriester) OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) DSSTAtmosphericDrag(org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag) DSSTSolarRadiationPressure(org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure) SpacecraftState(org.orekit.propagation.SpacecraftState) BoxAndSolarArraySpacecraft(org.orekit.forces.BoxAndSolarArraySpacecraft) Atmosphere(org.orekit.forces.drag.atmosphere.Atmosphere) CelestialBody(org.orekit.bodies.CelestialBody) LofOffset(org.orekit.attitudes.LofOffset) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) Test(org.junit.Test)

Aggregations

DSSTForceModel (org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel)16 SpacecraftState (org.orekit.propagation.SpacecraftState)15 Test (org.junit.Test)13 ArrayList (java.util.ArrayList)12 UnnormalizedSphericalHarmonicsProvider (org.orekit.forces.gravity.potential.UnnormalizedSphericalHarmonicsProvider)8 DSSTTesseral (org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral)8 Frame (org.orekit.frames.Frame)7 DSSTZonal (org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal)7 AbsoluteDate (org.orekit.time.AbsoluteDate)7 CircularOrbit (org.orekit.orbits.CircularOrbit)6 EquinoctialOrbit (org.orekit.orbits.EquinoctialOrbit)6 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)5 CartesianOrbit (org.orekit.orbits.CartesianOrbit)4 Orbit (org.orekit.orbits.Orbit)4 DSSTThirdBody (org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody)4 OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)3 Atmosphere (org.orekit.forces.drag.atmosphere.Atmosphere)3 HarrisPriester (org.orekit.forces.drag.atmosphere.HarrisPriester)3 DSSTAtmosphericDrag (org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag)3 ShortPeriodTerms (org.orekit.propagation.semianalytical.dsst.forces.ShortPeriodTerms)3