use of org.orekit.forces.drag.atmosphere.data.MarshallSolarActivityFutureEstimation in project Orekit by CS-SI.
the class MarshallSolarActivityFutureEstimationTest method testKpStrong.
@Test
public void testKpStrong() throws OrekitException {
MarshallSolarActivityFutureEstimation msafe = loadMsafe(MarshallSolarActivityFutureEstimation.StrengthLevel.STRONG);
Assert.assertEquals(2 + 1.0 / 3.0, msafe.get24HoursKp(new AbsoluteDate("2010-10-01", utc)), 0.2);
Assert.assertEquals(3.0, msafe.get24HoursKp(new AbsoluteDate("2011-05-01", utc)), 0.1);
// this one should get exactly to an element of the AP_ARRAY: ap = 7.0
Assert.assertEquals(2.0, msafe.get24HoursKp(new AbsoluteDate("2010-08-01", utc)), 0.3);
Assert.assertEquals(msafe.getThreeHourlyKP(new AbsoluteDate("2010-08-01", utc)), msafe.get24HoursKp(new AbsoluteDate("2010-08-01", utc)), 1.0e-14);
}
use of org.orekit.forces.drag.atmosphere.data.MarshallSolarActivityFutureEstimation in project Orekit by CS-SI.
the class MarshallSolarActivityFutureEstimationTest method loadMsafe.
private MarshallSolarActivityFutureEstimation loadMsafe(MarshallSolarActivityFutureEstimation.StrengthLevel strength) throws OrekitException {
MarshallSolarActivityFutureEstimation msafe = new MarshallSolarActivityFutureEstimation("(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\p{Digit}\\p{Digit}\\p{Digit}\\p{Digit}F10\\.(?:txt|TXT)", strength);
DataProvidersManager manager = DataProvidersManager.getInstance();
manager.feed(msafe.getSupportedNames(), msafe);
return msafe;
}
use of org.orekit.forces.drag.atmosphere.data.MarshallSolarActivityFutureEstimation in project Orekit by CS-SI.
the class MarshallSolarActivityFutureEstimationTest method testFutureOutOfRange.
@Test(expected = OrekitException.class)
public void testFutureOutOfRange() throws OrekitException {
MarshallSolarActivityFutureEstimation msafe = loadMsafe(MarshallSolarActivityFutureEstimation.StrengthLevel.WEAK);
msafe.get24HoursKp(new AbsoluteDate("2060-10-01", utc));
}
use of org.orekit.forces.drag.atmosphere.data.MarshallSolarActivityFutureEstimation in project Orekit by CS-SI.
the class MarshallSolarActivityFutureEstimationTest method testFluxAverage.
@Test
public void testFluxAverage() throws OrekitException {
MarshallSolarActivityFutureEstimation msafe = loadMsafe(MarshallSolarActivityFutureEstimation.StrengthLevel.AVERAGE);
Assert.assertEquals(87.6, msafe.getMeanFlux(new AbsoluteDate("2010-10-01", utc)), 1.0e-10);
Assert.assertEquals(88.7, msafe.getMeanFlux(new AbsoluteDate("2010-10-16T12:00:00", utc)), 1.0e-10);
Assert.assertEquals(89.8, msafe.getMeanFlux(new AbsoluteDate("2010-11-01", utc)), 1.0e-10);
Assert.assertEquals(msafe.getInstantFlux(new AbsoluteDate("2010-11-01", utc)), msafe.getMeanFlux(new AbsoluteDate("2010-11-01", utc)), 1.0e-10);
Assert.assertEquals(MarshallSolarActivityFutureEstimation.StrengthLevel.AVERAGE, msafe.getStrengthLevel());
}
use of org.orekit.forces.drag.atmosphere.data.MarshallSolarActivityFutureEstimation in project Orekit by CS-SI.
the class MarshallSolarActivityFutureEstimationTest method testKpAverage.
@Test
public void testKpAverage() throws OrekitException {
MarshallSolarActivityFutureEstimation msafe = loadMsafe(MarshallSolarActivityFutureEstimation.StrengthLevel.AVERAGE);
Assert.assertEquals(2 - 1.0 / 3.0, msafe.get24HoursKp(new AbsoluteDate("2010-10-01", utc)), 0.1);
Assert.assertEquals(2 + 1.0 / 3.0, msafe.get24HoursKp(new AbsoluteDate("2011-05-01", utc)), 0.1);
Assert.assertEquals(2.0 - 1.0 / 3.0, msafe.get24HoursKp(new AbsoluteDate("2010-08-01", utc)), 0.1);
Assert.assertEquals(msafe.getThreeHourlyKP(new AbsoluteDate("2010-08-01", utc)), msafe.get24HoursKp(new AbsoluteDate("2010-08-01", utc)), 1.0e-14);
}
Aggregations