use of org.orekit.attitudes.Attitude in project Orekit by CS-SI.
the class NumericalPropagatorBuilder method buildPropagator.
/**
* {@inheritDoc}
*/
public NumericalPropagator buildPropagator(final double[] normalizedParameters) throws OrekitException {
setParameters(normalizedParameters);
final Orbit orbit = createInitialOrbit();
final Attitude attitude = attProvider.getAttitude(orbit, orbit.getDate(), getFrame());
final SpacecraftState state = new SpacecraftState(orbit, attitude, mass);
final NumericalPropagator propagator = new NumericalPropagator(builder.buildIntegrator(orbit, getOrbitType()));
propagator.setOrbitType(getOrbitType());
propagator.setPositionAngleType(getPositionAngle());
propagator.setAttitudeProvider(attProvider);
for (ForceModel model : forceModels) {
propagator.addForceModel(model);
}
propagator.resetInitialState(state);
return propagator;
}
Aggregations