Search in sources :

Example 1 with SHMFormatReader

use of org.orekit.forces.gravity.potential.SHMFormatReader in project Orekit by CS-SI.

the class NumericalPropagatorTest method setUp.

@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);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) FieldSpacecraftState(org.orekit.propagation.FieldSpacecraftState) SHMFormatReader(org.orekit.forces.gravity.potential.SHMFormatReader) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) CartesianOrbit(org.orekit.orbits.CartesianOrbit) KeplerianOrbit(org.orekit.orbits.KeplerianOrbit) Orbit(org.orekit.orbits.Orbit) FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) AdaptiveStepsizeIntegrator(org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator) TimeStampedPVCoordinates(org.orekit.utils.TimeStampedPVCoordinates) PVCoordinates(org.orekit.utils.PVCoordinates) DormandPrince853Integrator(org.hipparchus.ode.nonstiff.DormandPrince853Integrator) Before(org.junit.Before)

Example 2 with SHMFormatReader

use of org.orekit.forces.gravity.potential.SHMFormatReader in project Orekit by CS-SI.

the class FieldAdditionalEquationsTest method setUp.

@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);
    tolerance = NumericalPropagator.tolerances(0.001, orbit, OrbitType.EQUINOCTIAL);
}
Also used : FieldSpacecraftState(org.orekit.propagation.FieldSpacecraftState) SpacecraftState(org.orekit.propagation.SpacecraftState) SHMFormatReader(org.orekit.forces.gravity.potential.SHMFormatReader) Orbit(org.orekit.orbits.Orbit) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) PVCoordinates(org.orekit.utils.PVCoordinates) Before(org.junit.Before)

Example 3 with SHMFormatReader

use of org.orekit.forces.gravity.potential.SHMFormatReader in project Orekit by CS-SI.

the class AdditionalEquationsTest method setUp.

@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);
    tolerance = NumericalPropagator.tolerances(0.001, orbit, OrbitType.EQUINOCTIAL);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) SHMFormatReader(org.orekit.forces.gravity.potential.SHMFormatReader) Orbit(org.orekit.orbits.Orbit) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) EquinoctialOrbit(org.orekit.orbits.EquinoctialOrbit) PVCoordinates(org.orekit.utils.PVCoordinates) Before(org.junit.Before)

Example 4 with SHMFormatReader

use of org.orekit.forces.gravity.potential.SHMFormatReader in project Orekit by CS-SI.

the class FieldNumericalPropagatorTest method setUp.

@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();
}
Also used : SHMFormatReader(org.orekit.forces.gravity.potential.SHMFormatReader) Before(org.junit.Before)

Example 5 with SHMFormatReader

use of org.orekit.forces.gravity.potential.SHMFormatReader in project Orekit by CS-SI.

the class PartialDerivativesTest method setUp.

@Before
public void setUp() throws OrekitException {
    Utils.setDataRoot("regular-data:potential/shm-format");
    GravityFieldFactory.addPotentialCoefficientsReader(new SHMFormatReader("^eigen_cg03c_coef$", false));
}
Also used : SHMFormatReader(org.orekit.forces.gravity.potential.SHMFormatReader) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)5 SHMFormatReader (org.orekit.forces.gravity.potential.SHMFormatReader)5 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)3 EquinoctialOrbit (org.orekit.orbits.EquinoctialOrbit)3 Orbit (org.orekit.orbits.Orbit)3 SpacecraftState (org.orekit.propagation.SpacecraftState)3 PVCoordinates (org.orekit.utils.PVCoordinates)3 FieldSpacecraftState (org.orekit.propagation.FieldSpacecraftState)2 FieldVector3D (org.hipparchus.geometry.euclidean.threed.FieldVector3D)1 AdaptiveStepsizeIntegrator (org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator)1 DormandPrince853Integrator (org.hipparchus.ode.nonstiff.DormandPrince853Integrator)1 CartesianOrbit (org.orekit.orbits.CartesianOrbit)1 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)1 TimeStampedPVCoordinates (org.orekit.utils.TimeStampedPVCoordinates)1