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));
}
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;
}
Aggregations