use of org.orekit.frames.EOPHistory in project Orekit by CS-SI.
the class EstimationTestUtils method eccentricContext.
public static Context eccentricContext(final String dataRoot) throws OrekitException {
Utils.setDataRoot(dataRoot);
Context context = new Context();
context.conventions = IERSConventions.IERS_2010;
context.earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(context.conventions, true));
context.sun = CelestialBodyFactory.getSun();
context.moon = CelestialBodyFactory.getMoon();
context.radiationSensitive = new IsotropicRadiationClassicalConvention(2.0, 0.2, 0.8);
context.dragSensitive = new IsotropicDrag(2.0, 1.2);
final EOPHistory eopHistory = FramesFactory.getEOPHistory(context.conventions, true);
context.utc = TimeScalesFactory.getUTC();
context.ut1 = TimeScalesFactory.getUT1(eopHistory);
context.displacements = new StationDisplacement[] { new TidalDisplacement(Constants.EIGEN5C_EARTH_EQUATORIAL_RADIUS, Constants.JPL_SSD_SUN_EARTH_PLUS_MOON_MASS_RATIO, Constants.JPL_SSD_EARTH_MOON_MASS_RATIO, context.sun, context.moon, context.conventions, false) };
GravityFieldFactory.addPotentialCoefficientsReader(new GRGSFormatReader("grim4s4_gr", 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));
context.gravity = GravityFieldFactory.getNormalizedProvider(20, 20);
context.initialOrbit = new KeplerianOrbit(15000000.0, 0.125, 1.25, 0.250, 1.375, 0.0625, PositionAngle.TRUE, FramesFactory.getEME2000(), new AbsoluteDate(2000, 2, 24, 11, 35, 47.0, context.utc), context.gravity.getMu());
context.stations = // context.createStation(-18.59146, -173.98363, 76.0, "Leimatu`a"),
Arrays.asList(context.createStation(-53.05388, -75.01551, 1750.0, "Isla Desolación"), context.createStation(62.29639, -7.01250, 880.0, "Slættaratindur"));
// Turn-around range stations
// Map entry = master station
// Map value = slave station associated
context.TARstations = new HashMap<GroundStation, GroundStation>();
context.TARstations.put(context.createStation(-53.05388, -75.01551, 1750.0, "Isla Desolación"), context.createStation(-54.815833, -68.317778, 6.0, "Ushuaïa"));
context.TARstations.put(context.createStation(62.29639, -7.01250, 880.0, "Slættaratindur"), context.createStation(61.405833, -6.705278, 470.0, "Sumba"));
return context;
}
use of org.orekit.frames.EOPHistory in project Orekit by CS-SI.
the class IERSConventionsTest method testOceanPoleTide1996FieldConsistency.
@Test
public void testOceanPoleTide1996FieldConsistency() throws OrekitException {
EOPHistory eopHistory = FramesFactory.getEOPHistory(IERSConventions.IERS_1996, false);
checkVectorFunctionConsistency(IERSConventions.IERS_1996.getOceanPoleTide(eopHistory), 2, AbsoluteDate.J2000_EPOCH.shiftedBy(-0.4 * Constants.JULIAN_DAY), 0.8 * Constants.JULIAN_DAY, 600.0, 10.0, Double.MIN_VALUE, Double.MIN_VALUE);
}
use of org.orekit.frames.EOPHistory in project Orekit by CS-SI.
the class IERSConventionsTest method testTidalCorrection1996.
@Test
public void testTidalCorrection1996() throws OrekitException {
// the reference value has been computed using interp_old.f from
// ftp://hpiers.obspm.fr/iers/models/ with the following driver program:
//
// PROGRAM OR_TEST
// IMPLICIT NONE
// INTEGER J, N
// PARAMETER (N = 4)
// INTEGER MJD(N)
// DOUBLE PRECISION TTTAI, TAIUTC
// PARAMETER (TAIUTC = 32.000D0)
// PARAMETER (TTTAI = 32.184D0)
// DOUBLE PRECISION RJD(N), X(N), Y(N), T(N), H(5)
// DOUBLE PRECISION RJDINT, XINT, YINT, TINT, CORX, CORY, CORT
// DATA(MJD(J), T(J), X(J), Y(J),
// & J=1,4)/
// & 52653, -0.2979055D0, -0.120344D0, 0.217095D0,
// & 52654, -0.2984238D0, -0.121680D0, 0.219400D0,
// & 52655, -0.2987682D0, -0.122915D0, 0.221760D0,
// & 52656, -0.2989957D0, -0.124248D0, 0.224294D0/
// C
// DATA(H(J),J=1,5)/0.0D0, 3600.0D0, 7200.0D0, 43200.0D0, 86400.0D0/
// C
// DO 10 J = 1, N
// RJD(J) = MJD(J) + (TTTAI + TAIUTC) / 86400.0D0
// 10 CONTINUE
// C
// DO 20 J = 1, 5
// RJDINT = RJD(2) + H(J) / 86400.0D0
// CALL INTERP(RJD,X,Y,T,N,RJDINT,XINT,YINT,TINT)
// WRITE(6, 30) H(J), TINT, XINT, YINT
// 20 CONTINUE
// 30 FORMAT(F7.1,3(1X, F20.17))
// C
// END PROGRAM
//
// the output of this test reads:
// 0.0 -0.29839889612705234 -0.12191552977388567 0.21921143351558756
// 3600.0 -0.29841696994736727 -0.12208276003864491 0.21925416583607277
// 7200.0 -0.29843402412052122 -0.12218102086455683 0.21930263880545320
// 43200.0 -0.29866785146390035 -0.12250027826538630 0.22103779809979979
// 86400.0 -0.29874248853173840 -0.12308592577174847 0.22161565557764881
Utils.setLoaders(IERSConventions.IERS_1996, Utils.buildEOPList(IERSConventions.IERS_1996, ITRFVersion.ITRF_2008, new double[][] { { 52653, -0.2979055, 0.0005744, -0.120344, 0.217095, 0.0, 0.0, 0.0, 0.0 }, { 52654, -0.2984238, 0.0004224, -0.121680, 0.219400, 0.0, 0.0, 0.0, 0.0 }, { 52655, -0.2987682, 0.0002878, -0.122915, 0.221760, 0.0, 0.0, 0.0, 0.0 }, { 52656, -0.2989957, 0.0001778, -0.124248, 0.224294, 0.0, 0.0, 0.0, 0.0 } }));
EOPHistory eopHistory = FramesFactory.getEOPHistory(IERSConventions.IERS_1996, false);
final AbsoluteDate t0 = new AbsoluteDate(new DateComponents(DateComponents.MODIFIED_JULIAN_EPOCH, 52654), TimeScalesFactory.getUTC());
for (double[] row : new double[][] { { 0.0, -0.29839889612705234, -0.12191552977388567, 0.21921143351558756 }, { 3600.0, -0.29841696994736727, -0.12208276003864491, 0.21925416583607277 }, { 7200.0, -0.29843402412052122, -0.12218102086455683, 0.21930263880545320 }, { 43200.0, -0.29866785146390035, -0.12250027826538630, 0.22103779809979979 }, { 86400.0, -0.29874248853173840, -0.12308592577174847, 0.22161565557764881 } }) {
AbsoluteDate date = t0.shiftedBy(row[0]);
Assert.assertEquals(row[1], eopHistory.getUT1MinusUTC(date), 8.8e-11);
Assert.assertEquals(row[2] * Constants.ARC_SECONDS_TO_RADIANS, eopHistory.getPoleCorrection(date).getXp(), 3.2e-14);
Assert.assertEquals(row[3] * Constants.ARC_SECONDS_TO_RADIANS, eopHistory.getPoleCorrection(date).getYp(), 8.2e-15);
}
}
use of org.orekit.frames.EOPHistory in project Orekit by CS-SI.
the class IERSConventionsTest method testSolidPoleTide2010FieldConsistency.
@Test
public void testSolidPoleTide2010FieldConsistency() throws OrekitException {
EOPHistory eopHistory = FramesFactory.getEOPHistory(IERSConventions.IERS_2010, false);
checkVectorFunctionConsistency(IERSConventions.IERS_2010.getSolidPoleTide(eopHistory), 2, AbsoluteDate.J2000_EPOCH.shiftedBy(-0.4 * Constants.JULIAN_DAY), 0.8 * Constants.JULIAN_DAY, 600.0, 10.0, 2.0e-25, 2.0e-26);
}
use of org.orekit.frames.EOPHistory in project Orekit by CS-SI.
the class IERSConventionsTest method testTidalCorrection2003.
@Test
public void testTidalCorrection2003() throws OrekitException {
// the reference value has been computed using the September 2007 version
// of interp.f from ftp://hpiers.obspm.fr/iers/models/ adding input/output
// parameters for LOD (which was already computed in the underlying routines),
// with the following driver program:
//
// PROGRAM OR_TEST
// IMPLICIT NONE
// INTEGER J, N
// PARAMETER (N = 4)
// INTEGER MJD(N)
// DOUBLE PRECISION TTTAI, TAIUTC
// PARAMETER (TAIUTC = 32.000D0)
// PARAMETER (TTTAI = 32.184D0)
// DOUBLE PRECISION RJD(N), UT1(N), LOD(N), X(N), Y(N), H(5)
// DOUBLE PRECISION RJD_INT, UT1_INT, LOD_INT, X_INT, Y_INT
// DATA(MJD(J), UT1(J), LOD(J), X(J), Y(J),
// & J=1,4)/
// & 52653, -0.2979055D0, 0.0005744D0, -0.120344D0, 0.217095D0,
// & 52654, -0.2984238D0, 0.0004224D0, -0.121680D0, 0.219400D0,
// & 52655, -0.2987682D0, 0.0002878D0, -0.122915D0, 0.221760D0,
// & 52656, -0.2989957D0, 0.0001778D0, -0.124248D0, 0.224294D0/
// C
// DATA(H(J),J=1,5)/0.0D0, 3600.0D0, 7200.0D0, 43200.0D0, 86400.0D0/
// C
// DO 10 J = 1, N
// RJD(J) = MJD(J) + (TTTAI + TAIUTC) / 86400.0D0
// 10 CONTINUE
// C
// DO 20 J = 1, 5
// RJD_INT = RJD(2) + H(J) / 86400.0D0
// CALL INTERP(RJD,X,Y,UT1,LOD,N,
// & RJD_INT,X_INT,Y_INT,UT1_INT,LOD_INT)
// WRITE(6, 30) H(J),UT1_INT,LOD_INT,X_INT,Y_INT
// 20 CONTINUE
// 30 FORMAT(F7.1,4(1X, F20.17))
// C
// END PROGRAM
//
// the output of this test reads:
// 0.0 -0.29840026968370659 0.00045312852893139 -0.12196223480123573 0.21922730818562719
// 3600.0 -0.29841834564816189 0.00041710864863793 -0.12213345007640604 0.21927433626001305
// 7200.0 -0.29843503870494986 0.00039207574457087 -0.12222881007999241 0.21932415788122142
// 43200.0 -0.29866930257052676 0.00042895046506082 -0.12247697694276605 0.22105450666130921
// 86400.0 -0.29874235341010519 0.00035460263868306 -0.12312252389660779 0.22161364352515728
Utils.setLoaders(IERSConventions.IERS_2003, Utils.buildEOPList(IERSConventions.IERS_2003, ITRFVersion.ITRF_2008, new double[][] { { 52653, -0.2979055, 0.0005744, -0.120344, 0.217095, 0.0, 0.0, 0.0, 0.0 }, { 52654, -0.2984238, 0.0004224, -0.121680, 0.219400, 0.0, 0.0, 0.0, 0.0 }, { 52655, -0.2987682, 0.0002878, -0.122915, 0.221760, 0.0, 0.0, 0.0, 0.0 }, { 52656, -0.2989957, 0.0001778, -0.124248, 0.224294, 0.0, 0.0, 0.0, 0.0 } }));
EOPHistory eopHistory = FramesFactory.getEOPHistory(IERSConventions.IERS_2003, false);
final AbsoluteDate t0 = new AbsoluteDate(new DateComponents(DateComponents.MODIFIED_JULIAN_EPOCH, 52654), TimeScalesFactory.getUTC());
for (double[] row : new double[][] { { 0.0, -0.29840026968370659, 0.00045312852893139, -0.12196223480123573, 0.21922730818562719 }, { 3600.0, -0.29841834564816189, 0.00041710864863793, -0.12213345007640604, 0.21927433626001305 }, { 7200.0, -0.29843503870494986, 0.00039207574457087, -0.12222881007999241, 0.21932415788122142 }, { 43200.0, -0.29866930257052676, 0.00042895046506082, -0.12247697694276605, 0.22105450666130921 }, { 86400.0, -0.29874235341010519, 0.00035460263868306, -0.12312252389660779, 0.22161364352515728 } }) {
AbsoluteDate date = t0.shiftedBy(row[0]);
Assert.assertEquals(row[1], eopHistory.getUT1MinusUTC(date), 4.3e-8);
Assert.assertEquals(row[2], eopHistory.getLOD(date), 1.4e-7);
Assert.assertEquals(row[3] * Constants.ARC_SECONDS_TO_RADIANS, eopHistory.getPoleCorrection(date).getXp(), 1.6e-10);
Assert.assertEquals(row[4] * Constants.ARC_SECONDS_TO_RADIANS, eopHistory.getPoleCorrection(date).getYp(), 0.7e-10);
}
}
Aggregations