Search in sources :

Example 6 with FESCHatEpsilonReader

use of org.orekit.forces.gravity.potential.FESCHatEpsilonReader in project Orekit by CS-SI.

the class OceanTidesTest method testNoGetParameter.

@Test
public void testNoGetParameter() throws OrekitException {
    AstronomicalAmplitudeReader aaReader = new AstronomicalAmplitudeReader("hf-fes2004.dat", 5, 2, 3, 1.0);
    DataProvidersManager.getInstance().feed(aaReader.getSupportedNames(), aaReader);
    Map<Integer, Double> map = aaReader.getAstronomicalAmplitudesMap();
    GravityFieldFactory.addOceanTidesReader(new FESCHatEpsilonReader("fes2004-7x7.dat", 0.01, FastMath.toRadians(1.0), OceanLoadDeformationCoefficients.IERS_2010, map));
    ForceModel fm = new OceanTides(FramesFactory.getITRF(IERSConventions.IERS_1996, false), Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_MU, 5, 5, IERSConventions.IERS_1996, TimeScalesFactory.getUT1(IERSConventions.IERS_1996, false));
    Assert.assertTrue(fm.dependsOnPositionOnly());
    Assert.assertEquals(1, fm.getParametersDrivers().length);
    try {
        fm.getParameterDriver("unknown");
        Assert.fail("an exception should have been thrown");
    } catch (OrekitException miae) {
        Assert.assertEquals(OrekitMessages.UNSUPPORTED_PARAMETER_NAME, miae.getSpecifier());
    }
}
Also used : FESCHatEpsilonReader(org.orekit.forces.gravity.potential.FESCHatEpsilonReader) ForceModel(org.orekit.forces.ForceModel) OrekitException(org.orekit.errors.OrekitException) AstronomicalAmplitudeReader(org.orekit.forces.gravity.potential.AstronomicalAmplitudeReader) Test(org.junit.Test)

Example 7 with FESCHatEpsilonReader

use of org.orekit.forces.gravity.potential.FESCHatEpsilonReader in project Orekit by CS-SI.

the class OceanTidesFieldTest method getWaves.

private List<OceanTidesWave> getWaves(int degree, int order, int... doodson) throws OrekitException {
    // load a complete model
    AstronomicalAmplitudeReader aaReader = new AstronomicalAmplitudeReader("hf-fes2004.dat", 5, 2, 3, 1.0);
    DataProvidersManager.getInstance().feed(aaReader.getSupportedNames(), aaReader);
    Map<Integer, Double> map = aaReader.getAstronomicalAmplitudesMap();
    GravityFieldFactory.addOceanTidesReader(new FESCHatEpsilonReader("fes2004-7x7.dat", 0.01, FastMath.toRadians(1.0), OceanLoadDeformationCoefficients.IERS_2010, map));
    List<OceanTidesWave> complete = GravityFieldFactory.getOceanTidesWaves(degree, order);
    double[][][] triangular = new double[degree + 1][][];
    for (int i = 0; i <= degree; ++i) {
        triangular[i] = new double[FastMath.min(i, order) + 1][4];
    }
    ;
    // filter waves
    List<OceanTidesWave> filtered = new ArrayList<OceanTidesWave>(doodson.length);
    for (final int d : doodson) {
        for (final OceanTidesWave wave : complete) {
            if (wave.getDoodson() == d) {
                filtered.add(wave);
            }
        }
    }
    return filtered;
}
Also used : FESCHatEpsilonReader(org.orekit.forces.gravity.potential.FESCHatEpsilonReader) OceanTidesWave(org.orekit.forces.gravity.potential.OceanTidesWave) ArrayList(java.util.ArrayList) AstronomicalAmplitudeReader(org.orekit.forces.gravity.potential.AstronomicalAmplitudeReader)

Aggregations

AstronomicalAmplitudeReader (org.orekit.forces.gravity.potential.AstronomicalAmplitudeReader)7 FESCHatEpsilonReader (org.orekit.forces.gravity.potential.FESCHatEpsilonReader)7 ForceModel (org.orekit.forces.ForceModel)4 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)4 AbsoluteDate (org.orekit.time.AbsoluteDate)4 Test (org.junit.Test)3 Frame (org.orekit.frames.Frame)3 OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)2 OrekitException (org.orekit.errors.OrekitException)2 GroundStation (org.orekit.estimation.measurements.GroundStation)2 IsotropicDrag (org.orekit.forces.drag.IsotropicDrag)2 GRGSFormatReader (org.orekit.forces.gravity.potential.GRGSFormatReader)2 NormalizedSphericalHarmonicsProvider (org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider)2 IsotropicRadiationClassicalConvention (org.orekit.forces.radiation.IsotropicRadiationClassicalConvention)2 Orbit (org.orekit.orbits.Orbit)2 SpacecraftState (org.orekit.propagation.SpacecraftState)2 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)2 TimeScale (org.orekit.time.TimeScale)2 UT1Scale (org.orekit.time.UT1Scale)2 ArrayList (java.util.ArrayList)1