use of org.orekit.frames.Frame in project Orekit by CS-SI.
the class SolidTidesTest method testStateJacobianVs80ImplementationNoPoleTide.
@Test
public void testStateJacobianVs80ImplementationNoPoleTide() 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());
Assert.assertTrue(forceModel.dependsOnPositionOnly());
checkStateJacobianVs80Implementation(new SpacecraftState(orbit), forceModel, new LofOffset(orbit.getFrame(), LOFType.VVLH), 2.0e-15, false);
}
use of org.orekit.frames.Frame 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.frames.Frame 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.frames.Frame in project Orekit by CS-SI.
the class CartesianOrbitTest method testNonKeplerianDerivatives.
@Test
public void testNonKeplerianDerivatives() throws OrekitException {
final AbsoluteDate date = new AbsoluteDate("2003-05-01T00:00:20.000", TimeScalesFactory.getUTC());
final Vector3D position = new Vector3D(6896874.444705, 1956581.072644, -147476.245054);
final Vector3D velocity = new Vector3D(166.816407662, -1106.783301861, -7372.745712770);
final Vector3D acceleration = new Vector3D(-7.466182457944, -2.118153357345, 0.160004048437);
final TimeStampedPVCoordinates pv = new TimeStampedPVCoordinates(date, position, velocity, acceleration);
final Frame frame = FramesFactory.getEME2000();
final double mu = Constants.EIGEN5C_EARTH_MU;
final CartesianOrbit orbit = new CartesianOrbit(pv, frame, mu);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getA()), orbit.getADot(), 4.3e-8);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getEquinoctialEx()), orbit.getEquinoctialExDot(), 2.1e-15);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getEquinoctialEy()), orbit.getEquinoctialEyDot(), 5.3e-16);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getHx()), orbit.getHxDot(), 4.4e-15);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getHy()), orbit.getHyDot(), 8.0e-16);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getLv()), orbit.getLvDot(), 1.2e-15);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getLE()), orbit.getLEDot(), 7.8e-16);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getLM()), orbit.getLMDot(), 8.8e-16);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getE()), orbit.getEDot(), 7.0e-16);
Assert.assertEquals(differentiate(pv, frame, mu, shifted -> shifted.getI()), orbit.getIDot(), 5.7e-16);
}
use of org.orekit.frames.Frame in project Orekit by CS-SI.
the class EquinoctialOrbitTest method testPositionAngleDerivatives.
@Test
public void testPositionAngleDerivatives() throws OrekitException {
final AbsoluteDate date = new AbsoluteDate("2003-05-01T00:00:20.000", TimeScalesFactory.getUTC());
final Vector3D position = new Vector3D(6896874.444705, 1956581.072644, -147476.245054);
final Vector3D velocity = new Vector3D(166.816407662, -1106.783301861, -7372.745712770);
final Vector3D acceleration = new Vector3D(-7.466182457944, -2.118153357345, 0.160004048437);
final TimeStampedPVCoordinates pv = new TimeStampedPVCoordinates(date, position, velocity, acceleration);
final Frame frame = FramesFactory.getEME2000();
final double mu = Constants.EIGEN5C_EARTH_MU;
final EquinoctialOrbit orbit = new EquinoctialOrbit(pv, frame, mu);
for (PositionAngle type : PositionAngle.values()) {
final EquinoctialOrbit rebuilt = new EquinoctialOrbit(orbit.getA(), orbit.getEquinoctialEx(), orbit.getEquinoctialEy(), orbit.getHx(), orbit.getHy(), orbit.getL(type), orbit.getADot(), orbit.getEquinoctialExDot(), orbit.getEquinoctialEyDot(), orbit.getHxDot(), orbit.getHyDot(), orbit.getLDot(type), type, orbit.getFrame(), orbit.getDate(), orbit.getMu());
Assert.assertThat(rebuilt.getA(), relativelyCloseTo(orbit.getA(), 1));
Assert.assertThat(rebuilt.getEquinoctialEx(), relativelyCloseTo(orbit.getEquinoctialEx(), 1));
Assert.assertThat(rebuilt.getEquinoctialEy(), relativelyCloseTo(orbit.getEquinoctialEy(), 1));
Assert.assertThat(rebuilt.getHx(), relativelyCloseTo(orbit.getHx(), 1));
Assert.assertThat(rebuilt.getHy(), relativelyCloseTo(orbit.getHy(), 1));
Assert.assertThat(rebuilt.getADot(), relativelyCloseTo(orbit.getADot(), 1));
Assert.assertThat(rebuilt.getEquinoctialExDot(), relativelyCloseTo(orbit.getEquinoctialExDot(), 1));
Assert.assertThat(rebuilt.getEquinoctialEyDot(), relativelyCloseTo(orbit.getEquinoctialEyDot(), 1));
Assert.assertThat(rebuilt.getHxDot(), relativelyCloseTo(orbit.getHxDot(), 1));
Assert.assertThat(rebuilt.getHyDot(), relativelyCloseTo(orbit.getHyDot(), 1));
for (PositionAngle type2 : PositionAngle.values()) {
Assert.assertThat(rebuilt.getL(type2), relativelyCloseTo(orbit.getL(type2), 1));
Assert.assertThat(rebuilt.getLDot(type2), relativelyCloseTo(orbit.getLDot(type2), 1));
}
}
}
Aggregations