Search in sources :

Example 1 with DTM2000InputParameters

use of org.orekit.forces.drag.atmosphere.DTM2000InputParameters in project Orekit by CS-SI.

the class MarshallSolarActivityFutureEstimationTest method testGetKp.

/**
 * Check {@link MarshallSolarActivityFutureEstimation#get24HoursKp(AbsoluteDate)} and
 * {@link MarshallSolarActivityFutureEstimation#getThreeHourlyKP(AbsoluteDate)} are
 * continuous.
 *
 * @throws OrekitException on error.
 */
@Test
public void testGetKp() throws OrekitException {
    // setup
    DTM2000InputParameters flux = getFlux();
    final AbsoluteDate july = new AbsoluteDate(2008, 7, 1, utc);
    final AbsoluteDate august = new AbsoluteDate(2008, 8, 1, utc);
    final AbsoluteDate middle = july.shiftedBy(august.durationFrom(july) / 2.0);
    final double minute = 60;
    final AbsoluteDate before = middle.shiftedBy(-minute);
    final AbsoluteDate after = middle.shiftedBy(+minute);
    // action + verify
    // non-chaotic i.e. small change in input produces small change in output.
    double kpHourlyDifference = flux.getThreeHourlyKP(before) - flux.getThreeHourlyKP(after);
    assertThat(kpHourlyDifference, closeTo(0.0, 1e-4));
    double kpDailyDifference = flux.get24HoursKp(before) - flux.get24HoursKp(after);
    assertThat(kpDailyDifference, closeTo(0.0, 1e-4));
    assertThat(flux.getThreeHourlyKP(middle), closeTo(2.18, 0.3));
    assertThat(flux.get24HoursKp(middle), closeTo(2.18, 0.3));
}
Also used : DTM2000InputParameters(org.orekit.forces.drag.atmosphere.DTM2000InputParameters) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 2 with DTM2000InputParameters

use of org.orekit.forces.drag.atmosphere.DTM2000InputParameters in project Orekit by CS-SI.

the class MarshallSolarActivityFutureEstimationTest method getNumericalPropagator.

/**
 * Configure a numerical propagator.
 *
 * @param sun   Sun.
 * @param earth Earth.
 * @param ic    initial condition.
 * @return a propagator.
 * @throws OrekitException on error.
 */
private NumericalPropagator getNumericalPropagator(CelestialBody sun, OneAxisEllipsoid earth, SpacecraftState ic) throws OrekitException {
    // some non-integer step size to induce truncation error in flux interpolation
    final ODEIntegrator integrator = new ClassicalRungeKuttaIntegrator(120 + 0.1);
    NumericalPropagator propagator = new NumericalPropagator(integrator);
    DTM2000InputParameters flux = getFlux();
    final Atmosphere atmosphere = new DTM2000(flux, sun, earth);
    final IsotropicDrag satellite = new IsotropicDrag(1, 3.2);
    propagator.addForceModel(new DragForce(atmosphere, satellite));
    propagator.setInitialState(ic);
    propagator.setOrbitType(OrbitType.CARTESIAN);
    return propagator;
}
Also used : IsotropicDrag(org.orekit.forces.drag.IsotropicDrag) NumericalPropagator(org.orekit.propagation.numerical.NumericalPropagator) ODEIntegrator(org.hipparchus.ode.ODEIntegrator) Atmosphere(org.orekit.forces.drag.atmosphere.Atmosphere) DragForce(org.orekit.forces.drag.DragForce) DTM2000(org.orekit.forces.drag.atmosphere.DTM2000) ClassicalRungeKuttaIntegrator(org.hipparchus.ode.nonstiff.ClassicalRungeKuttaIntegrator) DTM2000InputParameters(org.orekit.forces.drag.atmosphere.DTM2000InputParameters)

Aggregations

DTM2000InputParameters (org.orekit.forces.drag.atmosphere.DTM2000InputParameters)2 ODEIntegrator (org.hipparchus.ode.ODEIntegrator)1 ClassicalRungeKuttaIntegrator (org.hipparchus.ode.nonstiff.ClassicalRungeKuttaIntegrator)1 Test (org.junit.Test)1 DragForce (org.orekit.forces.drag.DragForce)1 IsotropicDrag (org.orekit.forces.drag.IsotropicDrag)1 Atmosphere (org.orekit.forces.drag.atmosphere.Atmosphere)1 DTM2000 (org.orekit.forces.drag.atmosphere.DTM2000)1 NumericalPropagator (org.orekit.propagation.numerical.NumericalPropagator)1 AbsoluteDate (org.orekit.time.AbsoluteDate)1