use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class BulletinBFilesLoaderTest method testOldFormatTruncated.
@Test
public void testOldFormatTruncated() throws OrekitException {
setRoot("old-bulletinB");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2010.getNutationCorrectionConverter();
SortedSet<EOPEntry> data = new TreeSet<EOPEntry>(new ChronologicalComparator());
try {
new BulletinBFilesLoader("^bulletinb_IAU2000-216-truncated\\.txt$").fillHistory(converter, data);
} catch (OrekitException oe) {
Assert.assertEquals(OrekitMessages.UNEXPECTED_END_OF_FILE_AFTER_LINE, oe.getSpecifier());
Assert.assertEquals(54, ((Integer) oe.getParts()[1]).intValue());
}
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class BulletinBFilesLoaderTest method testOldFormat1980RemovedFirstDates.
@Test
public void testOldFormat1980RemovedFirstDates() throws OrekitException {
setRoot("old-bulletinB");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_1996.getNutationCorrectionConverter();
SortedSet<EOPEntry> data = new TreeSet<EOPEntry>(new ChronologicalComparator());
new BulletinBFilesLoader("^bulletinb_IAU1980-220-edited\\.txt$").fillHistory(converter, data);
EOPHistory history = new EOPHistory(IERSConventions.IERS_1996, data, true);
Assert.assertEquals(new AbsoluteDate(2006, 4, 14, TimeScalesFactory.getUTC()), history.getStartDate());
Assert.assertEquals(new AbsoluteDate(2006, 5, 4, TimeScalesFactory.getUTC()), history.getEndDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class BulletinBFilesLoaderTest method testNewFormatTruncatedEarly.
@Test(expected = OrekitException.class)
public void testNewFormatTruncatedEarly() throws OrekitException {
setRoot("new-bulletinB");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2010.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new BulletinBFilesLoader("^bulletinb-truncated-early\\.270$").fillHistory(converter, history);
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class BulletinBFilesLoaderTest method testNewFormatTruncated.
@Test(expected = OrekitException.class)
public void testNewFormatTruncated() throws OrekitException {
setRoot("new-bulletinB");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2010.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new BulletinBFilesLoader("^bulletinb-truncated\\.270$").fillHistory(converter, history);
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionXMLLoaderTest method testEndDateFinals1980.
@Test
public void testEndDateFinals1980() throws OrekitException {
setRoot("compressed-data");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_1996.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionXMLLoader("^finals\\.1999\\.xml$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(1999, 12, 31, TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_1996, history, true).getEndDate());
}
Aggregations