use of org.hipparchus.analysis.differentiation.DSFactory in project Orekit by CS-SI.
the class IERSConventionsTest method testGMST2000vs2006.
@Test
public void testGMST2000vs2006() throws OrekitException {
final UT1Scale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
final TimeScalarFunction gmst00 = IERSConventions.IERS_2003.getGMSTFunction(ut1);
final TimeScalarFunction gmst06 = IERSConventions.IERS_2010.getGMSTFunction(ut1);
final DSFactory factory = new DSFactory(1, 1);
final FieldAbsoluteDate<DerivativeStructure> ds2000 = FieldAbsoluteDate.getJ2000Epoch(factory.getDerivativeField());
for (double dt = 0; dt < 10 * Constants.JULIAN_YEAR; dt += 10 * Constants.JULIAN_DAY) {
FieldAbsoluteDate<DerivativeStructure> date = ds2000.shiftedBy(factory.variable(0, dt));
DerivativeStructure delta = gmst06.value(date).subtract(gmst00.value(date));
// GMST2006 and GMST2000 are similar to about 0.15 milli-arcseconds between 2000 and 2010
Assert.assertEquals(0.0, MathUtils.normalizeAngle(delta.getValue(), 0.0), 7e-10);
Assert.assertEquals(0.0, delta.getPartialDerivative(1), 3.0e-18);
}
}
Aggregations