Search in sources :

Example 1 with DragSensitive

use of org.orekit.forces.drag.DragSensitive 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

IOException (java.io.IOException)1 OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)1 DragForce (org.orekit.forces.drag.DragForce)1 DragSensitive (org.orekit.forces.drag.DragSensitive)1 IsotropicDrag (org.orekit.forces.drag.IsotropicDrag)1 Atmosphere (org.orekit.forces.drag.atmosphere.Atmosphere)1 HarrisPriester (org.orekit.forces.drag.atmosphere.HarrisPriester)1 HolmesFeatherstoneAttractionModel (org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel)1 ThirdBodyAttraction (org.orekit.forces.gravity.ThirdBodyAttraction)1 IsotropicRadiationSingleCoefficient (org.orekit.forces.radiation.IsotropicRadiationSingleCoefficient)1 RadiationSensitive (org.orekit.forces.radiation.RadiationSensitive)1 SolarRadiationPressure (org.orekit.forces.radiation.SolarRadiationPressure)1 DSSTSolarRadiationPressure (org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure)1