use of org.orekit.time.TimeComponents in project Orekit by CS-SI.
the class HolmesFeatherstoneAttractionModelTest method testStateJacobianVs80Implementation.
@Test
public void testStateJacobianVs80Implementation() throws OrekitException {
Utils.setDataRoot("regular-data:potential/grgs-format");
GravityFieldFactory.addPotentialCoefficientsReader(new GRGSFormatReader("grim4s4_gr", true));
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(2000, 07, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, FramesFactory.getEME2000(), date, mu);
HolmesFeatherstoneAttractionModel hfModel = new HolmesFeatherstoneAttractionModel(itrf, GravityFieldFactory.getNormalizedProvider(50, 50));
Assert.assertEquals(TideSystem.UNKNOWN, hfModel.getTideSystem());
SpacecraftState state = new SpacecraftState(orbit);
checkStateJacobianVs80Implementation(state, hfModel, new LofOffset(state.getFrame(), LOFType.VVLH), 2.0e-15, false);
}
use of org.orekit.time.TimeComponents in project Orekit by CS-SI.
the class HolmesFeatherstoneAttractionModelTest method testHelioSynchronous.
// rough test to determine if J2 alone creates heliosynchronism
@Test
public void testHelioSynchronous() throws OrekitException {
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(1970, 07, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
Transform itrfToEME2000 = itrf.getTransformTo(FramesFactory.getEME2000(), date);
Vector3D pole = itrfToEME2000.transformVector(Vector3D.PLUS_K);
Frame poleAligned = new Frame(FramesFactory.getEME2000(), new Transform(date, new Rotation(pole, Vector3D.PLUS_K)), "pole aligned", true);
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, poleAligned, date, mu);
double[][] c = new double[3][1];
c[0][0] = 0.0;
c[2][0] = normalizedC20;
double[][] s = new double[3][1];
propagator.addForceModel(new HolmesFeatherstoneAttractionModel(itrf, GravityFieldFactory.getNormalizedProvider(6378136.460, mu, TideSystem.UNKNOWN, c, s)));
// let the step handler perform the test
propagator.setMasterMode(Constants.JULIAN_DAY, new SpotStepHandler(date, mu));
propagator.setInitialState(new SpacecraftState(orbit));
propagator.propagate(date.shiftedBy(7 * Constants.JULIAN_DAY));
Assert.assertTrue(propagator.getCalls() < 9200);
}
use of org.orekit.time.TimeComponents in project Orekit by CS-SI.
the class HolmesFeatherstoneAttractionModelTest method testStateJacobian.
@Test
public void testStateJacobian() throws OrekitException {
Utils.setDataRoot("regular-data:potential/grgs-format");
GravityFieldFactory.addPotentialCoefficientsReader(new GRGSFormatReader("grim4s4_gr", true));
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(2000, 07, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, FramesFactory.getEME2000(), date, mu);
OrbitType integrationType = OrbitType.CARTESIAN;
double[][] tolerances = NumericalPropagator.tolerances(0.01, orbit, integrationType);
propagator = new NumericalPropagator(new DormandPrince853Integrator(1.0e-3, 120, tolerances[0], tolerances[1]));
propagator.setOrbitType(integrationType);
HolmesFeatherstoneAttractionModel hfModel = new HolmesFeatherstoneAttractionModel(itrf, GravityFieldFactory.getNormalizedProvider(50, 50));
Assert.assertEquals(TideSystem.UNKNOWN, hfModel.getTideSystem());
propagator.addForceModel(hfModel);
SpacecraftState state0 = new SpacecraftState(orbit);
propagator.setInitialState(state0);
checkStateJacobian(propagator, state0, date.shiftedBy(3.5 * 3600.0), 50000, tolerances[0], 7.8e-6);
}
use of org.orekit.time.TimeComponents in project Orekit by CS-SI.
the class HolmesFeatherstoneAttractionModelTest method testCompleteWithCunninghamReference.
@Test
@Deprecated
public void testCompleteWithCunninghamReference() throws OrekitException {
Utils.setDataRoot("regular-data:potential/grgs-format");
GravityFieldFactory.addPotentialCoefficientsReader(new GRGSFormatReader("grim4s4_gr", true));
// initialization
AbsoluteDate date = new AbsoluteDate(new DateComponents(2000, 07, 01), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
double i = FastMath.toRadians(98.7);
double omega = FastMath.toRadians(93.0);
double OMEGA = FastMath.toRadians(15.0 * 22.5);
Orbit orbit = new KeplerianOrbit(7201009.7124401, 1e-3, i, omega, OMEGA, 0, PositionAngle.MEAN, FramesFactory.getEME2000(), date, mu);
double[][] tolerances = NumericalPropagator.tolerances(0.01, orbit, OrbitType.CARTESIAN);
AbsoluteDate targetDate = date.shiftedBy(3 * Constants.JULIAN_DAY);
propagator = new NumericalPropagator(new DormandPrince853Integrator(1.0e-3, 120, tolerances[0], tolerances[1]));
propagator.setOrbitType(OrbitType.CARTESIAN);
propagator.addForceModel(new HolmesFeatherstoneAttractionModel(itrf, GravityFieldFactory.getNormalizedProvider(69, 69)));
propagator.setInitialState(new SpacecraftState(orbit));
SpacecraftState hfOrb = propagator.propagate(targetDate);
propagator.removeForceModels();
propagator.addForceModel(new CunninghamAttractionModel(itrf, GravityFieldFactory.getUnnormalizedProvider(69, 69)));
propagator.setInitialState(new SpacecraftState(orbit));
SpacecraftState cOrb = propagator.propagate(targetDate);
Vector3D dif = hfOrb.getPVCoordinates().getPosition().subtract(cOrb.getPVCoordinates().getPosition());
Assert.assertEquals(0, dif.getNorm(), 4e-5);
}
use of org.orekit.time.TimeComponents in project Orekit by CS-SI.
the class BoxAndSolarArraySpacecraftTest method setUp.
@Before
public void setUp() {
try {
Utils.setDataRoot("regular-data");
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;
AbsoluteDate date = new AbsoluteDate(new DateComponents(1970, 7, 1), new TimeComponents(13, 59, 27.816), TimeScalesFactory.getUTC());
// Satellite position as circular parameters, raan chosen to have sun elevation with
// respect to orbit plane roughly evolving roughly from 15 to 15.2 degrees in the test range
Orbit circ = new CircularOrbit(7178000.0, 0.5e-4, -0.5e-4, FastMath.toRadians(50.), FastMath.toRadians(280), FastMath.toRadians(10.0), PositionAngle.MEAN, FramesFactory.getEME2000(), date, mu);
propagator = new EcksteinHechlerPropagator(circ, new LofOffset(circ.getFrame(), LOFType.VVLH), ae, mu, c20, c30, c40, c50, c60);
} catch (OrekitException oe) {
Assert.fail(oe.getLocalizedMessage());
}
}
Aggregations