Search in sources :

Example 16 with ChronologicalComparator

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());
}
Also used : TreeSet(java.util.TreeSet) IERSConventions(org.orekit.utils.IERSConventions) ChronologicalComparator(org.orekit.time.ChronologicalComparator) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test) AbstractFilesLoaderTest(org.orekit.data.AbstractFilesLoaderTest)

Example 17 with ChronologicalComparator

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);
}
Also used : TreeSet(java.util.TreeSet) IERSConventions(org.orekit.utils.IERSConventions) ChronologicalComparator(org.orekit.time.ChronologicalComparator) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test) AbstractFilesLoaderTest(org.orekit.data.AbstractFilesLoaderTest)

Example 18 with ChronologicalComparator

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());
}
Also used : TreeSet(java.util.TreeSet) IERSConventions(org.orekit.utils.IERSConventions) ChronologicalComparator(org.orekit.time.ChronologicalComparator) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test) AbstractFilesLoaderTest(org.orekit.data.AbstractFilesLoaderTest)

Example 19 with ChronologicalComparator

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());
}
Also used : TreeSet(java.util.TreeSet) DateComponents(org.orekit.time.DateComponents) ChronologicalComparator(org.orekit.time.ChronologicalComparator) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test) AbstractFilesLoaderTest(org.orekit.data.AbstractFilesLoaderTest)

Example 20 with ChronologicalComparator

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);
}
Also used : TreeSet(java.util.TreeSet) ChronologicalComparator(org.orekit.time.ChronologicalComparator) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test) AbstractFilesLoaderTest(org.orekit.data.AbstractFilesLoaderTest)

Aggregations

ChronologicalComparator (org.orekit.time.ChronologicalComparator)57 TreeSet (java.util.TreeSet)47 Test (org.junit.Test)44 AbstractFilesLoaderTest (org.orekit.data.AbstractFilesLoaderTest)41 AbsoluteDate (org.orekit.time.AbsoluteDate)41 IERSConventions (org.orekit.utils.IERSConventions)39 OrekitException (org.orekit.errors.OrekitException)11 ArrayList (java.util.ArrayList)10 Context (org.orekit.estimation.Context)9 Propagator (org.orekit.propagation.Propagator)9 NumericalPropagatorBuilder (org.orekit.propagation.conversion.NumericalPropagatorBuilder)9 Max (org.hipparchus.stat.descriptive.rank.Max)8 Median (org.hipparchus.stat.descriptive.rank.Median)8 SpacecraftState (org.orekit.propagation.SpacecraftState)8 OrekitStepInterpolator (org.orekit.propagation.sampling.OrekitStepInterpolator)8 Mean (org.hipparchus.stat.descriptive.moment.Mean)5 RangeTroposphericDelayModifier (org.orekit.estimation.measurements.modifiers.RangeTroposphericDelayModifier)4 Min (org.hipparchus.stat.descriptive.rank.Min)3 Orbit (org.orekit.orbits.Orbit)3 DateComponents (org.orekit.time.DateComponents)3