Search in sources :

Example 6 with DSSTForceModel

use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.

the class DSSTPropagatorTest method testIssue363.

@Test
public void testIssue363() throws OrekitException {
    Utils.setDataRoot("regular-data");
    AbsoluteDate date = new AbsoluteDate("2003-06-18T00:00:00.000", TimeScalesFactory.getUTC());
    CircularOrbit orbit = new CircularOrbit(7389068.5, 1.0e-15, 1.0e-15, 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 7 with DSSTForceModel

use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.

the class DSSTPropagatorTest method testIssueMeanInclination.

@Test
public void testIssueMeanInclination() throws OrekitException {
    final double earthAe = 6378137.0;
    final double earthMu = 3.9860044E14;
    final double earthJ2 = 0.0010826;
    // Initialize the DSST propagator with only J2 perturbation
    Orbit orb = new KeplerianOrbit(new TimeStampedPVCoordinates(new AbsoluteDate("1992-10-08T15:20:38.821", TimeScalesFactory.getUTC()), new Vector3D(5392808.809823, -4187618.3357927715, -44206.638015847195), new Vector3D(2337.4472786270794, 2474.0146611860464, 6778.507766114648)), FramesFactory.getTOD(false), earthMu);
    final SpacecraftState ss = new SpacecraftState(orb);
    final UnnormalizedSphericalHarmonicsProvider provider = GravityFieldFactory.getUnnormalizedProvider(earthAe, earthMu, TideSystem.UNKNOWN, new double[][] { { 0.0 }, { 0.0 }, { -earthJ2 } }, new double[][] { { 0.0 }, { 0.0 }, { 0.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);
    final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
    forces.add(zonal);
    forces.add(tesseral);
    // Computes J2 mean elements using the DSST osculating to mean converter
    final Orbit meanOrb = DSSTPropagator.computeMeanState(ss, null, forces).getOrbit();
    Assert.assertEquals(0.0164196, FastMath.toDegrees(orb.getI() - meanOrb.getI()), 1.0e-7);
}
Also used : Frame(org.orekit.frames.Frame) 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) DSSTZonal(org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal) ArrayList(java.util.ArrayList) DSSTTesseral(org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral) TimeStampedPVCoordinates(org.orekit.utils.TimeStampedPVCoordinates) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) AbsoluteDate(org.orekit.time.AbsoluteDate) SpacecraftState(org.orekit.propagation.SpacecraftState) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) UnnormalizedSphericalHarmonicsProvider(org.orekit.forces.gravity.potential.UnnormalizedSphericalHarmonicsProvider) KeplerianOrbit(org.orekit.orbits.KeplerianOrbit) Test(org.junit.Test)

Example 8 with DSSTForceModel

use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.

the class DSSTPropagatorTest method testPropagationWithSolarRadiationPressure.

@Test
public void testPropagationWithSolarRadiationPressure() throws OrekitException {
    // Central Body geopotential 2x0
    final UnnormalizedSphericalHarmonicsProvider provider = GravityFieldFactory.getUnnormalizedProvider(2, 0);
    DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
    DSSTForceModel tesseral = new DSSTTesseral(CelestialBodyFactory.getEarth().getBodyOrientedFrame(), Constants.WGS84_EARTH_ANGULAR_VELOCITY, provider, 2, 0, 0, 2, 2, 0, 0);
    // SRP Force Model
    DSSTForceModel srp = new DSSTSolarRadiationPressure(1.2, 100., CelestialBodyFactory.getSun(), Constants.WGS84_EARTH_EQUATORIAL_RADIUS);
    // GEO Orbit
    final AbsoluteDate initDate = new AbsoluteDate(2003, 9, 16, 0, 0, 00.000, TimeScalesFactory.getUTC());
    final Orbit orbit = new KeplerianOrbit(42166258., 0.0001, FastMath.toRadians(0.001), FastMath.toRadians(315.4985), FastMath.toRadians(130.7562), FastMath.toRadians(44.2377), PositionAngle.MEAN, FramesFactory.getGCRF(), initDate, provider.getMu());
    // Set propagator with state and force model
    dsstProp = new DSSTPropagator(new ClassicalRungeKuttaIntegrator(86400.));
    dsstProp.setInitialState(new SpacecraftState(orbit), false);
    dsstProp.addForceModel(zonal);
    dsstProp.addForceModel(tesseral);
    dsstProp.addForceModel(srp);
    // 10 days propagation
    final SpacecraftState state = dsstProp.propagate(initDate.shiftedBy(10. * 86400.));
    // Ref Standalone_DSST:
    // a    = 42166257.99807995 m
    // h/ey = -0.1191876027555493D-03
    // k/ex = -0.1781865038201885D-05
    // p/hy =  0.6618387121369373D-05
    // q/hx = -0.5624363171289686D-05
    // lM   = 140°3496229467104
    Assert.assertEquals(42166257.99807995, state.getA(), 0.8);
    Assert.assertEquals(-0.1781865038201885e-05, state.getEquinoctialEx(), 3.e-7);
    Assert.assertEquals(-0.1191876027555493e-03, state.getEquinoctialEy(), 4.e-6);
    Assert.assertEquals(-0.5624363171289686e-05, state.getHx(), 4.e-9);
    Assert.assertEquals(0.6618387121369373e-05, state.getHy(), 3.e-10);
    Assert.assertEquals(140.3496229467104, FastMath.toDegrees(MathUtils.normalizeAngle(state.getLM(), FastMath.PI)), 2.e-4);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) 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) ClassicalRungeKuttaIntegrator(org.hipparchus.ode.nonstiff.ClassicalRungeKuttaIntegrator) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) AbsoluteDate(org.orekit.time.AbsoluteDate) DSSTSolarRadiationPressure(org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure) Test(org.junit.Test)

Example 9 with DSSTForceModel

use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.

the class DSSTPropagatorTest method testOsculatingToMeanState.

@Test
public void testOsculatingToMeanState() throws IllegalArgumentException, OrekitException {
    final SpacecraftState meanState = getGEOState();
    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);
    final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
    forces.add(zonal);
    forces.add(tesseral);
    final SpacecraftState osculatingState = DSSTPropagator.computeOsculatingState(meanState, null, forces);
    // there are no Gaussian force models, we don't need an attitude provider
    final SpacecraftState computedMeanState = DSSTPropagator.computeMeanState(osculatingState, null, forces);
    Assert.assertEquals(meanState.getA(), computedMeanState.getA(), 2.0e-8);
    Assert.assertEquals(0.0, Vector3D.distance(meanState.getPVCoordinates().getPosition(), computedMeanState.getPVCoordinates().getPosition()), 2.0e-8);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) Frame(org.orekit.frames.Frame) UnnormalizedSphericalHarmonicsProvider(org.orekit.forces.gravity.potential.UnnormalizedSphericalHarmonicsProvider) DSSTZonal(org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal) ArrayList(java.util.ArrayList) DSSTTesseral(org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) Test(org.junit.Test)

Example 10 with DSSTForceModel

use of org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel in project Orekit by CS-SI.

the class DSSTPropagator method computeOsculatingState.

/**
 * Conversion from mean to osculating orbit.
 * <p>
 * Compute osculating state <b>in a DSST sense</b>, corresponding to the
 * mean SpacecraftState in input, and according to the Force models taken
 * into account.
 * </p><p>
 * Since the osculating state is obtained by adding short-periodic variation
 * of each force model, the resulting output will depend on the
 * force models parameterized in input.
 * </p>
 * @param mean Mean state to convert
 * @param forces Forces to take into account
 * @param attitudeProvider attitude provider (may be null if there are no Gaussian force models
 * like atmospheric drag, radiation pressure or specific user-defined models)
 * @return osculating state in a DSST sense
 * @throws OrekitException if computation of short periodics fails
 */
public static SpacecraftState computeOsculatingState(final SpacecraftState mean, final AttitudeProvider attitudeProvider, final Collection<DSSTForceModel> forces) throws OrekitException {
    // Create the auxiliary object
    final AuxiliaryElements aux = new AuxiliaryElements(mean.getOrbit(), I);
    // Set the force models
    final List<ShortPeriodTerms> shortPeriodTerms = new ArrayList<ShortPeriodTerms>();
    for (final DSSTForceModel force : forces) {
        force.registerAttitudeProvider(attitudeProvider);
        shortPeriodTerms.addAll(force.initialize(aux, false));
        force.updateShortPeriodTerms(mean);
    }
    final EquinoctialOrbit osculatingOrbit = computeOsculatingOrbit(mean, shortPeriodTerms);
    return new SpacecraftState(osculatingOrbit, mean.getAttitude(), mean.getMass(), mean.getAdditionalStates());
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) ShortPeriodTerms(org.orekit.propagation.semianalytical.dsst.forces.ShortPeriodTerms) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) AuxiliaryElements(org.orekit.propagation.semianalytical.dsst.utilities.AuxiliaryElements)

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