Search in sources :

Example 1 with ConstantThrustManeuver

use of org.orekit.forces.maneuvers.ConstantThrustManeuver in project Orekit by CS-SI.

the class HarmonicParametricAccelerationTest method testEquivalentTangentialOverriddenManeuver.

@Test
public void testEquivalentTangentialOverriddenManeuver() throws OrekitException {
    final double mass = 2500;
    final double isp = Double.POSITIVE_INFINITY;
    final double duration = 4000;
    final double f = 400;
    final AttitudeProvider maneuverLaw = new LofOffset(initialOrbit.getFrame(), LOFType.VNC);
    ConstantThrustManeuver maneuver = new ConstantThrustManeuver(initialOrbit.getDate().shiftedBy(-10.0), duration, f, isp, Vector3D.PLUS_I);
    final AttitudeProvider accelerationLaw = new CelestialBodyPointed(initialOrbit.getFrame(), CelestialBodyFactory.getSun(), Vector3D.PLUS_K, Vector3D.PLUS_I, Vector3D.PLUS_K);
    final HarmonicParametricAcceleration lofAcceleration = new HarmonicParametricAcceleration(Vector3D.PLUS_I, maneuverLaw, "prefix", null, Double.POSITIVE_INFINITY, 1);
    lofAcceleration.getParametersDrivers()[0].setValue(f / mass);
    lofAcceleration.getParametersDrivers()[1].setValue(0.5 * FastMath.PI);
    doTestEquivalentManeuver(mass, maneuverLaw, maneuver, accelerationLaw, lofAcceleration, 1.0e-15);
}
Also used : CelestialBodyPointed(org.orekit.attitudes.CelestialBodyPointed) LofOffset(org.orekit.attitudes.LofOffset) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) ConstantThrustManeuver(org.orekit.forces.maneuvers.ConstantThrustManeuver) Test(org.junit.Test)

Example 2 with ConstantThrustManeuver

use of org.orekit.forces.maneuvers.ConstantThrustManeuver in project Orekit by CS-SI.

the class HarmonicParametricAccelerationTest method testEquivalentInertialManeuver.

@Test
public void testEquivalentInertialManeuver() throws OrekitException {
    final double delta = FastMath.toRadians(-7.4978);
    final double alpha = FastMath.toRadians(351);
    final Vector3D direction = new Vector3D(alpha, delta);
    final double mass = 2500;
    final double isp = Double.POSITIVE_INFINITY;
    final double duration = 4000;
    final double f = 400;
    final AttitudeProvider maneuverLaw = new InertialProvider(new Rotation(direction, Vector3D.PLUS_I));
    ConstantThrustManeuver maneuver = new ConstantThrustManeuver(initialOrbit.getDate().shiftedBy(-10.0), duration, f, isp, Vector3D.PLUS_I);
    final AttitudeProvider accelerationLaw = new InertialProvider(new Rotation(direction, Vector3D.PLUS_K));
    final HarmonicParametricAcceleration inertialAcceleration = new HarmonicParametricAcceleration(direction, true, "", AbsoluteDate.J2000_EPOCH, Double.POSITIVE_INFINITY, 1);
    Assert.assertTrue(inertialAcceleration.dependsOnPositionOnly());
    inertialAcceleration.getParametersDrivers()[0].setValue(f / mass);
    inertialAcceleration.getParametersDrivers()[1].setValue(0.5 * FastMath.PI);
    doTestEquivalentManeuver(mass, maneuverLaw, maneuver, accelerationLaw, inertialAcceleration, 1.0e-15);
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) InertialProvider(org.orekit.attitudes.InertialProvider) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) ConstantThrustManeuver(org.orekit.forces.maneuvers.ConstantThrustManeuver) Test(org.junit.Test)

Example 3 with ConstantThrustManeuver

use of org.orekit.forces.maneuvers.ConstantThrustManeuver in project Orekit by CS-SI.

the class HarmonicParametricAccelerationTest method testEquivalentInertialManeuverField.

@Test
public void testEquivalentInertialManeuverField() throws OrekitException {
    final double delta = FastMath.toRadians(-7.4978);
    final double alpha = FastMath.toRadians(351);
    final Vector3D direction = new Vector3D(alpha, delta);
    final double mass = 2500;
    final double isp = Double.POSITIVE_INFINITY;
    final double duration = 4000;
    final double f = 400;
    final AttitudeProvider maneuverLaw = new InertialProvider(new Rotation(direction, Vector3D.PLUS_I));
    ConstantThrustManeuver maneuver = new ConstantThrustManeuver(initialOrbit.getDate().shiftedBy(-10.0), duration, f, isp, Vector3D.PLUS_I);
    final AttitudeProvider accelerationLaw = new InertialProvider(new Rotation(direction, Vector3D.PLUS_K));
    final HarmonicParametricAcceleration inertialAcceleration = new HarmonicParametricAcceleration(direction, true, "", AbsoluteDate.J2000_EPOCH, Double.POSITIVE_INFINITY, 1);
    inertialAcceleration.getParametersDrivers()[0].setValue(f / mass);
    inertialAcceleration.getParametersDrivers()[1].setValue(0.5 * FastMath.PI);
    doTestEquivalentManeuver(Decimal64Field.getInstance(), mass, maneuverLaw, maneuver, accelerationLaw, inertialAcceleration, 3.0e-9);
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) InertialProvider(org.orekit.attitudes.InertialProvider) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) ConstantThrustManeuver(org.orekit.forces.maneuvers.ConstantThrustManeuver) Test(org.junit.Test)

Example 4 with ConstantThrustManeuver

use of org.orekit.forces.maneuvers.ConstantThrustManeuver in project Orekit by CS-SI.

the class HarmonicParametricAccelerationTest method testEquivalentTangentialManeuverField.

@Test
public void testEquivalentTangentialManeuverField() throws OrekitException {
    final double mass = 2500;
    final double isp = Double.POSITIVE_INFINITY;
    final double duration = 4000;
    final double f = 400;
    final AttitudeProvider commonLaw = new LofOffset(initialOrbit.getFrame(), LOFType.VNC);
    ConstantThrustManeuver maneuver = new ConstantThrustManeuver(initialOrbit.getDate().shiftedBy(-10.0), duration, f, isp, Vector3D.PLUS_I);
    final HarmonicParametricAcceleration lofAcceleration = new HarmonicParametricAcceleration(Vector3D.PLUS_I, false, "", null, Double.POSITIVE_INFINITY, 1);
    lofAcceleration.getParametersDrivers()[0].setValue(f / mass);
    lofAcceleration.getParametersDrivers()[1].setValue(0.5 * FastMath.PI);
    doTestEquivalentManeuver(Decimal64Field.getInstance(), mass, commonLaw, maneuver, commonLaw, lofAcceleration, 1.0e-15);
}
Also used : LofOffset(org.orekit.attitudes.LofOffset) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) ConstantThrustManeuver(org.orekit.forces.maneuvers.ConstantThrustManeuver) Test(org.junit.Test)

Example 5 with ConstantThrustManeuver

use of org.orekit.forces.maneuvers.ConstantThrustManeuver in project Orekit by CS-SI.

the class PolynomialParametricAccelerationTest method testEquivalentTangentialOverriddenManeuver.

@Test
public void testEquivalentTangentialOverriddenManeuver() throws OrekitException {
    final double mass = 2500;
    final double isp = Double.POSITIVE_INFINITY;
    final double duration = 4000;
    final double f = 400;
    final AttitudeProvider maneuverLaw = new LofOffset(initialOrbit.getFrame(), LOFType.VNC);
    ConstantThrustManeuver maneuver = new ConstantThrustManeuver(initialOrbit.getDate().shiftedBy(-10.0), duration, f, isp, Vector3D.PLUS_I);
    final AttitudeProvider accelerationLaw = new CelestialBodyPointed(initialOrbit.getFrame(), CelestialBodyFactory.getSun(), Vector3D.PLUS_K, Vector3D.PLUS_I, Vector3D.PLUS_K);
    final PolynomialParametricAcceleration lofAcceleration = new PolynomialParametricAcceleration(Vector3D.PLUS_I, maneuverLaw, "prefix", null, 0);
    lofAcceleration.getParametersDrivers()[0].setValue(f / mass);
    doTestEquivalentManeuver(mass, maneuverLaw, maneuver, accelerationLaw, lofAcceleration, 1.0e-15);
}
Also used : CelestialBodyPointed(org.orekit.attitudes.CelestialBodyPointed) LofOffset(org.orekit.attitudes.LofOffset) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) ConstantThrustManeuver(org.orekit.forces.maneuvers.ConstantThrustManeuver) Test(org.junit.Test)

Aggregations

ConstantThrustManeuver (org.orekit.forces.maneuvers.ConstantThrustManeuver)16 Test (org.junit.Test)15 AttitudeProvider (org.orekit.attitudes.AttitudeProvider)15 LofOffset (org.orekit.attitudes.LofOffset)10 Rotation (org.hipparchus.geometry.euclidean.threed.Rotation)7 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)7 InertialProvider (org.orekit.attitudes.InertialProvider)7 FieldVector3D (org.hipparchus.geometry.euclidean.threed.FieldVector3D)6 CelestialBodyPointed (org.orekit.attitudes.CelestialBodyPointed)6 AdaptiveStepsizeIntegrator (org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator)4 DormandPrince853Integrator (org.hipparchus.ode.nonstiff.DormandPrince853Integrator)4 SpacecraftState (org.orekit.propagation.SpacecraftState)4 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)3 Orbit (org.orekit.orbits.Orbit)3 NumericalPropagator (org.orekit.propagation.numerical.NumericalPropagator)3 AbsoluteDate (org.orekit.time.AbsoluteDate)3 DateComponents (org.orekit.time.DateComponents)3 TimeComponents (org.orekit.time.TimeComponents)3 Arrays (java.util.Arrays)2 Field (org.hipparchus.Field)2