use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class SolidTidesTest method testStateJacobianVsFiniteDifferencesPoleTide.
@Test
public void testStateJacobianVsFiniteDifferencesPoleTide() throws OrekitException {
Frame eme2000 = FramesFactory.getEME2000();
TimeScale utc = TimeScalesFactory.getUTC();
AbsoluteDate date = new AbsoluteDate(2964, 8, 12, 11, 30, 00.000, 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, Constants.EIGEN5C_EARTH_MU);
Frame itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
UT1Scale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
NormalizedSphericalHarmonicsProvider gravityField = GravityFieldFactory.getConstantNormalizedProvider(5, 5);
ForceModel forceModel = new SolidTides(itrf, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(), true, SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, IERSConventions.IERS_2010, ut1, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon());
checkStateJacobianVsFiniteDifferences(new SpacecraftState(orbit), forceModel, Propagator.DEFAULT_LAW, 10.0, 2.0e-10, false);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class SolidTidesTest method testStateJacobianVs80ImplementationPoleTide.
@Test
public void testStateJacobianVs80ImplementationPoleTide() throws OrekitException {
Frame eme2000 = FramesFactory.getEME2000();
TimeScale utc = TimeScalesFactory.getUTC();
AbsoluteDate date = new AbsoluteDate(2964, 8, 12, 11, 30, 00.000, 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, Constants.EIGEN5C_EARTH_MU);
Frame itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
UT1Scale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
NormalizedSphericalHarmonicsProvider gravityField = GravityFieldFactory.getConstantNormalizedProvider(5, 5);
ForceModel forceModel = new SolidTides(itrf, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(), true, SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, IERSConventions.IERS_2010, ut1, CelestialBodyFactory.getSun(), CelestialBodyFactory.getMoon());
checkStateJacobianVs80Implementation(new SpacecraftState(orbit), forceModel, new LofOffset(orbit.getFrame(), LOFType.VVLH), 2.0e-15, false);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class ITRFEquinoxProviderTest method testSofaCookbook.
@Test
public void testSofaCookbook() throws OrekitException {
// SOFA cookbook test case:
// date 2007 April 05, 12h00m00s.0 UTC
// xp +0′′.0349282
// yp +0′′.4833163
// UT1 − UTC -0s.072073685
// dψ 1980 -0′′.0550655
// dε 1980 -0′′.0063580
// dX 2000 +0′′.0001725
// dY 2000 -0′′.0002650
// dX 2006 +0′′.0001750
// dY 2006 -0′′.0002259
Utils.setLoaders(IERSConventions.IERS_1996, Utils.buildEOPList(IERSConventions.IERS_1996, ITRFVersion.ITRF_2008, new double[][] { { 54192, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54193, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54194, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54195, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54196, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54197, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54198, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN }, { 54199, -0.072073685, 1.4020, 0.0349282, 0.4833163, -0.0550666, -0.0063580, Double.NaN, Double.NaN } }));
EOPHistory eopHistory = FramesFactory.getEOPHistory(IERSConventions.IERS_1996, true);
TimeScale utc = TimeScalesFactory.getUTC();
TTScale tt = TimeScalesFactory.getTT();
UT1Scale ut1 = TimeScalesFactory.getUT1(eopHistory);
Frame gcrf = FramesFactory.getGCRF();
Frame itrf = FramesFactory.getITRFEquinox(IERSConventions.IERS_1996, true);
Frame gtod = itrf.getParent();
Frame tod = gtod.getParent();
// time scales checks
AbsoluteDate date = new AbsoluteDate(new DateComponents(2007, 4, 5), TimeComponents.H12, utc);
Assert.assertEquals(0.50075444444444, date.getComponents(tt).getTime().getSecondsInUTCDay() / Constants.JULIAN_DAY, 5.0e-15);
Assert.assertEquals(0.499999165813831, date.getComponents(ut1).getTime().getSecondsInUTCDay() / Constants.JULIAN_DAY, 1.0e-15);
// sidereal time check
double gast = IERSConventions.IERS_1996.getGASTFunction(ut1, eopHistory).value(date);
Assert.assertEquals(13.412402380740 * 3600 * 1.0e6, radToMicroAS(MathUtils.normalizeAngle(gast, 0)), 25);
// nutation/precession/bias matrix check
Rotation refNPB = new Rotation(new double[][] { { +0.999998403176203, -0.001639032970562, -0.000712190961847 }, { +0.001639000942243, +0.999998655799521, -0.000045552846624 }, { +0.000712264667137, +0.000044385492226, +0.999999745354454 } }, 1.0e-13);
Rotation npb = gcrf.getTransformTo(tod, date).getRotation();
Assert.assertEquals(0.0, radToMicroAS(Rotation.distance(refNPB, npb)), 27.0);
// celestial to terrestrial frames matrix, without polar motion
Rotation refWithoutPolarMotion = new Rotation(new double[][] { { +0.973104317592265, +0.230363826166883, -0.000703332813776 }, { -0.230363798723533, +0.973104570754697, +0.000120888299841 }, { +0.000712264667137, +0.000044385492226, +0.999999745354454 } }, 1.0e-13);
Rotation withoutPM = gcrf.getTransformTo(gtod, date).getRotation();
Assert.assertEquals(0.0, radToMicroAS(Rotation.distance(refWithoutPolarMotion, withoutPM)), 9);
// celestial to terrestrial frames matrix, with polar motion
Rotation refWithPolarMotion = new Rotation(new double[][] { { +0.973104317712772, +0.230363826174782, -0.000703163477127 }, { -0.230363800391868, +0.973104570648022, +0.000118545116892 }, { +0.000711560100206, +0.000046626645796, +0.999999745754058 } }, 1.0e-13);
Rotation withPM = gcrf.getTransformTo(itrf, date).getRotation();
Assert.assertEquals(0.0, radToMicroAS(Rotation.distance(refWithPolarMotion, withPM)), 10);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class ITRFProviderTest method testSofaCookbook.
@Test
public void testSofaCookbook() throws OrekitException {
// SOFA cookbook test case:
// date 2007 April 05, 12h00m00s.0 UTC
// xp +0′′.0349282
// yp +0′′.4833163
// UT1 − UTC -0s.072073685
// dψ 1980 -0′′.0550655
// dε 1980 -0′′.0063580
// dX 2000 +0′′.0001725
// dY 2000 -0′′.0002650
// dX 2006 +0′′.0001750
// dY 2006 -0′′.0002259
Utils.setLoaders(IERSConventions.IERS_2010, Utils.buildEOPList(IERSConventions.IERS_2010, ITRFVersion.ITRF_2008, new double[][] { { 54192, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54193, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54194, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54195, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54196, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54197, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54198, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 }, { 54199, -0.072073685, 1.4020, 0.0349282, 0.4833163, -Double.NaN, Double.NaN, 0.0001750, -0.0002259 } }));
EOPHistory eopHistory = FramesFactory.getEOPHistory(IERSConventions.IERS_2010, true);
TimeScale utc = TimeScalesFactory.getUTC();
TTScale tt = TimeScalesFactory.getTT();
UT1Scale ut1 = TimeScalesFactory.getUT1(eopHistory);
Frame gcrf = FramesFactory.getGCRF();
Frame itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
Frame gtod = itrf.getParent();
Frame tod = gtod.getParent();
// time scales checks
AbsoluteDate date = new AbsoluteDate(new DateComponents(2007, 4, 5), TimeComponents.H12, utc);
Assert.assertEquals(0.50075444444444, date.getComponents(tt).getTime().getSecondsInUTCDay() / Constants.JULIAN_DAY, 5.0e-15);
Assert.assertEquals(0.499999165813831, date.getComponents(ut1).getTime().getSecondsInUTCDay() / Constants.JULIAN_DAY, 1.0e-15);
// sidereal time check
double era = IERSConventions.IERS_2010.getEarthOrientationAngleFunction(ut1).value(date);
Assert.assertEquals(13.318492966097 * 3600 * 1.0e6, radToMicroAS(MathUtils.normalizeAngle(era, 0)), 0.0022);
// nutation/precession/bias matrix check
Rotation refNPB = new Rotation(new double[][] { { +0.999999746339445, -0.000000005138721, -0.000712264730182 }, { -0.000000026475329, +0.999999999014975, -0.000044385242666 }, { +0.000712264729708, +0.000044385250265, +0.999999745354420 } }, 1.0e-13);
Rotation npb = gcrf.getTransformTo(tod, date).getRotation();
Assert.assertEquals(0.0, radToMicroAS(Rotation.distance(refNPB, npb)), 0.31);
// celestial to terrestrial frames matrix, without polar motion
Rotation refWithoutPolarMotion = new Rotation(new double[][] { { +0.973104317573104, +0.230363826247808, -0.000703332818915 }, { -0.230363798804281, +0.973104570735550, +0.000120888549767 }, { +0.000712264729708, +0.000044385250265, +0.999999745354420 } }, 1.0e-13);
Rotation withoutPM = gcrf.getTransformTo(gtod, date).getRotation();
Assert.assertEquals(0.0, radToMicroAS(Rotation.distance(refWithoutPolarMotion, withoutPM)), 0.31);
// celestial to terrestrial frames matrix, with polar motion
Rotation refWithPolarMotion = new Rotation(new double[][] { { +0.973104317697512, +0.230363826239227, -0.000703163482268 }, { -0.230363800456136, +0.973104570632777, +0.000118545366806 }, { +0.000711560162777, +0.000046626403835, +0.999999745754024 } }, 1.0e-13);
Rotation withPM = gcrf.getTransformTo(itrf, date).getRotation();
Assert.assertEquals(0.0, radToMicroAS(Rotation.distance(refWithPolarMotion, withPM)), 0.31);
}
use of org.orekit.time.UT1Scale in project Orekit by CS-SI.
the class IERSConventionsTest method testGMSTRate2003.
@Test
public void testGMSTRate2003() throws OrekitException {
final UT1Scale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2003, true);
checkGMSTRate(IERSConventions.IERS_2003.getGMSTFunction(ut1), IERSConventions.IERS_2003.getGMSTRateFunction(ut1), AbsoluteDate.J2000_EPOCH.shiftedBy(-0.4 * Constants.JULIAN_DAY), 0.8 * Constants.JULIAN_DAY, 600.0, 10.0, 8.0e-13);
}
Aggregations