use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class SolidTidesTest method testStateJacobianVsFiniteDifferencesNoPoleTide.
@Test
public void testStateJacobianVsFiniteDifferencesNoPoleTide() 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(), false, 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.TimeScale in project Orekit by CS-SI.
the class SolidTidesTest method testTideEffect2010AfterModelChange.
@Test
public void testTideEffect2010AfterModelChange() 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);
doTestTideEffect(orbit, IERSConventions.IERS_2010, 24.02815, 30.92816);
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class TransformTest method testFieldBackwardGeneration.
@Test
public void testFieldBackwardGeneration() throws Exception {
Utils.setDataRoot("regular-data");
TimeScale utc = TimeScalesFactory.getUTC();
Frame tod = FramesFactory.getTOD(false);
Field<Decimal64> field = Decimal64Field.getInstance();
FieldTransform<Decimal64> t1 = tod.getParent().getTransformTo(tod, new FieldAbsoluteDate<>(field, new AbsoluteDate(2000, 8, 16, 21, 0, 0, utc)));
FieldTransform<Decimal64> t2 = tod.getParent().getTransformTo(tod, new FieldAbsoluteDate<>(field, new AbsoluteDate(2000, 8, 16, 9, 0, 0, utc)));
Assert.assertEquals(-43200.0, t2.getDate().durationFrom(t1.getDate()), 1.0e-15);
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class OceanLoadingTest method doTestOnsala.
private void doTestOnsala(boolean patchEarthRotation, double tolerance) throws OrekitException {
OceanLoadingCoefficientsBLQFactory factory = new OceanLoadingCoefficientsBLQFactory("^hardisp\\.blq$");
OceanLoadingCoefficients coefficients = factory.getCoefficients("Onsala");
Vector3D refPoint = earth.transform(coefficients.getSiteLocation());
OceanLoading loading = new OceanLoading(earth, coefficients);
TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
if (patchEarthRotation) {
TideTest.patchEarthRotationModel(fna, ut1);
}
AbsoluteDate t0 = new AbsoluteDate("2009-06-25T01:10:45", ut1);
double[][] ref = new double[][] { { 0.003094, -0.001538, -0.000895 }, { 0.001812, -0.000950, -0.000193 }, { 0.000218, -0.000248, 0.000421 }, { -0.001104, 0.000404, 0.000741 }, { -0.001668, 0.000863, 0.000646 }, { -0.001209, 0.001042, 0.000137 }, { 0.000235, 0.000926, -0.000667 }, { 0.002337, 0.000580, -0.001555 }, { 0.004554, 0.000125, -0.002278 }, { 0.006271, -0.000291, -0.002615 }, { 0.006955, -0.000537, -0.002430 }, { 0.006299, -0.000526, -0.001706 }, { 0.004305, -0.000244, -0.000559 }, { 0.001294, 0.000245, 0.000793 }, { -0.002163, 0.000819, 0.002075 }, { -0.005375, 0.001326, 0.003024 }, { -0.007695, 0.001622, 0.003448 }, { -0.008669, 0.001610, 0.003272 }, { -0.008143, 0.001262, 0.002557 }, { -0.006290, 0.000633, 0.001477 }, { -0.003566, -0.000155, 0.000282 }, { -0.000593, -0.000941, -0.000766 }, { 0.001992, -0.001561, -0.001457 }, { 0.003689, -0.001889, -0.001680 } };
for (int i = 0; i < ref.length; ++i) {
BodiesElements elements = fna.evaluateAll(t0.shiftedBy(i * 3600.0));
final Vector3D d = loading.displacement(elements, earth.getBodyFrame(), refPoint);
Assert.assertEquals(ref[i][0], Vector3D.dotProduct(d, coefficients.getSiteLocation().getZenith()), tolerance);
Assert.assertEquals(ref[i][1], Vector3D.dotProduct(d, coefficients.getSiteLocation().getSouth()), tolerance);
Assert.assertEquals(ref[i][2], Vector3D.dotProduct(d, coefficients.getSiteLocation().getWest()), tolerance);
}
}
use of org.orekit.time.TimeScale in project Orekit by CS-SI.
the class OceanLoadingTest method testTidesRatesFutureInversion.
@Test
public void testTidesRatesFutureInversion() throws OrekitException {
// on 56824-11-02, the rates for semidiurnal tides 274554 (R₂) and 274556 cross over
final TimeScale ut1 = TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true);
final FundamentalNutationArguments fna = IERSConventions.IERS_2010.getNutationArguments(ut1);
final Tide tide1 = new Tide(274554);
final Tide tide2 = new Tide(274556);
final AbsoluteDate t1700 = new AbsoluteDate(56824, 11, 2, 17, 0, 0.0, TimeScalesFactory.getTAI());
final BodiesElements el1700 = fna.evaluateAll(t1700);
Assert.assertTrue(tide1.getRate(el1700) < tide2.getRate(el1700));
final AbsoluteDate t1800 = t1700.shiftedBy(3600.0);
final BodiesElements el1800 = fna.evaluateAll(t1800);
Assert.assertTrue(tide1.getRate(el1800) > tide2.getRate(el1800));
}
Aggregations