use of org.orekit.forces.drag.HarrisPriester in project SpriteOrbits by ProjectPersephone.
the class SpriteProp method createPropagator.
/**
* Create a numerical propagator for a state.
* @param state state to propagate
* @param attitudeProvider provider for the attitude
* @param crossSection cross section of the object
* @param dragCoeff drag coefficient
*/
private Propagator createPropagator(final SpacecraftState state, final AttitudeProvider attitudeProvider, final double crossSection, final double dragCoeff) throws OrekitException {
// see https://www.orekit.org/static/architecture/propagation.html
// steps limits
final double minStep = 0.001;
final double maxStep = 1000;
final double initStep = 60;
// error control parameters (absolute and relative)
final double positionError = 10.0;
// we will propagate in Cartesian coordinates
final OrbitType orbitType = OrbitType.CARTESIAN;
final double[][] tolerances = NumericalPropagator.tolerances(positionError, state.getOrbit(), orbitType);
// set up mathematical integrator
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(minStep, maxStep, tolerances[0], tolerances[1]);
integrator.setInitialStepSize(initStep);
// set up space dynamics propagator
NumericalPropagator propagator = new NumericalPropagator(integrator);
propagator.setOrbitType(orbitType);
// add gravity field force model
final NormalizedSphericalHarmonicsProvider gravityProvider = GravityFieldFactory.getNormalizedProvider(8, 8);
propagator.addForceModel(new HolmesFeatherstoneAttractionModel(earth.getBodyFrame(), gravityProvider));
// add atmospheric drag force model
propagator.addForceModel(new DragForce(new HarrisPriester(sun, earth), new SphericalSpacecraft(crossSection, dragCoeff, 0.0, 0.0)));
// set attitude mode
propagator.setAttitudeProvider(attitudeProvider);
propagator.setInitialState(state);
return propagator;
}
use of org.orekit.forces.drag.HarrisPriester in project SpriteOrbits by ProjectPersephone.
the class SpritePropOrig method createPropagator.
/**
* Create a numerical propagator for a state.
* @param state state to propagate
* @param attitudeProvider provider for the attitude
* @param crossSection cross section of the object
* @param dragCoeff drag coefficient
*/
private Propagator createPropagator(final SpacecraftState state, final AttitudeProvider attitudeProvider, final double crossSection, final double dragCoeff) throws OrekitException {
// see https://www.orekit.org/static/architecture/propagation.html
// steps limits
final double minStep = 0.001;
final double maxStep = 1000;
final double initStep = 60;
// error control parameters (absolute and relative)
final double positionError = 10.0;
// we will propagate in Cartesian coordinates
final OrbitType orbitType = OrbitType.CARTESIAN;
final double[][] tolerances = NumericalPropagator.tolerances(positionError, state.getOrbit(), orbitType);
// set up mathematical integrator
AdaptiveStepsizeIntegrator integrator = new DormandPrince853Integrator(minStep, maxStep, tolerances[0], tolerances[1]);
integrator.setInitialStepSize(initStep);
// set up space dynamics propagator
NumericalPropagator propagator = new NumericalPropagator(integrator);
propagator.setOrbitType(orbitType);
// add gravity field force model
final NormalizedSphericalHarmonicsProvider gravityProvider = GravityFieldFactory.getNormalizedProvider(8, 8);
propagator.addForceModel(new HolmesFeatherstoneAttractionModel(earth.getBodyFrame(), gravityProvider));
// add atmospheric drag force model
propagator.addForceModel(new DragForce(new HarrisPriester(sun, earth), new SphericalSpacecraft(crossSection, dragCoeff, 0.0, 0.0)));
// set attitude mode
propagator.setAttitudeProvider(attitudeProvider);
propagator.setInitialState(state);
return propagator;
}
Aggregations