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.);
}
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));
}
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());
}
}
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());
}
}
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);
}
Aggregations