Search in sources :

Example 6 with AttitudeProvider

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

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

the class PolynomialParametricAccelerationTest 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 PolynomialParametricAcceleration inertialAcceleration = new PolynomialParametricAcceleration(direction, true, "", AbsoluteDate.J2000_EPOCH, 0);
    inertialAcceleration.getParametersDrivers()[0].setValue(f / mass);
    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 8 with AttitudeProvider

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

the class PolynomialParametricAccelerationTest 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 PolynomialParametricAcceleration lofAcceleration = new PolynomialParametricAcceleration(Vector3D.PLUS_I, false, "", null, 0);
    lofAcceleration.getParametersDrivers()[0].setValue(f / mass);
    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 9 with AttitudeProvider

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

the class DSSTPropagatorTest method testIssue339WithAccelerations.

@Test
public void testIssue339WithAccelerations() throws OrekitException {
    final SpacecraftState osculatingState = getLEOStatePropagatedBy30Minutes();
    final CelestialBody sun = CelestialBodyFactory.getSun();
    final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
    final BoxAndSolarArraySpacecraft boxAndWing = new BoxAndSolarArraySpacecraft(5.0, 2.0, 2.0, sun, 50.0, Vector3D.PLUS_J, 2.0, 0.1, 0.2, 0.6);
    final Atmosphere atmosphere = new HarrisPriester(CelestialBodyFactory.getSun(), earth, 6);
    final AttitudeProvider attitudeProvider = new LofOffset(osculatingState.getFrame(), LOFType.VVLH, RotationOrder.XYZ, 0.0, 0.0, 0.0);
    // Surface force models that require an attitude provider
    final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
    forces.add(new DSSTAtmosphericDrag(atmosphere, boxAndWing));
    final SpacecraftState meanState = DSSTPropagator.computeMeanState(osculatingState, attitudeProvider, forces);
    final SpacecraftState computedOsculatingState = DSSTPropagator.computeOsculatingState(meanState, attitudeProvider, forces);
    Assert.assertEquals(0.0, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), computedOsculatingState.getPVCoordinates().getPosition()), 5.0e-6);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) BoxAndSolarArraySpacecraft(org.orekit.forces.BoxAndSolarArraySpacecraft) HarrisPriester(org.orekit.forces.drag.atmosphere.HarrisPriester) OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) Atmosphere(org.orekit.forces.drag.atmosphere.Atmosphere) CelestialBody(org.orekit.bodies.CelestialBody) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) LofOffset(org.orekit.attitudes.LofOffset) DSSTAtmosphericDrag(org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) Test(org.junit.Test)

Example 10 with AttitudeProvider

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

the class DSSTPropagatorTest method testIssue339.

@Test
public void testIssue339() throws OrekitException {
    final SpacecraftState osculatingState = getLEOState();
    final CelestialBody sun = CelestialBodyFactory.getSun();
    final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
    final BoxAndSolarArraySpacecraft boxAndWing = new BoxAndSolarArraySpacecraft(5.0, 2.0, 2.0, sun, 50.0, Vector3D.PLUS_J, 2.0, 0.1, 0.2, 0.6);
    final Atmosphere atmosphere = new HarrisPriester(CelestialBodyFactory.getSun(), earth, 6);
    final AttitudeProvider attitudeProvider = new LofOffset(osculatingState.getFrame(), LOFType.VVLH, RotationOrder.XYZ, 0.0, 0.0, 0.0);
    // Surface force models that require an attitude provider
    final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
    forces.add(new DSSTSolarRadiationPressure(sun, Constants.WGS84_EARTH_EQUATORIAL_RADIUS, boxAndWing));
    forces.add(new DSSTAtmosphericDrag(atmosphere, boxAndWing));
    final SpacecraftState meanState = DSSTPropagator.computeMeanState(osculatingState, attitudeProvider, forces);
    Assert.assertEquals(0.522, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), meanState.getPVCoordinates().getPosition()), 0.001);
    final SpacecraftState computedOsculatingState = DSSTPropagator.computeOsculatingState(meanState, attitudeProvider, forces);
    Assert.assertEquals(0.0, Vector3D.distance(osculatingState.getPVCoordinates().getPosition(), computedOsculatingState.getPVCoordinates().getPosition()), 5.0e-6);
}
Also used : HarrisPriester(org.orekit.forces.drag.atmosphere.HarrisPriester) OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) ArrayList(java.util.ArrayList) DSSTForceModel(org.orekit.propagation.semianalytical.dsst.forces.DSSTForceModel) DSSTAtmosphericDrag(org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag) DSSTSolarRadiationPressure(org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure) SpacecraftState(org.orekit.propagation.SpacecraftState) BoxAndSolarArraySpacecraft(org.orekit.forces.BoxAndSolarArraySpacecraft) Atmosphere(org.orekit.forces.drag.atmosphere.Atmosphere) CelestialBody(org.orekit.bodies.CelestialBody) LofOffset(org.orekit.attitudes.LofOffset) AttitudeProvider(org.orekit.attitudes.AttitudeProvider) Test(org.junit.Test)

Aggregations

AttitudeProvider (org.orekit.attitudes.AttitudeProvider)36 Test (org.junit.Test)29 AbsoluteDate (org.orekit.time.AbsoluteDate)21 LofOffset (org.orekit.attitudes.LofOffset)20 SpacecraftState (org.orekit.propagation.SpacecraftState)17 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)16 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)15 ConstantThrustManeuver (org.orekit.forces.maneuvers.ConstantThrustManeuver)15 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)14 InertialProvider (org.orekit.attitudes.InertialProvider)13 Rotation (org.hipparchus.geometry.euclidean.threed.Rotation)12 Orbit (org.orekit.orbits.Orbit)12 FieldVector3D (org.hipparchus.geometry.euclidean.threed.FieldVector3D)10 OrekitException (org.orekit.errors.OrekitException)10 CartesianOrbit (org.orekit.orbits.CartesianOrbit)10 DormandPrince853Integrator (org.hipparchus.ode.nonstiff.DormandPrince853Integrator)9 NumericalPropagator (org.orekit.propagation.numerical.NumericalPropagator)9 AdaptiveStepsizeIntegrator (org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator)8 FieldSpacecraftState (org.orekit.propagation.FieldSpacecraftState)8 DateComponents (org.orekit.time.DateComponents)8