Search in sources :

Example 1 with CelestialBodyPointed

use of org.orekit.attitudes.CelestialBodyPointed 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 CelestialBodyPointed

use of org.orekit.attitudes.CelestialBodyPointed 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)

Example 3 with CelestialBodyPointed

use of org.orekit.attitudes.CelestialBodyPointed in project Orekit by CS-SI.

the class HarmonicParametricAccelerationTest method testEquivalentTangentialOverriddenManeuverField.

@Test
public void testEquivalentTangentialOverriddenManeuverField() 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(Decimal64Field.getInstance(), 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 4 with CelestialBodyPointed

use of org.orekit.attitudes.CelestialBodyPointed in project Orekit by CS-SI.

the class PolynomialParametricAccelerationTest method testEquivalentTangentialOverriddenManeuverField.

@Test
public void testEquivalentTangentialOverriddenManeuverField() 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(Decimal64Field.getInstance(), 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

Test (org.junit.Test)4 AttitudeProvider (org.orekit.attitudes.AttitudeProvider)4 CelestialBodyPointed (org.orekit.attitudes.CelestialBodyPointed)4 LofOffset (org.orekit.attitudes.LofOffset)4 ConstantThrustManeuver (org.orekit.forces.maneuvers.ConstantThrustManeuver)4