use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionXMLLoaderTest method testEndDateDaily1980.
@Test
public void testEndDateDaily1980() throws OrekitException {
setRoot("rapid-data-xml");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_1996.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionXMLLoader("^finals\\.daily\\.xml$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(2010, 8, 1, TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_1996, history, true).getEndDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionXMLLoaderTest method testStartDateDaily2000.
@Test
public void testStartDateDaily2000() throws OrekitException {
setRoot("rapid-data-xml");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2003.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionXMLLoader("^finals2000A\\.daily\\.xml$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(2010, 5, 11, TimeScalesFactory.getUTC()), Collections.min(history, COMP).getDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionXMLLoaderTest method testIssue139.
@Test
public void testIssue139() throws OrekitException {
setRoot("zipped-data");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_1996.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionXMLLoader("^finals\\.daily\\.xml$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(2010, 7, 1, TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_1996, history, true).getStartDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionXMLLoaderTest method testEndDateFinals2000.
@Test
public void testEndDateFinals2000() throws OrekitException {
setRoot("regular-data");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2003.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
new RapidDataAndPredictionXMLLoader("^finals2000A\\.2002\\.xml$").fillHistory(converter, history);
Assert.assertEquals(new AbsoluteDate(2002, 12, 31, TimeScalesFactory.getUTC()), new EOPHistory(IERSConventions.IERS_2003, history, true).getEndDate());
}
use of org.orekit.time.ChronologicalComparator in project Orekit by CS-SI.
the class RapidDataAndPredictionColumnsLoaderTest method doTestWrongFile.
private void doTestWrongFile(String fileName, int lineNumber) throws OrekitException {
setRoot("rapid-data-columns");
IERSConventions.NutationCorrectionConverter converter = IERSConventions.IERS_2010.getNutationCorrectionConverter();
SortedSet<EOPEntry> history = new TreeSet<EOPEntry>(new ChronologicalComparator());
try {
new RapidDataAndPredictionColumnsLoader(true, fileName).fillHistory(converter, history);
Assert.fail("an exception should have been thrown");
} catch (OrekitException oe) {
Assert.assertEquals(OrekitMessages.UNABLE_TO_PARSE_LINE_IN_FILE, oe.getSpecifier());
Assert.assertEquals(lineNumber, ((Integer) oe.getParts()[0]).intValue());
}
}
Aggregations