use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class OceanTidesTest method doTestTideEffect.
private void doTestTideEffect(IERSConventions conventions, double delta1, double delta2) throws OrekitException {
Frame eme2000 = FramesFactory.getEME2000();
Frame itrf = FramesFactory.getITRF(conventions, true);
TimeScale utc = TimeScalesFactory.getUTC();
UT1Scale ut1 = TimeScalesFactory.getUT1(conventions, true);
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));
NormalizedSphericalHarmonicsProvider gravityField = GravityFieldFactory.getConstantNormalizedProvider(5, 5);
// initialization
AbsoluteDate date = new AbsoluteDate(2003, 07, 01, 13, 59, 27.816, utc);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, FastMath.toRadians(98.7), FastMath.toRadians(93.0), FastMath.toRadians(15.0 * 22.5), 0, PositionAngle.MEAN, eme2000, date, gravityField.getMu());
AbsoluteDate target = date.shiftedBy(7 * Constants.JULIAN_DAY);
ForceModel hf = new HolmesFeatherstoneAttractionModel(itrf, gravityField);
SpacecraftState noTides = propagate(orbit, target, hf);
SpacecraftState oceanTidesNoPoleTide = propagate(orbit, target, hf, new OceanTides(itrf, gravityField.getAe(), gravityField.getMu(), false, SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, 6, 6, conventions, ut1));
SpacecraftState oceanTidesPoleTide = propagate(orbit, target, hf, new OceanTides(itrf, gravityField.getAe(), gravityField.getMu(), true, SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, 6, 6, conventions, ut1));
Assert.assertEquals(delta1, Vector3D.distance(noTides.getPVCoordinates().getPosition(), oceanTidesNoPoleTide.getPVCoordinates().getPosition()), 0.01);
Assert.assertEquals(delta2, Vector3D.distance(oceanTidesNoPoleTide.getPVCoordinates().getPosition(), oceanTidesPoleTide.getPVCoordinates().getPosition()), 0.01);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class OceanTidesFieldTest method testDeltaCnmSnm.
@Test
public void testDeltaCnmSnm() throws OrekitException {
// this is an arbitrarily truncated model, limited to 4x4 and with only a few waves
List<OceanTidesWave> waves = getWaves(4, 4, 55565, 56554, 85455, 135655, 273555);
UT1Scale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
TimeScale utc = TimeScalesFactory.getUTC();
AbsoluteDate date = new AbsoluteDate(2003, 5, 6, 13, 43, 32.125, utc);
OceanTidesField tidesField = new OceanTidesField(Constants.EIGEN5C_EARTH_EQUATORIAL_RADIUS, Constants.EIGEN5C_EARTH_MU, waves, IERSConventions.IERS_2010.getNutationArguments(ut1), null);
NormalizedSphericalHarmonics harmonics = tidesField.onDate(date);
double[][] refDeltaCnm = new double[][] { { 0.0, 0.0, 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0, 0.0, 0.0 }, { -4.812565797928061E-11, -4.1748378190052583E-11, 7.013273986245356E-11, 0.0, 0.0 }, { -2.5341227608443308E-11, 9.76515813742254E-11, -1.21931214469994E-10, 1.3179722429471184E-10, 0.0 }, { -2.7496974839179478E-11, 8.419627031293907E-11, 6.56546217101275E-11, -3.375298928713117E-11, -7.588006744166988E-11 } };
double[][] refDeltaSnm = new double[][] { { 0.0, 0.0, 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0, 0.0, 0.0 }, { -1.168129177701461E-10, 5.646187590518608E-12, 1.742233297668071E-10, 0.0, 0.0 }, { -6.586546350227345E-11, -8.032186864783105E-11, -3.118910148495339E-11, 1.0566857199592183E-10, 0.0 }, { 7.665313525684617E-11, 7.37884528812169E-11, -1.3085142873419844E-10, -1.5813709543115768E-10, 1.770903634801541E-10 } };
for (int n = 0; n < refDeltaCnm.length; ++n) {
double threshold = 4.0e-17;
for (int m = 0; m <= n; ++m) {
Assert.assertEquals(refDeltaCnm[n][m], harmonics.getNormalizedCnm(n, m), threshold);
Assert.assertEquals(refDeltaSnm[n][m], harmonics.getNormalizedSnm(n, m), threshold);
}
}
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class SolidTidesFieldTest method testConventions2003.
@Test
public void testConventions2003() throws OrekitException, NoSuchFieldException, IllegalAccessException {
UT1Scale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, false);
SolidTidesField tidesField = new SolidTidesField(IERSConventions.IERS_2003.getLoveNumbers(), IERSConventions.IERS_2003.getTideFrequencyDependenceFunction(ut1), IERSConventions.IERS_2003.getPermanentTide(), IERSConventions.IERS_2003.getSolidPoleTide(ut1.getEOPHistory()), FramesFactory.getITRF(IERSConventions.IERS_2003, false), Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_MU, TideSystem.ZERO_TIDE, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon());
Field fieldReal = tidesField.getClass().getDeclaredField("love");
fieldReal.setAccessible(true);
LoveNumbers love = (LoveNumbers) fieldReal.get(tidesField);
Assert.assertEquals(0.30190, love.getReal(2, 0), 1.0e-10);
Assert.assertEquals(0.29830, love.getReal(2, 1), 1.0e-10);
Assert.assertEquals(0.30102, love.getReal(2, 2), 1.0e-10);
Assert.assertEquals(0.093, love.getReal(3, 0), 1.0e-10);
Assert.assertEquals(0.093, love.getReal(3, 1), 1.0e-10);
Assert.assertEquals(0.093, love.getReal(3, 2), 1.0e-10);
Assert.assertEquals(0.094, love.getReal(3, 3), 1.0e-10);
Assert.assertEquals(-0.00000, love.getImaginary(2, 0), 1.0e-10);
Assert.assertEquals(-0.00144, love.getImaginary(2, 1), 1.0e-10);
Assert.assertEquals(-0.00130, love.getImaginary(2, 2), 1.0e-10);
Assert.assertEquals(0.0, love.getImaginary(3, 0), 1.0e-10);
Assert.assertEquals(0.0, love.getImaginary(3, 1), 1.0e-10);
Assert.assertEquals(0.0, love.getImaginary(3, 2), 1.0e-10);
Assert.assertEquals(0.0, love.getImaginary(3, 3), 1.0e-10);
Assert.assertEquals(-0.00089, love.getPlus(2, 0), 1.0e-10);
Assert.assertEquals(-0.00080, love.getPlus(2, 1), 1.0e-10);
Assert.assertEquals(-0.00057, love.getPlus(2, 2), 1.0e-10);
Assert.assertEquals(0.0, love.getPlus(3, 0), 1.0e-10);
Assert.assertEquals(0.0, love.getPlus(3, 1), 1.0e-10);
Assert.assertEquals(0.0, love.getPlus(3, 2), 1.0e-10);
Assert.assertEquals(0.0, love.getPlus(3, 3), 1.0e-10);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class SolidTidesTest method testDefaultInterpolation.
@Test
public void testDefaultInterpolation() throws OrekitException {
IERSConventions conventions = IERSConventions.IERS_2010;
Frame eme2000 = FramesFactory.getEME2000();
Frame itrf = FramesFactory.getITRF(conventions, true);
TimeScale utc = TimeScalesFactory.getUTC();
UT1Scale ut1 = TimeScalesFactory.getUT1(conventions, true);
NormalizedSphericalHarmonicsProvider gravityField = GravityFieldFactory.getConstantNormalizedProvider(5, 5);
// initialization
AbsoluteDate date = new AbsoluteDate(1970, 07, 01, 13, 59, 27.816, utc);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, FastMath.toRadians(98.7), FastMath.toRadians(93.0), FastMath.toRadians(15.0 * 22.5), 0, PositionAngle.MEAN, eme2000, date, gravityField.getMu());
AbsoluteDate target = date.shiftedBy(7 * Constants.JULIAN_DAY);
ForceModel hf = new HolmesFeatherstoneAttractionModel(itrf, gravityField);
SpacecraftState raw = propagate(orbit, target, hf, new SolidTides(itrf, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(), true, Double.NaN, -1, conventions, ut1, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon()));
SpacecraftState interpolated = propagate(orbit, target, hf, new SolidTides(itrf, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(), conventions, ut1, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon()));
Assert.assertEquals(0.0, Vector3D.distance(raw.getPVCoordinates().getPosition(), interpolated.getPVCoordinates().getPosition()), // threshold would be 1.2e-3 for 30 days propagation
2.0e-5);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class SolidTidesTest method doTestTideEffect.
private void doTestTideEffect(Orbit orbit, IERSConventions conventions, double delta1, double delta2) throws OrekitException {
Frame itrf = FramesFactory.getITRF(conventions, true);
UT1Scale ut1 = TimeScalesFactory.getUT1(conventions, true);
NormalizedSphericalHarmonicsProvider gravityField = GravityFieldFactory.getConstantNormalizedProvider(5, 5);
// initialization
AbsoluteDate target = orbit.getDate().shiftedBy(7 * Constants.JULIAN_DAY);
ForceModel hf = new HolmesFeatherstoneAttractionModel(itrf, gravityField);
SpacecraftState noTides = propagate(orbit, target, hf);
SpacecraftState solidTidesNoPoleTide = propagate(orbit, target, hf, new SolidTides(itrf, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(), false, SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, conventions, ut1, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon()));
SpacecraftState solidTidesPoleTide = propagate(orbit, target, hf, new SolidTides(itrf, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(), true, SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, conventions, ut1, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon()));
Assert.assertEquals(delta1, Vector3D.distance(noTides.getPVCoordinates().getPosition(), solidTidesNoPoleTide.getPVCoordinates().getPosition()), 0.01);
Assert.assertEquals(delta2, Vector3D.distance(solidTidesNoPoleTide.getPVCoordinates().getPosition(), solidTidesPoleTide.getPVCoordinates().getPosition()), 0.01);
}
Aggregations