Commit d887dfd3 authored by Luc Maisonobe's avatar Luc Maisonobe

Deprecated PropagationException, replaced by OrekitException.

parent 0d230e63
......@@ -135,6 +135,26 @@ public class OrekitException extends Exception implements LocalizedException {
return parts.clone();
}
/** Recover a OrekitException, possibly embedded in a {@link MathRuntimeException}.
* <p>
* If the {@code MathRuntimeException} does not embed a OrekitException, a
* new one will be created.
* </p>
* @param exception MathRuntimeException to analyze
* @return a (possibly embedded) OrekitException
*/
public static OrekitException unwrap(final MathRuntimeException exception) {
for (Throwable t = exception; t != null; t = t.getCause()) {
if (t instanceof OrekitException) {
return (OrekitException) t;
}
}
return new OrekitException(exception);
}
/**
* Builds a message string by from a pattern and its arguments.
* @param locale Locale in which the message should be translated
......
......@@ -23,7 +23,9 @@ import org.hipparchus.exception.MathRuntimeException;
* during the propagation computation.
*
* @author Luc Maisonobe
* @deprecated as of 8.0 this class is not used anymore
*/
@Deprecated
public class PropagationException extends OrekitException {
/** Serializable UID. */
......
......@@ -65,13 +65,13 @@ public class TimeStampedCacheException extends OrekitException {
super(exception);
}
/** Recover a PropagationException, possibly embedded in a {@link OrekitException}.
/** Recover a TimeStampedCacheException, possibly embedded in a {@link OrekitException}.
* <p>
* If the {@code OrekitException} does not embed a PropagationException, a
* If the {@code OrekitException} does not embed a TimeStampedCacheException, a
* new one will be created.
* </p>
* @param oe OrekitException to analyze
* @return a (possibly embedded) PropagationException
* @return a (possibly embedded) TimeStampedCacheException
*/
public static TimeStampedCacheException unwrap(final OrekitException oe) {
......
......@@ -28,7 +28,6 @@ import org.orekit.bodies.GeodeticPoint;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.errors.PropagationException;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.analytical.KeplerianPropagator;
......@@ -134,32 +133,23 @@ public class AlongTrackAiming implements TileAiming {
final boolean isAscending)
throws OrekitException {
try {
// find the span of the next half track
final Propagator propagator = new KeplerianPropagator(orbit);
final HalfTrackSpanHandler handler = new HalfTrackSpanHandler(isAscending);
final LatitudeExtremumDetector detector =
new LatitudeExtremumDetector(0.25 * orbit.getKeplerianPeriod(), 1.0e-3, ellipsoid).
withHandler(handler).
withMaxIter(100);
propagator.addEventDetector(detector);
propagator.propagate(orbit.getDate().shiftedBy(3 * orbit.getKeplerianPeriod()));
// sample the half track
propagator.clearEventsDetectors();
final HalfTrackSampler sampler = new HalfTrackSampler(ellipsoid);
propagator.setMasterMode(handler.getEnd().durationFrom(handler.getStart()) / SAMPLING_STEPS, sampler);
propagator.propagate(handler.getStart(), handler.getEnd());
return sampler.getHalfTrack();
} catch (PropagationException pe) {
if (pe.getCause() instanceof OrekitException) {
throw (OrekitException) pe.getCause();
} else {
throw pe;
}
}
// find the span of the next half track
final Propagator propagator = new KeplerianPropagator(orbit);
final HalfTrackSpanHandler handler = new HalfTrackSpanHandler(isAscending);
final LatitudeExtremumDetector detector =
new LatitudeExtremumDetector(0.25 * orbit.getKeplerianPeriod(), 1.0e-3, ellipsoid).
withHandler(handler).
withMaxIter(100);
propagator.addEventDetector(detector);
propagator.propagate(orbit.getDate().shiftedBy(3 * orbit.getKeplerianPeriod()));
// sample the half track
propagator.clearEventsDetectors();
final HalfTrackSampler sampler = new HalfTrackSampler(ellipsoid);
propagator.setMasterMode(handler.getEnd().durationFrom(handler.getStart()) / SAMPLING_STEPS, sampler);
propagator.propagate(handler.getStart(), handler.getEnd());
return sampler.getHalfTrack();
}
......
......@@ -23,7 +23,6 @@ import org.hipparchus.util.Pair;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.errors.PropagationException;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.sampling.OrekitFixedStepHandler;
import org.orekit.time.AbsoluteDate;
......@@ -65,22 +64,18 @@ class HalfTrackSampler implements OrekitFixedStepHandler {
/** {@inheritDoc} */
@Override
public void handleStep(final SpacecraftState currentState, final boolean isLast)
throws PropagationException {
try {
throws OrekitException {
// find the sliding ground point below spacecraft
final TimeStampedPVCoordinates pv = currentState.getPVCoordinates(ellipsoid.getBodyFrame());
final TimeStampedPVCoordinates groundPV = ellipsoid.projectToGround(pv, ellipsoid.getBodyFrame());
// find the sliding ground point below spacecraft
final TimeStampedPVCoordinates pv = currentState.getPVCoordinates(ellipsoid.getBodyFrame());
final TimeStampedPVCoordinates groundPV = ellipsoid.projectToGround(pv, ellipsoid.getBodyFrame());
// geodetic coordinates
final GeodeticPoint gp =
ellipsoid.transform(groundPV.getPosition(), ellipsoid.getBodyFrame(), currentState.getDate());
// geodetic coordinates
final GeodeticPoint gp =
ellipsoid.transform(groundPV.getPosition(), ellipsoid.getBodyFrame(), currentState.getDate());
halfTrack.add(new Pair<GeodeticPoint, TimeStampedPVCoordinates>(gp, groundPV));
halfTrack.add(new Pair<GeodeticPoint, TimeStampedPVCoordinates>(gp, groundPV));
} catch (OrekitException oe) {
throw new PropagationException(oe);
}
}
}
......@@ -25,7 +25,6 @@ import java.util.Map;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.errors.PropagationException;
import org.orekit.frames.Frame;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.sampling.OrekitFixedStepHandler;
......@@ -99,7 +98,7 @@ public abstract class AbstractPropagator implements Propagator {
}
/** {@inheritDoc} */
public SpacecraftState getInitialState() throws PropagationException {
public SpacecraftState getInitialState() throws OrekitException {
return initialState;
}
......@@ -114,7 +113,7 @@ public abstract class AbstractPropagator implements Propagator {
}
/** {@inheritDoc} */
public void resetInitialState(final SpacecraftState state) throws PropagationException {
public void resetInitialState(final SpacecraftState state) throws OrekitException {
initialState = state;
setStartDate(state.getDate());
}
......@@ -179,11 +178,11 @@ public abstract class AbstractPropagator implements Propagator {
/** Update state by adding all additional states.
* @param original original state
* @return updated state, with all additional states included
* @exception PropagationException if one of the providers throws one
* @exception OrekitException if one of the providers throws one
* @see #addAdditionalStateProvider(AdditionalStateProvider)
*/
protected SpacecraftState updateAdditionalStates(final SpacecraftState original)
throws PropagationException {
throws OrekitException {
// start with original state,
// which may already contain additional states, for example in interpolated ephemerides
......@@ -258,7 +257,7 @@ public abstract class AbstractPropagator implements Propagator {
public abstract void clearEventsDetectors();
/** {@inheritDoc} */
public SpacecraftState propagate(final AbsoluteDate target) throws PropagationException {
public SpacecraftState propagate(final AbsoluteDate target) throws OrekitException {
if (startDate == null) {
startDate = getInitialState().getDate();
}
......
......@@ -16,7 +16,7 @@
*/
package org.orekit.propagation;
import org.orekit.errors.PropagationException;
import org.orekit.errors.OrekitException;
/** This interface represents providers for additional state data beyond {@link SpacecraftState}.
* <p>
......@@ -39,8 +39,8 @@ public interface AdditionalStateProvider {
/** Get the additional state.
* @param state spacecraft state to which additional state should correspond
* @return additional state corresponding to spacecraft state
* @exception PropagationException if additional state cannot be computed
* @exception OrekitException if additional state cannot be computed
*/
double[] getAdditionalState(SpacecraftState state) throws PropagationException;
double[] getAdditionalState(SpacecraftState state) throws OrekitException;
}
......@@ -22,7 +22,6 @@ import java.util.List;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.attitudes.InertialProvider;
import org.orekit.errors.OrekitException;
import org.orekit.errors.PropagationException;
import org.orekit.frames.Frame;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.sampling.OrekitFixedStepHandler;
......@@ -164,16 +163,16 @@ public interface Propagator extends PVCoordinatesProvider {
/** Get the propagator initial state.
* @return initial state
* @exception PropagationException if state cannot be retrieved
* @exception OrekitException if state cannot be retrieved
*/
SpacecraftState getInitialState() throws PropagationException;
SpacecraftState getInitialState() throws OrekitException;
/** Reset the propagator initial state.
* @param state new initial state to consider
* @exception PropagationException if initial state cannot be reset
* @exception OrekitException if initial state cannot be reset
*/
void resetInitialState(final SpacecraftState state)
throws PropagationException;
throws OrekitException;
/** Add a set of user-specified state parameters to be computed along with the orbit propagation.
* @param additionalStateProvider provider for additional state
......@@ -268,9 +267,9 @@ public interface Propagator extends PVCoordinatesProvider {
* target date is only a hint, not a mandatory objective.</p>
* @param target target date towards which orbit state should be propagated
* @return propagated state
* @exception PropagationException if state cannot be propagated
* @exception OrekitException if state cannot be propagated
*/
SpacecraftState propagate(AbsoluteDate target) throws PropagationException;
SpacecraftState propagate(AbsoluteDate target) throws OrekitException;
/** Propagate from a start date towards a target date.
* <p>Those propagators use a start date and a target date to
......@@ -281,8 +280,8 @@ public interface Propagator extends PVCoordinatesProvider {
* @param start start date from which orbit state should be propagated
* @param target target date to which orbit state should be propagated
* @return propagated state
* @exception PropagationException if state cannot be propagated
* @exception OrekitException if state cannot be propagated
*/
SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws PropagationException;
SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws OrekitException;
}
......@@ -32,7 +32,6 @@ import org.orekit.attitudes.Attitude;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
import org.orekit.errors.PropagationException;
import org.orekit.frames.Frame;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.AbstractPropagator;
......@@ -117,7 +116,7 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
/** {@inheritDoc} */
public SpacecraftState propagate(final AbsoluteDate start, final AbsoluteDate target)
throws PropagationException {
throws OrekitException {
try {
lastPropagationStart = start;
......@@ -174,12 +173,8 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
setStartDate(state.getDate());
return state;
} catch (PropagationException pe) {
throw pe;
} catch (OrekitException oe) {
throw PropagationException.unwrap(oe);
} catch (MathRuntimeException mrte) {
throw PropagationException.unwrap(mrte);
throw OrekitException.unwrap(mrte);
}
}
......@@ -332,10 +327,10 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
/** Get the mass.
* @param date target date for the orbit
* @return mass mass
* @exception PropagationException if some parameters are out of bounds
* @exception OrekitException if some parameters are out of bounds
*/
protected abstract double getMass(final AbsoluteDate date)
throws PropagationException;
throws OrekitException;
/** Get PV coordinates provider.
* @return PV coordinates provider
......@@ -348,18 +343,18 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
* @param state new intermediate state to consider
* @param forward if true, the intermediate state is valid for
* propagations after itself
* @exception PropagationException if initial state cannot be reset
* @exception OrekitException if initial state cannot be reset
*/
protected abstract void resetIntermediateState(final SpacecraftState state, final boolean forward)
throws PropagationException;
throws OrekitException;
/** Extrapolate an orbit up to a specific target date.
* @param date target date for the orbit
* @return extrapolated parameters
* @exception PropagationException if some parameters are out of bounds
* @exception OrekitException if some parameters are out of bounds
*/
protected abstract Orbit propagateOrbit(final AbsoluteDate date)
throws PropagationException;
throws OrekitException;
/** Propagate an orbit without any fancy features.
* <p>This method is similar in spirit to the {@link #propagate} method,
......@@ -368,9 +363,9 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
* stop exactly at the specified date.</p>
* @param date target date for propagation
* @return state at specified date
* @exception PropagationException if propagation cannot reach specified date
* @exception OrekitException if propagation cannot reach specified date
*/
protected SpacecraftState basicPropagate(final AbsoluteDate date) throws PropagationException {
protected SpacecraftState basicPropagate(final AbsoluteDate date) throws OrekitException {
try {
// evaluate orbit
......@@ -384,7 +379,7 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
return new SpacecraftState(orbit, attitude, getMass(date));
} catch (OrekitException oe) {
throw new PropagationException(oe);
throw new OrekitException(oe);
}
}
......@@ -452,12 +447,12 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
/** {@inheritDoc} */
protected Orbit propagateOrbit(final AbsoluteDate target)
throws PropagationException {
throws OrekitException {
return AbstractAnalyticalPropagator.this.propagateOrbit(target);
}
/** {@inheritDoc} */
public double getMass(final AbsoluteDate date) throws PropagationException {
public double getMass(final AbsoluteDate date) throws OrekitException {
return AbstractAnalyticalPropagator.this.getMass(date);
}
......@@ -468,18 +463,18 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
}
/** {@inheritDoc} */
public void resetInitialState(final SpacecraftState state) throws PropagationException {
public void resetInitialState(final SpacecraftState state) throws OrekitException {
AbstractAnalyticalPropagator.this.resetInitialState(state);
}
/** {@inheritDoc} */
protected void resetIntermediateState(final SpacecraftState state, final boolean forward)
throws PropagationException {
throws OrekitException {
AbstractAnalyticalPropagator.this.resetIntermediateState(state, forward);
}
/** {@inheritDoc} */
public SpacecraftState getInitialState() throws PropagationException {
public SpacecraftState getInitialState() throws OrekitException {
return AbstractAnalyticalPropagator.this.getInitialState();
}
......@@ -586,7 +581,7 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
/** {@inheritDoc} */
public SpacecraftState getInterpolatedState(final AbsoluteDate date)
throws PropagationException {
throws OrekitException {
// compute the basic spacecraft state
final SpacecraftState basicState = basicPropagate(date);
......
......@@ -24,7 +24,6 @@ import java.util.Map;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitExceptionWrapper;
import org.orekit.errors.OrekitMessages;
import org.orekit.errors.PropagationException;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
......@@ -111,30 +110,30 @@ public class AdapterPropagator extends AbstractAnalyticalPropagator {
}
/** {@inheritDoc} */
public SpacecraftState getInitialState() throws PropagationException {
public SpacecraftState getInitialState() throws OrekitException {
return reference.getInitialState();
}
/** {@inheritDoc} */
@Override
public void resetInitialState(final SpacecraftState state)
throws PropagationException {
throws OrekitException {
reference.resetInitialState(state);
}
/** {@inheritDoc} */
protected void resetIntermediateState(final SpacecraftState state, final boolean forward)
throws PropagationException {
throws OrekitException {
if (reference instanceof AbstractAnalyticalPropagator) {
((AbstractAnalyticalPropagator) reference).resetIntermediateState(state, forward);
} else {
throw new PropagationException(OrekitMessages.NON_RESETABLE_STATE);
throw new OrekitException(OrekitMessages.NON_RESETABLE_STATE);
}
}
/** {@inheritDoc} */
@Override
protected SpacecraftState basicPropagate(final AbsoluteDate date) throws PropagationException {
protected SpacecraftState basicPropagate(final AbsoluteDate date) throws OrekitException {
try {
// compute reference state
......@@ -156,30 +155,20 @@ public class AdapterPropagator extends AbstractAnalyticalPropagator {
return state;
} catch (OrekitExceptionWrapper oew) {
if (oew.getException() instanceof PropagationException) {
throw (PropagationException) oew.getException();
} else {
throw new PropagationException(oew.getException());
}
} catch (OrekitException oe) {
if (oe instanceof PropagationException) {
throw (PropagationException) oe;
} else {
throw new PropagationException(oe);
}
throw new OrekitException(oew.getException());
}
}
/** {@inheritDoc} */
protected Orbit propagateOrbit(final AbsoluteDate date)
throws PropagationException {
throws OrekitException {
return basicPropagate(date).getOrbit();
}
/** {@inheritDoc}*/
protected double getMass(final AbsoluteDate date)
throws PropagationException {
throws OrekitException {
return basicPropagate(date).getMass();
}
......
......@@ -28,7 +28,6 @@ import org.orekit.attitudes.AttitudeProvider;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
import org.orekit.errors.OrekitMessages;
import org.orekit.errors.PropagationException;
import org.orekit.frames.Frame;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.BoundedPropagator;
......@@ -129,34 +128,29 @@ public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPr
@Override
/** {@inheritDoc} */
public SpacecraftState basicPropagate(final AbsoluteDate date) throws PropagationException {
try {
final List<SpacecraftState> neighbors = cache.getNeighbors(date);
final SpacecraftState interpolatedState = neighbors.get(0).interpolate(date, neighbors);
public SpacecraftState basicPropagate(final AbsoluteDate date) throws OrekitException {
final List<SpacecraftState> neighbors = cache.getNeighbors(date);
final SpacecraftState interpolatedState = neighbors.get(0).interpolate(date, neighbors);
final AttitudeProvider attitudeProvider = this.getAttitudeProvider();
final AttitudeProvider attitudeProvider = this.getAttitudeProvider();
if (attitudeProvider == null) {
return interpolatedState;
}
else {
pvProvider.setCurrentState(interpolatedState);
final Attitude calculatedAttitude = attitudeProvider.getAttitude(pvProvider, date, interpolatedState.getFrame());
return new SpacecraftState(interpolatedState.getOrbit(), calculatedAttitude, interpolatedState.getMass());
}
} catch (OrekitException tce) {
throw new PropagationException(tce);
if (attitudeProvider == null) {
return interpolatedState;
}
else {
pvProvider.setCurrentState(interpolatedState);
final Attitude calculatedAttitude = attitudeProvider.getAttitude(pvProvider, date, interpolatedState.getFrame());
return new SpacecraftState(interpolatedState.getOrbit(), calculatedAttitude, interpolatedState.getMass());
}
}
/** {@inheritDoc} */
protected Orbit propagateOrbit(final AbsoluteDate date) throws PropagationException {
protected Orbit propagateOrbit(final AbsoluteDate date) throws OrekitException {
return basicPropagate(date).getOrbit();
}
/** {@inheritDoc} */
protected double getMass(final AbsoluteDate date) throws PropagationException {
protected double getMass(final AbsoluteDate date) throws OrekitException {
return basicPropagate(date).getMass();
}
......@@ -171,21 +165,21 @@ public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPr
* This method always throws an exception, as ephemerides cannot be reset.
* </p>
* @param state new initial state to consider
* @exception PropagationException always thrown as ephemerides cannot be reset
* @exception OrekitException always thrown as ephemerides cannot be reset
*/
public void resetInitialState(final SpacecraftState state)
throws PropagationException {
throw new PropagationException(OrekitMessages.NON_RESETABLE_STATE);
throws OrekitException {
throw new OrekitException(OrekitMessages.NON_RESETABLE_STATE);
}
/** {@inheritDoc} */
protected void resetIntermediateState(final SpacecraftState state, final boolean forward)
throws PropagationException {
throw new PropagationException(OrekitMessages.NON_RESETABLE_STATE);
throws OrekitException {
throw new OrekitException(OrekitMessages.NON_RESETABLE_STATE);
}
/** {@inheritDoc} */
public SpacecraftState getInitialState() throws PropagationException {
public SpacecraftState getInitialState() throws OrekitException {
return basicPropagate(getMinDate());
}
......
......@@ -25,7 +25,6 @@ import java.util.SortedSet;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
import org.orekit.errors.PropagationException;
import org.orekit.orbits.Orbit;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
......@@ -54,10 +53,10 @@ public class KeplerianPropagator extends AbstractAnalyticalPropagator implements
* for the initial orbit definition. Mass and attitude provider are set to
* unspecified non-null arbitrary values.</p>
* @param initialOrbit initial orbit
* @exception PropagationException if initial attitude cannot be computed
* @exception OrekitException if initial attitude cannot be computed
*/
public KeplerianPropagator(final Orbit initialOrbit)
throws PropagationException {
throws OrekitException {
this(initialOrbit, DEFAULT_LAW, initialOrbit.getMu(), DEFAULT_MASS);
}
......@@ -65,10 +64,10 @@ public class KeplerianPropagator extends AbstractAnalyticalPropagator implements
* <p>Mass and attitude provider are set to unspecified non-null arbitrary values.</p>
* @param initialOrbit initial orbit
* @param mu central attraction coefficient (m³/s²)
* @exception PropagationException if initial attitude cannot be computed
* @exception OrekitException if initial attitude cannot be computed
*/
public KeplerianPropagator(final Orbit initialOrbit, final double mu)
throws PropagationException {
throws OrekitException {
this(initialOrbit, DEFAULT_LAW, mu, DEFAULT_MASS);
}
......@@ -78,11 +77,11 @@ public class KeplerianPropagator extends AbstractAnalyticalPropagator implements
* non-null arbitrary value.</p>
* @param initialOrbit initial orbit
* @param attitudeProv attitude provider
* @exception PropagationException if initial attitude cannot be computed
* @exception OrekitException if initial attitude cannot be computed
*/
public KeplerianPropagator(final Orbit initialOrbit,
final AttitudeProvider attitudeProv)
throws PropagationException {
throws OrekitException {
this(initialOrbit, attitudeProv, initialOrbit.getMu(), DEFAULT_MASS);
}
......@@ -92,12 +91,12 @@ public class KeplerianPropagator extends AbstractAnalyticalPropagator implements
* @param initialOrbit initial orbit
* @param attitudeProv attitude provider
* @param mu central attraction coefficient (m³/s²)
* @exception PropagationException if initial attitude cannot be computed
* @exception OrekitException if initial attitude cannot be computed
*/
public KeplerianPropagator(final Orbit initialOrbit,
final AttitudeProvider attitudeProv,
final double mu)
throws PropagationException {
throws OrekitException {
this(initialOrbit, attitudeProv, mu, DEFAULT_MASS);
}
......@@ -107,45 +106,40 @@ public class KeplerianPropagator extends AbstractAnalyticalPropagator implements
* @param attitudeProv attitude provider
* @param mu central attraction coefficient (m³/s²)
* @param mass spacecraft mass (kg)
* @exception PropagationException if initial attitude cannot be computed
* @exception OrekitException if initial attitude cannot be computed
*/
public KeplerianPropagator(final Orbit initialOrbit, final AttitudeProvider attitudeProv,
final double mu, final double mass)
throws PropagationException {
throws OrekitException {
super(attitudeProv);
try {
// ensure the orbit use the specified mu
final OrbitType type = initialOrbit.getType();
final double[] stateVector = new double[6];
type.mapOrbitToArray(initialOrbit, PositionAngle.TRUE, stateVector);
final Orbit orbit = type.mapArrayToOrbit(stateVector, PositionAngle.TRUE,
initialOrbit.getDate(), mu, initialOrbit.getFrame());
resetInitialState(new SpacecraftState(orbit,
getAttitudeProvider().getAttitude(orbit,
orbit.getDate(),
orbit.getFrame()),
mass));
// ensure the orbit use the specified mu
final OrbitType type = initialOrbit.getType();
final double[] stateVector = new double[6];
type.mapOrbitToArray(initialOrbit, PositionAngle.TRUE, stateVector);
final Orbit orbit = type.mapArrayToOrbit(stateVector, PositionAngle.TRUE,
initialOrbit.getDate(), mu, initialOrbit.getFrame());
resetInitialState(new SpacecraftState(orbit,
getAttitudeProvider().getAttitude(orbit,
orbit.getDate(),
orbit.getFrame()),
mass));
} catch (OrekitException oe) {
throw new PropagationException