Search in sources :

Example 26 with OneAxisEllipsoid

use of org.orekit.bodies.OneAxisEllipsoid in project Orekit by CS-SI.

the class DOPComputerTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws OrekitException {
    // Sets the root of data to read
    Utils.setDataRoot("gnss");
    // Defines the Earth shape
    earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
    // Defines the location where to compute the DOP
    location = new GeodeticPoint(FastMath.toRadians(43.6), FastMath.toRadians(1.45), 0.);
}
Also used : OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) GeodeticPoint(org.orekit.bodies.GeodeticPoint) BeforeClass(org.junit.BeforeClass)

Example 27 with OneAxisEllipsoid

use of org.orekit.bodies.OneAxisEllipsoid in project Orekit by CS-SI.

the class AlongTrackAimingTest method setUp.

@Before
public void setUp() throws OrekitException {
    Utils.setDataRoot("regular-data");
    orbit = new CircularOrbit(7178000.0, 0.5e-4, -0.5e-4, FastMath.toRadians(50.), FastMath.toRadians(270.), FastMath.toRadians(5.300), PositionAngle.MEAN, FramesFactory.getEME2000(), new AbsoluteDate(2008, 4, 7, 0, 0, 0, TimeScalesFactory.getUTC()), Constants.EIGEN5C_EARTH_MU);
    ellipsoid = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
}
Also used : OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) CircularOrbit(org.orekit.orbits.CircularOrbit) AbsoluteDate(org.orekit.time.AbsoluteDate) Before(org.junit.Before)

Example 28 with OneAxisEllipsoid

use of org.orekit.bodies.OneAxisEllipsoid in project Orekit by CS-SI.

the class SpacecraftStateTest method setUp.

@Before
public void setUp() {
    try {
        Utils.setDataRoot("regular-data");
        double mu = 3.9860047e14;
        double ae = 6.378137e6;
        double c20 = -1.08263e-3;
        double c30 = 2.54e-6;
        double c40 = 1.62e-6;
        double c50 = 2.3e-7;
        double c60 = -5.5e-7;
        mass = 2500;
        double a = 7187990.1979844316;
        double e = 0.5e-4;
        double i = 1.7105407051081795;
        double omega = 1.9674147913622104;
        double OMEGA = FastMath.toRadians(261);
        double lv = 0;
        AbsoluteDate date = new AbsoluteDate(new DateComponents(2004, 01, 01), TimeComponents.H00, TimeScalesFactory.getUTC());
        orbit = new KeplerianOrbit(a, e, i, omega, OMEGA, lv, PositionAngle.TRUE, FramesFactory.getEME2000(), date, mu);
        OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
        attitudeLaw = new BodyCenterPointing(orbit.getFrame(), earth);
        propagator = new EcksteinHechlerPropagator(orbit, attitudeLaw, mass, ae, mu, c20, c30, c40, c50, c60);
    } catch (OrekitException oe) {
        Assert.fail(oe.getLocalizedMessage());
    }
}
Also used : EcksteinHechlerPropagator(org.orekit.propagation.analytical.EcksteinHechlerPropagator) OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) BodyCenterPointing(org.orekit.attitudes.BodyCenterPointing) DateComponents(org.orekit.time.DateComponents) KeplerianOrbit(org.orekit.orbits.KeplerianOrbit) OrekitException(org.orekit.errors.OrekitException) AbsoluteDate(org.orekit.time.AbsoluteDate) Before(org.junit.Before)

Example 29 with OneAxisEllipsoid

use of org.orekit.bodies.OneAxisEllipsoid in project Orekit by CS-SI.

the class PropagatorsParallelizerTest method setUp.

@Before
public void setUp() {
    try {
        Utils.setDataRoot("regular-data:potential/icgem-format");
        unnormalizedGravityField = GravityFieldFactory.getUnnormalizedProvider(6, 0);
        normalizedGravityField = GravityFieldFactory.getNormalizedProvider(6, 0);
        mass = 2500;
        double a = 7187990.1979844316;
        double e = 0.5e-4;
        double i = 1.7105407051081795;
        double omega = 1.9674147913622104;
        double OMEGA = FastMath.toRadians(261);
        double lv = 0;
        AbsoluteDate date = new AbsoluteDate(new DateComponents(2004, 01, 01), TimeComponents.H00, TimeScalesFactory.getUTC());
        orbit = new KeplerianOrbit(a, e, i, omega, OMEGA, lv, PositionAngle.TRUE, FramesFactory.getEME2000(), date, normalizedGravityField.getMu());
        OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
        attitudeLaw = new BodyCenterPointing(orbit.getFrame(), earth);
    } catch (OrekitException oe) {
        Assert.fail(oe.getLocalizedMessage());
    }
}
Also used : OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) BodyCenterPointing(org.orekit.attitudes.BodyCenterPointing) DateComponents(org.orekit.time.DateComponents) KeplerianOrbit(org.orekit.orbits.KeplerianOrbit) OrekitException(org.orekit.errors.OrekitException) AbsoluteDate(org.orekit.time.AbsoluteDate) Before(org.junit.Before)

Example 30 with OneAxisEllipsoid

use of org.orekit.bodies.OneAxisEllipsoid in project Orekit by CS-SI.

the class FieldKeplerianPropagatorTest method doTestAltitude.

private <T extends RealFieldElement<T>> void doTestAltitude(Field<T> field) throws OrekitException {
    T zero = field.getZero();
    final FieldKeplerianOrbit<T> orbit = new FieldKeplerianOrbit<>(zero.add(7.8e6), zero.add(0.032), zero.add(0.4), zero.add(0.1), zero.add(0.2), zero.add(0.3), PositionAngle.TRUE, FramesFactory.getEME2000(), new FieldAbsoluteDate<>(field), 3.986004415e14);
    FieldKeplerianPropagator<T> propagator = new FieldKeplerianPropagator<>(orbit);
    BodyShape bodyShape = new OneAxisEllipsoid(6378137.0, 1.0 / 298.257222101, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
    FieldAltitudeDetector<T> detector = new FieldAltitudeDetector<>(orbit.getKeplerianPeriod().multiply(0.05), zero.add(1500000), bodyShape);
    Assert.assertEquals(1500000, detector.getAltitude().getReal(), 1.0e-12);
    propagator.addEventDetector(detector);
    FieldAbsoluteDate<T> farTarget = new FieldAbsoluteDate<>(field).shiftedBy(10000.0);
    FieldSpacecraftState<T> propagated = propagator.propagate(farTarget);
    Assert.assertTrue(farTarget.durationFrom(propagated.getDate()).getReal() > 5400.0);
    Assert.assertTrue(farTarget.durationFrom(propagated.getDate()).getReal() < 5500.0);
    FieldGeodeticPoint<T> gp = bodyShape.transform(propagated.getPVCoordinates().getPosition(), propagated.getFrame(), propagated.getDate());
    Assert.assertEquals(1500000, gp.getAltitude().getReal(), 0.1);
}
Also used : OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) BodyShape(org.orekit.bodies.BodyShape) FieldKeplerianOrbit(org.orekit.orbits.FieldKeplerianOrbit) FieldAltitudeDetector(org.orekit.propagation.events.FieldAltitudeDetector)

Aggregations

OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)146 Test (org.junit.Test)89 AbsoluteDate (org.orekit.time.AbsoluteDate)83 GeodeticPoint (org.orekit.bodies.GeodeticPoint)65 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)59 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)57 SpacecraftState (org.orekit.propagation.SpacecraftState)48 Frame (org.orekit.frames.Frame)47 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)45 Orbit (org.orekit.orbits.Orbit)42 PVCoordinates (org.orekit.utils.PVCoordinates)42 TopocentricFrame (org.orekit.frames.TopocentricFrame)34 EquinoctialOrbit (org.orekit.orbits.EquinoctialOrbit)31 OrekitException (org.orekit.errors.OrekitException)29 CircularOrbit (org.orekit.orbits.CircularOrbit)29 KeplerianPropagator (org.orekit.propagation.analytical.KeplerianPropagator)29 DateComponents (org.orekit.time.DateComponents)29 Propagator (org.orekit.propagation.Propagator)28 Before (org.junit.Before)26 FieldKeplerianOrbit (org.orekit.orbits.FieldKeplerianOrbit)23