Search in sources :

Example 11 with Atmosphere

use of org.orekit.forces.drag.atmosphere.Atmosphere in project Orekit by CS-SI.

the class DSSTPropagation method setForceModel.

/**
 * Set numerical propagator force models
 *
 *  @param parser  input file parser
 *  @param normalized spherical harmonics provider
 *  @param earthFrame Earth rotating frame
 *  @param numProp numerical propagator
 *  @throws IOException
 *  @throws OrekitException
 */
private void setForceModel(final KeyValueFileParser<ParameterKey> parser, final NormalizedSphericalHarmonicsProvider normalized, final Frame earthFrame, final NumericalPropagator numProp) throws IOException, OrekitException {
    final double ae = normalized.getAe();
    final int degree = parser.getInt(ParameterKey.CENTRAL_BODY_DEGREE);
    final int order = parser.getInt(ParameterKey.CENTRAL_BODY_ORDER);
    if (order > degree) {
        throw new IOException("Potential order cannot be higher than potential degree");
    }
    // Central Body (normalized coefficients)
    numProp.addForceModel(new HolmesFeatherstoneAttractionModel(earthFrame, normalized));
    // 3rd body (SUN)
    if (parser.containsKey(ParameterKey.THIRD_BODY_SUN) && parser.getBoolean(ParameterKey.THIRD_BODY_SUN)) {
        numProp.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getSun()));
    }
    // 3rd body (MOON)
    if (parser.containsKey(ParameterKey.THIRD_BODY_MOON) && parser.getBoolean(ParameterKey.THIRD_BODY_MOON)) {
        numProp.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getMoon()));
    }
    // Drag
    if (parser.containsKey(ParameterKey.DRAG) && parser.getBoolean(ParameterKey.DRAG)) {
        final OneAxisEllipsoid earth = new OneAxisEllipsoid(ae, Constants.WGS84_EARTH_FLATTENING, earthFrame);
        final Atmosphere atm = new HarrisPriester(CelestialBodyFactory.getSun(), earth, 6);
        final DragSensitive ssc = new IsotropicDrag(parser.getDouble(ParameterKey.DRAG_SF), parser.getDouble(ParameterKey.DRAG_CD));
        numProp.addForceModel(new DragForce(atm, ssc));
    }
    // Solar Radiation Pressure
    if (parser.containsKey(ParameterKey.SOLAR_RADIATION_PRESSURE) && parser.getBoolean(ParameterKey.SOLAR_RADIATION_PRESSURE)) {
        final double cR = parser.getDouble(ParameterKey.SOLAR_RADIATION_PRESSURE_CR);
        final RadiationSensitive ssc = new IsotropicRadiationSingleCoefficient(parser.getDouble(ParameterKey.SOLAR_RADIATION_PRESSURE_SF), cR);
        numProp.addForceModel(new SolarRadiationPressure(CelestialBodyFactory.getSun(), ae, ssc));
    }
}
Also used : HarrisPriester(org.orekit.forces.drag.atmosphere.HarrisPriester) OneAxisEllipsoid(org.orekit.bodies.OneAxisEllipsoid) IsotropicDrag(org.orekit.forces.drag.IsotropicDrag) RadiationSensitive(org.orekit.forces.radiation.RadiationSensitive) DSSTSolarRadiationPressure(org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure) SolarRadiationPressure(org.orekit.forces.radiation.SolarRadiationPressure) IOException(java.io.IOException) DragSensitive(org.orekit.forces.drag.DragSensitive) ThirdBodyAttraction(org.orekit.forces.gravity.ThirdBodyAttraction) Atmosphere(org.orekit.forces.drag.atmosphere.Atmosphere) DragForce(org.orekit.forces.drag.DragForce) HolmesFeatherstoneAttractionModel(org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel) IsotropicRadiationSingleCoefficient(org.orekit.forces.radiation.IsotropicRadiationSingleCoefficient)

Aggregations

Atmosphere (org.orekit.forces.drag.atmosphere.Atmosphere)11 OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)6 ArrayList (java.util.ArrayList)5 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)5 CelestialBody (org.orekit.bodies.CelestialBody)5 DragForce (org.orekit.forces.drag.DragForce)5 IsotropicDrag (org.orekit.forces.drag.IsotropicDrag)5 HarrisPriester (org.orekit.forces.drag.atmosphere.HarrisPriester)5 Test (org.junit.Test)4 DTM2000 (org.orekit.forces.drag.atmosphere.DTM2000)4 HolmesFeatherstoneAttractionModel (org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel)4 ThirdBodyAttraction (org.orekit.forces.gravity.ThirdBodyAttraction)4 IsotropicRadiationSingleCoefficient (org.orekit.forces.radiation.IsotropicRadiationSingleCoefficient)4 SolarRadiationPressure (org.orekit.forces.radiation.SolarRadiationPressure)4 SpacecraftState (org.orekit.propagation.SpacecraftState)4 List (java.util.List)3 GeodeticPoint (org.orekit.bodies.GeodeticPoint)3 DataProvidersManager (org.orekit.data.DataProvidersManager)3 PolynomialParametricAcceleration (org.orekit.forces.PolynomialParametricAcceleration)3 MarshallSolarActivityFutureEstimation (org.orekit.forces.drag.atmosphere.data.MarshallSolarActivityFutureEstimation)3