Example #1
0
 /**
  * load orekit data and gravity field.
  *
  * @throws Exception on error.
  */
 @BeforeClass
 public static void setUpBefore() throws Exception {
   Utils.setDataRoot("earth:geoid:regular-data");
   GravityFieldFactory.clearPotentialCoefficientsReaders();
   GravityFieldFactory.addPotentialCoefficientsReader(new EGMFormatReader("egm96", false));
   potential = GravityFieldFactory.getConstantNormalizedProvider(maxDegree, maxOrder);
 }
 @Before
 public void setUp() throws OrekitException {
   Utils.setDataRoot("regular-data:potential/shm-format");
   GravityFieldFactory.addPotentialCoefficientsReader(
       new SHMFormatReader("^eigen_cg03c_coef$", false));
   mu = GravityFieldFactory.getUnnormalizedProvider(0, 0).getMu();
   final Vector3D position = new Vector3D(7.0e6, 1.0e6, 4.0e6);
   final Vector3D velocity = new Vector3D(-500.0, 8000.0, 1000.0);
   initDate = AbsoluteDate.J2000_EPOCH;
   final Orbit orbit =
       new EquinoctialOrbit(
           new PVCoordinates(position, velocity), FramesFactory.getEME2000(), initDate, mu);
   initialState = new SpacecraftState(orbit);
   double[][] tolerance = NumericalPropagator.tolerances(0.001, orbit, OrbitType.EQUINOCTIAL);
   AdaptiveStepsizeIntegrator integrator =
       new DormandPrince853Integrator(0.001, 200, tolerance[0], tolerance[1]);
   integrator.setInitialStepSize(60);
   propagator = new NumericalPropagator(integrator);
   propagator.setInitialState(initialState);
 }
 @Before
 public void setUp() throws OrekitException {
   Utils.setDataRoot("regular-data:potential/shm-format");
   GravityFieldFactory.addPotentialCoefficientsReader(
       new SHMFormatReader("^eigen_cg03c_coef$", false));
 }