use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionColumnsLoaderTest method testStartDateDaily2000.
@Test
public void testStartDateDaily2000() throws OrekitException {
setRoot("rapid-data-columns");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2003.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionColumnsLoader(true, "^finals\\.daily$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(2011, 4, 9, TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_2003, history, true).getStartDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionColumnsLoaderTest method testNoColumns.
@Test
public void testNoColumns() throws OrekitException {
setRoot("rapid-data-columns");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2010.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionColumnsLoader(true, "^finals2000A-no-columns\\.daily$").fillHistory(converter, history);
EOPHistory eopH = new EOPHistory(IERSConventions.IERS_2010, history, true);
Assert.assertEquals(new AbsoluteDate(2011, 4, 16, TimeScalesFactory.getUTC()), eopH.getEndDate());
AbsoluteDate testDate = eopH.getEndDate().shiftedBy(-2 * Constants.JULIAN_DAY);
Assert.assertEquals(0.0, eopH.getPoleCorrection(testDate).getXp(), 1.0e-15);
Assert.assertEquals(0.0, eopH.getPoleCorrection(testDate).getYp(), 1.0e-15);
Assert.assertEquals(0.0, eopH.getUT1MinusUTC(testDate), 1.0e-15);
Assert.assertEquals(0.0, eopH.getLOD(testDate), 1.0e-15);
Assert.assertEquals(0.0, eopH.getNonRotatinOriginNutationCorrection(testDate)[0], 1.0e-15);
Assert.assertEquals(0.0, eopH.getNonRotatinOriginNutationCorrection(testDate)[1], 1.0e-15);
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionColumnsLoaderTest method testStartDateDaily1980.
@Test
public void testStartDateDaily1980() throws OrekitException {
setRoot("rapid-data-columns");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_1996.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionColumnsLoader(false, "^finals\\.daily$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(2011, 4, 9, TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_1996, history, true).getStartDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class BulletinAFilesLoaderTest method testEndDate.
@Test
public void testEndDate() throws OrekitException {
setRoot("bulletinA");
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new BulletinAFilesLoader("bulletina-xxvi-\\d\\d\\d\\.txt").fillHistory(null, history);
Assert.assertTrue(getMaxGap(history) < 2);
Assert.assertEquals(new AbsoluteDate(new DateComponents(DateComponents.MODIFIED_JULIAN_EPOCH, 56968), TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_2010, history, false).getEndDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class BulletinAFilesLoaderTest method testRapidDataContent.
@Test
public void testRapidDataContent() throws OrekitException {
setRoot("bulletinA");
SortedSet<EOPEntry> data = new TreeSet<EOPEntry>(new ChronologicalComparator());
new BulletinAFilesLoader(FramesFactory.BULLETINA_FILENAME).fillHistory(null, data);
EOPHistory history = new EOPHistory(IERSConventions.IERS_2010, data, true);
AbsoluteDate date = new AbsoluteDate(2013, 10, 14, 12, 0, 0, TimeScalesFactory.getUTC());
// the following values are from bulletina-xxvi-042.txt, rapid service section, lines 53-56
Assert.assertEquals((-3 * -0.001957 + 27 * -0.003274 + 27 * -0.004706 - 3 * -0.006211) / 48, history.getUT1MinusUTC(date), 1.0e-10);
Assert.assertEquals(asToRad((-3 * 0.11518 + 27 * 0.11389 + 27 * 0.11285 - 3 * 0.11171) / 48), history.getPoleCorrection(date).getXp(), 1.0e-10);
Assert.assertEquals(asToRad((-3 * 0.28484 + 27 * 0.28449 + 27 * 0.28408 - 3 * 0.28379) / 48), history.getPoleCorrection(date).getYp(), 1.0e-10);
}
Aggregations