use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class IERSConventionsTest method testERA2010FieldConsistency.
@Test
public void testERA2010FieldConsistency() throws OrekitException {
final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
checkScalarFunctionConsistency(IERSConventions.IERS_2010.getEarthOrientationAngleFunction(ut1), AbsoluteDate.J2000_EPOCH.shiftedBy(-0.4 * Constants.JULIAN_DAY), 0.8 * Constants.JULIAN_DAY, 1800.0, 10.0, 2.0e-15, 8.0e-13);
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class IERSConventionsTest method testGMST82Sofa.
@Test
public void testGMST82Sofa() throws OrekitException {
// the reference value has been computed using the March 2012 version of the SOFA library
// http://www.iausofa.org/2012_0301_C.html, with the following code
//
// double utc1, utc2, ut11, ut12, gmst;
//
// // 2004-02-14:00:00:00Z, MJD = 53049, UT1-UTC = -0.4093509
// utc1 = DJM0 + 53049.0;
// utc2 = 0.0;
// iauUtcut1(utc1, utc2, -0.4093509, &ut11, &ut12);
// gmst = iauGmst82(ut11, ut12);
// printf("iaugmst82(%.20g, %.20g)\n --> %.20g\n", ut11, ut12, gmst);
//
// // 2004-02-29:00:00:00Z, MJD = 53064, UT1-UTC = -0.4175723
// utc1 = DJM0 + 53064.0;
// utc2 = 0.0;
// iauUtcut1(utc1, utc2, -0.4175723, &ut11, &ut12);
// gmst = iauGmst82(ut11, ut12);
// printf("iaugmst82(%.20g, %.20g)\n --> %.20g\n", ut11, ut12, gmst);
//
// the output of this test reads:
// iaugmst82(2453049.5, -4.7378576388888813016e-06)
// --> 2.5021977627453466653
// iaugmst82(2453064.5, -4.8330127314815448519e-06)
// --> 2.7602390405411441066
final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_1996, true);
final TimeScalarFunction gmst82 = IERSConventions.IERS_1996.getGMSTFunction(ut1);
AbsoluteDate date = new AbsoluteDate(2004, 2, 14, TimeScalesFactory.getUTC());
double gmst = MathUtils.normalizeAngle(gmst82.value(date), 0.0);
Assert.assertEquals(2.5021977627453466653, gmst, 2.0e-13);
date = new AbsoluteDate(2004, 2, 29, TimeScalesFactory.getUTC());
gmst = MathUtils.normalizeAngle(gmst82.value(date), 0.0);
Assert.assertEquals(2.7602390405411441066, gmst, 4.0e-13);
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class IERSConventionsTest method testERASofa.
@Test
public void testERASofa() throws OrekitException {
// the reference value has been computed using the March 2012 version of the SOFA library
// http://www.iausofa.org/2012_0301_C.html, with the following code
//
// double tai1, tai2, ut11, ut12, era, taiutc;
// taiutc = 32.0;
//
// // 2004-02-14:00:00:00Z, MJD = 53049, UT1-UTC = -0.4093509
// tai1 = DJM0 + 53049.0;
// tai2 = taiutc / DAYSEC;
// iauTaiut1(tai1, tai2, -0.4093509 - taiutc, &ut11, &ut12);
// era = iauEra00(ut11, ut12);
// printf("iauera00(%.20g, %.20g)\n --> %.20g\n", ut11, ut12, era);
//
// // 2004-02-29:00:00:00Z, MJD = 53064, UT1-UTC = -0.4175723
// tai1 = DJM0 + 53064.0;
// tai2 = taiutc / DAYSEC;
// iauTaiut1(tai1, tai2, -0.4175723 - taiutc, &ut11, &ut12);
// era = iauEra00(ut11, ut12);
// printf("iauera00(%.20g, %.20g)\n --> %.20g\n", ut11, ut12, era);
//
// the output of this test reads:
// iauera00(2453049.5, -4.7378576388888813016e-06)
// --> 2.5012766511308228701
// iauera00(2453064.5, -4.8330127314815448519e-06)
// --> 2.7593087452455264952
final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2003, true);
final TimeScalarFunction era00 = IERSConventions.IERS_2003.getEarthOrientationAngleFunction(ut1);
AbsoluteDate date = new AbsoluteDate(2004, 2, 14, TimeScalesFactory.getUTC());
double era = MathUtils.normalizeAngle(era00.value(date), 0.0);
Assert.assertEquals(2.5012766511308228701, era, 1.0e-15);
date = new AbsoluteDate(2004, 2, 29, TimeScalesFactory.getUTC());
era = MathUtils.normalizeAngle(era00.value(date), 0.0);
Assert.assertEquals(2.7593087452455264952, era, 1.0e-15);
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class IERSConventionsTest method testERA2003FieldConsistency.
@Test
public void testERA2003FieldConsistency() throws OrekitException {
final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2003, true);
checkScalarFunctionConsistency(IERSConventions.IERS_2003.getEarthOrientationAngleFunction(ut1), AbsoluteDate.J2000_EPOCH.shiftedBy(-0.4 * Constants.JULIAN_DAY), 0.8 * Constants.JULIAN_DAY, 1800.0, 10.0, 2.0e-15, 8.0e-13);
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class IERSConventionsTest method testGMST06Sofa.
@Test
public void testGMST06Sofa() throws OrekitException {
// the reference value has been computed using the March 2012 version of the SOFA library
// http://www.iausofa.org/2012_0301_C.html, with the following code
//
// double utc1, utc2, tai1, tai2, tt1, tt2, ut11, ut12, gmst;
//
// // 2004-02-14:00:00:00Z, MJD = 53049, UT1-UTC = -0.4093509
// utc1 = DJM0 + 53049.0;
// utc2 = 0.0;
// iauUtctai(utc1, utc2, &tai1, &tai2);
// iauTaitt(tai1, tai2, &tt1, &tt2);
// iauUtcut1(utc1, utc2, -0.4093509, &ut11, &ut12);
// gmst = iauGmst06(ut11, ut12, tt1, tt2);
// printf("iaugmst06(%.20g, %.20g, %.20g, %.20g)\n --> %.20g\n",
// ut11, ut12, tt1, tt2, gmst);
//
// // 2004-02-29:00:00:00Z, MJD = 53064, UT1-UTC = -0.4175723
// utc1 = DJM0 + 53064.0;
// utc2 = 0.0;
// iauUtctai(utc1, utc2, &tai1, &tai2);
// iauTaitt(tai1, tai2, &tt1, &tt2);
// iauUtcut1(utc1, utc2, -0.4175723, &ut11, &ut12);
// gmst = iauGmst06(ut11, ut12, tt1, tt2);
// printf("iaugmst06(%.20g, %.20g, %.20g, %.20g)\n --> %.20g\n",
// ut11, ut12, tt1, tt2, gmst);
//
// the output of this test reads:
// iaugmst06(2453049.5, -4.7378576388888813016e-06, 2453049.5, 0.00074287037037037029902)
// --> 2.5021977784096232078
// iaugmst06(2453064.5, -4.8330127314815448519e-06, 2453064.5, 0.00074287037037037029902)
// --> 2.7602390556555129741
final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
final TimeScalarFunction gmst06 = IERSConventions.IERS_2010.getGMSTFunction(ut1);
AbsoluteDate date = new AbsoluteDate(2004, 2, 14, TimeScalesFactory.getUTC());
double gmst = MathUtils.normalizeAngle(gmst06.value(date), 0.0);
Assert.assertEquals(2.5021977784096232078, gmst, 1.0e-15);
date = new AbsoluteDate(2004, 2, 29, TimeScalesFactory.getUTC());
gmst = MathUtils.normalizeAngle(gmst06.value(date), 0.0);
Assert.assertEquals(2.7602390556555129741, gmst, 3.0e-15);
}
Aggregations