Commit 0b558c6b authored by Maxime Journot's avatar Maxime Journot

Checkstyle fixes.

parent 30a6758c
......@@ -164,7 +164,7 @@ public abstract class AbstractAnalyticalPropagator extends AbstractPropagator {
// accept the step, trigger events and step handlers
state = acceptStep(interpolator, target, epsilon);
// Update the potential changes in the spacecraft state due to the events
// especially the potential attitude transition
state = updateAdditionalStates(basicPropagate(state.getDate()));
......
......@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.hipparchus.exception.Localizable;
import org.hipparchus.exception.LocalizedCoreFormats;
import org.hipparchus.exception.MathIllegalArgumentException;
import org.hipparchus.util.FastMath;
......@@ -125,7 +124,7 @@ public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPr
}
pvProvider = new LocalPVProvider(states, interpolationPoints, extrapolationThreshold);
// user needs to explicitly set attitude provider if they want to use one
setAttitudeProvider(null);
......@@ -265,17 +264,27 @@ public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPr
/** Current state. */
private SpacecraftState currentState;
/** List of spacecraft states. */
private List<SpacecraftState> states;
/** Interpolation points number. */
private int interpolationPoints;
/** Extrapolation threshold. */
private double extrapolationThreshold;
public LocalPVProvider(final List<SpacecraftState> states, final int interpolationPoints,
/** Constructor.
* @param states list of spacecraft states
* @param interpolationPoints interpolation points number
* @param extrapolationThreshold extrapolation threshold value
*/
LocalPVProvider(final List<SpacecraftState> states, final int interpolationPoints,
final double extrapolationThreshold) {
this.states = states;
this.interpolationPoints = interpolationPoints;
this.extrapolationThreshold = extrapolationThreshold;
this.states = states;
this.interpolationPoints = interpolationPoints;
this.extrapolationThreshold = extrapolationThreshold;
}
/** Get the current state.
......@@ -298,11 +307,10 @@ public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPr
final double closeEnoughTimeInSec = 1e-9;
if (FastMath.abs(dt) > closeEnoughTimeInSec) {
// used in case of attitude transition, the attitude computed is not at the current date.
Ephemeris ephemeris = new Ephemeris(states, interpolationPoints, extrapolationThreshold);
return ephemeris.getPVCoordinates(date, f);
// used in case of attitude transition, the attitude computed is not at the current date.
final Ephemeris ephemeris = new Ephemeris(states, interpolationPoints, extrapolationThreshold);
return ephemeris.getPVCoordinates(date, f);
}
return currentState.getPVCoordinates(f);
......
......@@ -17,7 +17,6 @@
package org.orekit.propagation.events;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.ode.events.Action;
import org.orekit.frames.Frame;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.handlers.EventHandler;
......
......@@ -23,7 +23,6 @@ import java.util.List;
import org.hipparchus.RealFieldElement;
import org.hipparchus.ode.events.Action;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.events.FieldEventDetector;
......
......@@ -16,7 +16,6 @@
*/
package org.orekit.propagation.analytical;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
......@@ -36,8 +35,6 @@ import org.orekit.attitudes.AttitudesSequence;
import org.orekit.attitudes.CelestialBodyPointed;
import org.orekit.attitudes.LofOffset;
import org.orekit.bodies.CelestialBodyFactory;
import org.orekit.data.DataProvidersManager;
import org.orekit.data.DirectoryCrawler;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.errors.TimeStampedCacheException;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment