Search in sources :

Example 16 with DSSTForceModel

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

the class DSSTPropagatorTest method testGetInitialOsculatingState.

@Test
public void testGetInitialOsculatingState() throws IllegalArgumentException, OrekitException {
    final SpacecraftState initialState = getGEOState();
    // build integrator
    final double minStep = initialState.getKeplerianPeriod() * 0.1;
    final double maxStep = initialState.getKeplerianPeriod() * 10.0;
    final double[][] tol = DSSTPropagator.tolerances(0.1, initialState.getOrbit());
    AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(minStep, maxStep, tol[0], tol[1]);
    // build the propagator for the propagation of the mean elements
    DSSTPropagator prop = new DSSTPropagator(integrator, true);
    final UnnormalizedSphericalHarmonicsProvider provider = GravityFieldFactory.getUnnormalizedProvider(4, 0);
    final Frame earthFrame = CelestialBodyFactory.getEarth().getBodyOrientedFrame();
    DSSTForceModel zonal = new DSSTZonal(provider, 4, 3, 9);
    DSSTForceModel tesseral = new DSSTTesseral(earthFrame, Constants.WGS84_EARTH_ANGULAR_VELOCITY, provider, 4, 0, 4, 8, 4, 0, 2);
    prop.addForceModel(zonal);
    prop.addForceModel(tesseral);
    // Set the initial state as osculating
    prop.setInitialState(initialState, false);
    // Check the stored initial state is the osculating one
    Assert.assertEquals(initialState, prop.getInitialState());
    // Check that no propagation, i.e. propagation to the initial date, provides the initial
    // osculating state although the propagator is configured to propagate mean elements !!!
    Assert.assertEquals(initialState, prop.propagate(initialState.getDate()));
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) Frame(org.orekit.frames.Frame) UnnormalizedSphericalHarmonicsProvider(org.orekit.forces.gravity.potential.UnnormalizedSphericalHarmonicsProvider) AdaptiveStepsizeIntegrator(org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator) DSSTZonal(org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal) DSSTTesseral(org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral) DormandPrince853Integrator(org.hipparchus.ode.nonstiff.DormandPrince853Integrator) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) 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