Search in sources :

Example 11 with FundamentalNutationArguments

use of org.orekit.data.FundamentalNutationArguments in project Orekit by CS-SI.

the class OceanLoadingCoefficientsBLQFactoryTest method testOrganization.

@Test
public void testOrganization() throws OrekitException {
    TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
    FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
    final BodiesElements el = fna.evaluateAll(AbsoluteDate.J2000_EPOCH);
    OceanLoadingCoefficientsBLQFactory factory = new OceanLoadingCoefficientsBLQFactory("^hardisp\\.blq$");
    List<String> sites = factory.getSites();
    for (String site : sites) {
        OceanLoadingCoefficients coeffs = factory.getCoefficients(site);
        Assert.assertEquals(3, coeffs.getNbSpecies());
        Assert.assertEquals(3, coeffs.getNbTides(0));
        Assert.assertEquals(4, coeffs.getNbTides(1));
        Assert.assertEquals(4, coeffs.getNbTides(2));
        for (int i = 0; i < coeffs.getNbSpecies(); ++i) {
            for (int j = 1; j < coeffs.getNbTides(i); ++j) {
                // for each species, tides are sorted in increasing rate order
                Assert.assertTrue(coeffs.getTide(i, j - 1).getRate(el) < coeffs.getTide(i, j).getRate(el));
            }
        }
    }
}
Also used : FundamentalNutationArguments(org.orekit.data.FundamentalNutationArguments) BodiesElements(org.orekit.data.BodiesElements) TimeScale(org.orekit.time.TimeScale) Test(org.junit.Test)

Example 12 with FundamentalNutationArguments

use of org.orekit.data.FundamentalNutationArguments in project Orekit by CS-SI.

the class OceanLoadingTest method testSemiDiurnal.

@Test
public void testSemiDiurnal() throws OrekitException {
    TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
    FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
    BodiesElements elements = fna.evaluateAll(new AbsoluteDate(2009, 6, 25, 0, 0, 0.0, ut1));
    for (Tide tide : getTides()) {
        if (tide.getDoodsonMultipliers()[0] == 2) {
            double f = tide.getRate(elements) * Constants.JULIAN_DAY / (2 * FastMath.PI);
            Assert.assertTrue(f > 1.5);
            Assert.assertTrue(f <= 2.5);
        }
    }
}
Also used : FundamentalNutationArguments(org.orekit.data.FundamentalNutationArguments) BodiesElements(org.orekit.data.BodiesElements) TimeScale(org.orekit.time.TimeScale) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 13 with FundamentalNutationArguments

use of org.orekit.data.FundamentalNutationArguments in project Orekit by CS-SI.

the class OceanLoadingTest method testTidesRatesPastInversion.

@Test
public void testTidesRatesPastInversion() throws OrekitException {
    // on -122502-11-09, the rates for semidiurnal tides 245556 and 245635 cross over
    final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
    final FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
    final Tide tide1 = new Tide(245556);
    final Tide tide2 = new Tide(245635);
    final AbsoluteDate t0530 = new AbsoluteDate(-122502, 11, 9, 5, 30, 0.0, TimeScalesFactory.getTAI());
    final BodiesElements el0530 = fna.evaluateAll(t0530);
    Assert.assertTrue(tide1.getRate(el0530) < tide2.getRate(el0530));
    final AbsoluteDate t0430 = t0530.shiftedBy(-3600.0);
    final BodiesElements el0430 = fna.evaluateAll(t0430);
    Assert.assertTrue(tide1.getRate(el0430) > tide2.getRate(el0430));
}
Also used : FundamentalNutationArguments(org.orekit.data.FundamentalNutationArguments) BodiesElements(org.orekit.data.BodiesElements) TimeScale(org.orekit.time.TimeScale) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 14 with FundamentalNutationArguments

use of org.orekit.data.FundamentalNutationArguments in project Orekit by CS-SI.

the class OceanLoadingTest method testLongPeriod.

@Test
public void testLongPeriod() throws OrekitException {
    TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
    FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
    BodiesElements elements = fna.evaluateAll(new AbsoluteDate(2009, 6, 25, 0, 0, 0.0, ut1));
    for (Tide tide : getTides()) {
        if (tide.getDoodsonMultipliers()[0] == 0) {
            double f = tide.getRate(elements) * Constants.JULIAN_DAY / (2 * FastMath.PI);
            Assert.assertTrue(f > 0.0);
            Assert.assertTrue(f <= 0.5);
        }
    }
}
Also used : FundamentalNutationArguments(org.orekit.data.FundamentalNutationArguments) BodiesElements(org.orekit.data.BodiesElements) TimeScale(org.orekit.time.TimeScale) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 15 with FundamentalNutationArguments

use of org.orekit.data.FundamentalNutationArguments in project Orekit by CS-SI.

the class OceanLoadingTest method testDiurnal.

@Test
public void testDiurnal() throws OrekitException {
    TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
    FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
    BodiesElements elements = fna.evaluateAll(new AbsoluteDate(2009, 6, 25, 0, 0, 0.0, ut1));
    for (Tide tide : getTides()) {
        if (tide.getDoodsonMultipliers()[0] == 1) {
            double f = tide.getRate(elements) * Constants.JULIAN_DAY / (2 * FastMath.PI);
            Assert.assertTrue(f > 0.5);
            Assert.assertTrue(f <= 1.5);
        }
    }
}
Also used : FundamentalNutationArguments(org.orekit.data.FundamentalNutationArguments) BodiesElements(org.orekit.data.BodiesElements) TimeScale(org.orekit.time.TimeScale) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Aggregations

BodiesElements (org.orekit.data.BodiesElements)15 FundamentalNutationArguments (org.orekit.data.FundamentalNutationArguments)15 TimeScale (org.orekit.time.TimeScale)14 AbsoluteDate (org.orekit.time.AbsoluteDate)13 Test (org.junit.Test)10 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)4 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)3 Method (java.lang.reflect.Method)2 Field (java.lang.reflect.Field)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 RealFieldElement (org.hipparchus.RealFieldElement)1 FastMath (org.hipparchus.util.FastMath)1 Assert (org.junit.Assert)1 Before (org.junit.Before)1 Utils (org.orekit.Utils)1 PoissonSeries (org.orekit.data.PoissonSeries)1 PoissonSeriesParser (org.orekit.data.PoissonSeriesParser)1 OrekitException (org.orekit.errors.OrekitException)1 OrekitInternalError (org.orekit.errors.OrekitInternalError)1 Frame (org.orekit.frames.Frame)1