diff --git a/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java b/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java index da495fe8d1e4f45980578833d68f74bc3dfe0ab0..bea9eb7bb9c3f147bf4cb4f9bf84012876a02e77 100644 --- a/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java +++ b/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java @@ -25,13 +25,11 @@ import java.util.Map; import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum; import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem; -import org.orekit.errors.OrekitException; +import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; -import org.orekit.rugged.adjustment.measurements.Observables; /** Create adjustment context for viewing model refining. * @author Lucie LabatAllee diff --git a/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java index f816658ff512e64ca5b1e6c7ecfc821dd6fa96df..dcbec62dc43710fe6bec050dd1c0a40a2801048a 100644 --- a/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java @@ -38,7 +38,6 @@ import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index e0bd10cbf15f9e842d538e7371bf1ec941bb35dd..10c3af12d36f91fa8ffab48eaf5a93c198e7a8e0 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -1169,9 +1169,9 @@ public class Rugged { /** Get a sensor. * @param sensorName sensor name * @return selected sensor - * @exception RuggedException if sensor is not known */ public LineSensor getLineSensor(final String sensorName) { + final LineSensor sensor = sensors.get(sensorName); if (sensor == null) { throw new RuggedException(RuggedMessages.UNKNOWN_SENSOR, sensorName); diff --git a/src/main/java/org/orekit/rugged/api/RuggedBuilder.java b/src/main/java/org/orekit/rugged/api/RuggedBuilder.java index e1351a3ad3acb26879f2e03277eb0a741cb011cf..7b8eac7d3eab4aa1a0c4f68d3ef669743bdd4a06 100644 --- a/src/main/java/org/orekit/rugged/api/RuggedBuilder.java +++ b/src/main/java/org/orekit/rugged/api/RuggedBuilder.java @@ -29,7 +29,6 @@ import org.hipparchus.exception.LocalizedCoreFormats; import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.orekit.bodies.OneAxisEllipsoid; -import org.orekit.errors.OrekitException; import org.orekit.frames.Frame; import org.orekit.frames.FramesFactory; import org.orekit.propagation.Propagator; @@ -575,8 +574,6 @@ public class RuggedBuilder { * @param storageStream stream from where to read previous instance {@link #storeInterpolator(OutputStream) * stored interpolator} (caller opened it and remains responsible for closing it) * @return the builder instance - * @exception RuggedException if storage stream cannot be parsed - * or if frames do not match the ones referenced in the storage stream * @see #setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter) * @see #setTrajectory(Frame, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter) * @see #setTrajectory(double, int, CartesianDerivativesFilter, AngularDerivativesFilter, Propagator) @@ -625,7 +622,6 @@ public class RuggedBuilder { * </p> * @param storageStream stream where to store the interpolator * (caller opened it and remains responsible for closing it) - * @exception RuggedException if interpolator cannot be written to stream * @see #setEllipsoid(EllipsoidId, BodyRotatingFrameId) * @see #setEllipsoid(OneAxisEllipsoid) * @see #setTrajectory(InertialFrameId, List, int, CartesianDerivativesFilter, List, int, AngularDerivativesFilter) @@ -643,21 +639,17 @@ public class RuggedBuilder { } /** Check frames consistency. - * @exception RuggedException if frames have been set both by direct calls and by - * deserializing an interpolator dump and a mismatch occurs */ private void checkFramesConsistency() { if (ellipsoid != null && scToBody != null && !ellipsoid.getBodyFrame().getName().equals(scToBody.getBodyFrame().getName())) { + // if frames have been set both by direct calls and by deserializing an interpolator dump and a mismatch occurs throw new RuggedException(RuggedMessages.FRAMES_MISMATCH_WITH_INTERPOLATOR_DUMP, ellipsoid.getBodyFrame().getName(), scToBody.getBodyFrame().getName()); } } /** Create a transform interpolator if needed. - * @exception RuggedException if data needed for some frame cannot be loaded or if position - * or attitude samples do not fully cover the [{@code minDate}, {@code maxDate}] search time span, - * or propagator fails. */ private void createInterpolatorIfNeeded() { @@ -972,8 +964,6 @@ public class RuggedBuilder { /** Build a {@link Rugged} instance. * @return built instance - * @exception RuggedException if the builder is not properly configured - * or if some internal elements cannot be built (frames, ephemerides, ...) */ public Rugged build() { diff --git a/src/main/java/org/orekit/rugged/errors/DumpManager.java b/src/main/java/org/orekit/rugged/errors/DumpManager.java index d351d511fc444e7fd0dd2bda741a07afa606758c..a63a0a1053188d7291521184cc684b1c011f08fa 100644 --- a/src/main/java/org/orekit/rugged/errors/DumpManager.java +++ b/src/main/java/org/orekit/rugged/errors/DumpManager.java @@ -56,8 +56,6 @@ public class DumpManager { /** Activate debug dump. * @param file dump file - * @exception RuggedException if debug dump is already active for this thread - * or if debug file cannot be opened */ public static void activate(final File file) { if (isActive()) { @@ -73,7 +71,6 @@ public class DumpManager { } /** Deactivate debug dump. - * @exception RuggedException if debug dump is already active for this thread */ public static void deactivate() { if (isActive()) { diff --git a/src/main/java/org/orekit/rugged/errors/DumpReplayer.java b/src/main/java/org/orekit/rugged/errors/DumpReplayer.java index c8a7cb22dee8364949937e5fd94c9cd3c08c5516..085abcf85129c9d1309753c832caa8aa897af130 100644 --- a/src/main/java/org/orekit/rugged/errors/DumpReplayer.java +++ b/src/main/java/org/orekit/rugged/errors/DumpReplayer.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -45,7 +45,6 @@ import org.hipparchus.util.OpenIntToDoubleHashMap; import org.hipparchus.util.Pair; import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; -import org.orekit.errors.OrekitException; import org.orekit.frames.Frame; import org.orekit.frames.FramesFactory; import org.orekit.frames.Predefined; @@ -271,7 +270,6 @@ public class DumpReplayer { /** Parse a dump file. * @param file dump file to parse - * @exception RuggedException if file cannot be parsed */ public void parse(final File file) { try { @@ -289,7 +287,6 @@ public class DumpReplayer { /** Create a Rugged instance from parsed data. * @return rugged instance - * @exception RuggedException if some data are inconsistent or incomplete */ public Rugged createRugged() { try { diff --git a/src/main/java/org/orekit/rugged/errors/RuggedException.java b/src/main/java/org/orekit/rugged/errors/RuggedException.java index 7f3a09f07c563aedd304d515fcd7b1d4effaaa76..d4a6059deef7bd390ae918aae98f87e1ff1ee581 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedException.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedException.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java index 34515e6b69ee46675b7462a1fe189c69c63aca15..63467a7e431e8c4fecfc58db0c3a349516965410 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java index 0ff212288f96bae6ef1303f6ffbe2c3f61d35370..c32a9fb9949735f3ffc51f9f88788c735c3d78b2 100644 --- a/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -16,16 +16,14 @@ */ package org.orekit.rugged.intersection; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.util.FastMath; import java.util.ArrayList; import java.util.List; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; -import org.orekit.errors.OrekitException; import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.errors.DumpManager; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.raster.SimpleTile; import org.orekit.rugged.raster.SimpleTileFactory; import org.orekit.rugged.raster.Tile; diff --git a/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java index af339229303208491cf83d3d975f30c261d9b910..e7a77fd1f7b08bf9a964061352ea80f394494851 100644 --- a/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -18,10 +18,8 @@ package org.orekit.rugged.intersection; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.orekit.bodies.GeodeticPoint; -import org.orekit.errors.OrekitException; import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.errors.DumpManager; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.ExtendedEllipsoid; import org.orekit.rugged.utils.NormalizedGeodeticPoint; diff --git a/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java index 8c03e200c76b88e413b19851541bbc4ff0be5721..7c3e6587f5ee301faf4edb0b5467acf5be21ae5f 100644 --- a/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java @@ -19,7 +19,6 @@ package org.orekit.rugged.intersection; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.errors.DumpManager; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.ExtendedEllipsoid; import org.orekit.rugged.utils.NormalizedGeodeticPoint; diff --git a/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java index e3e00c4c413858ec35875bf8d1717dc3e4e015e7..41f67a3686c23a3cffe47c77c83d5aa9b9aa6ba9 100644 --- a/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java @@ -17,7 +17,7 @@ package org.orekit.rugged.intersection; import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.orekit.rugged.errors.RuggedException; +import org.orekit.bodies.GeodeticPoint; import org.orekit.rugged.utils.ExtendedEllipsoid; import org.orekit.rugged.utils.NormalizedGeodeticPoint; diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java index f76e6b76917dab541de38d80e6e58940defcaade..b88a52f0e066a5fbf091525b93a287a1df369800 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -19,7 +19,6 @@ package org.orekit.rugged.intersection.duvenhage; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; -import org.orekit.errors.OrekitException; import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.RuggedException; diff --git a/src/main/java/org/orekit/rugged/linesensor/LineSensor.java b/src/main/java/org/orekit/rugged/linesensor/LineSensor.java index 132f0631fefc9e39eaa7ad631b39213cec918b98..abecdad9bd7aeb24b106cc0644b08eac87da6c33 100644 --- a/src/main/java/org/orekit/rugged/linesensor/LineSensor.java +++ b/src/main/java/org/orekit/rugged/linesensor/LineSensor.java @@ -23,7 +23,6 @@ import org.hipparchus.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; import org.orekit.rugged.errors.DumpManager; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.los.TimeDependentLOS; import org.orekit.rugged.utils.DSGenerator; import org.orekit.time.AbsoluteDate; @@ -101,7 +100,6 @@ public class LineSensor { * @param date current date * @param i pixel index (must be between 0 and {@link #getNbPixels()} - 1 * @return pixel normalized line-of-sight - * @exception RuggedException if date cannot be handled * @since 2.0 */ public Vector3D getLOS(final AbsoluteDate date, final double i) { diff --git a/src/main/java/org/orekit/rugged/los/FixedRotation.java b/src/main/java/org/orekit/rugged/los/FixedRotation.java index 8f79e7ab37ba1182d44cfef5fe833522f8b125b1..0035ae8997cb3b97794583d898404f359a7469ca 100644 --- a/src/main/java/org/orekit/rugged/los/FixedRotation.java +++ b/src/main/java/org/orekit/rugged/los/FixedRotation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -25,8 +25,6 @@ import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; -import org.orekit.errors.OrekitException; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.DSGenerator; import org.orekit.utils.ParameterDriver; import org.orekit.utils.ParameterObserver; diff --git a/src/main/java/org/orekit/rugged/los/FixedZHomothety.java b/src/main/java/org/orekit/rugged/los/FixedZHomothety.java index 429da97cba1cd6e0bee471b3ab1482a7edb9e32b..a00406aecda658853a404bd445f9203eedfbd4b4 100644 --- a/src/main/java/org/orekit/rugged/los/FixedZHomothety.java +++ b/src/main/java/org/orekit/rugged/los/FixedZHomothety.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -22,8 +22,6 @@ import org.hipparchus.analysis.differentiation.DerivativeStructure; import org.hipparchus.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; -import org.orekit.errors.OrekitException; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.DSGenerator; import org.orekit.utils.ParameterDriver; import org.orekit.utils.ParameterObserver; diff --git a/src/main/java/org/orekit/rugged/los/LOSBuilder.java b/src/main/java/org/orekit/rugged/los/LOSBuilder.java index 57e630b2f393e5dd81b351d31171697678fc616e..66daf936e0c1278eb6927c2481a7b20c77e707dc 100644 --- a/src/main/java/org/orekit/rugged/los/LOSBuilder.java +++ b/src/main/java/org/orekit/rugged/los/LOSBuilder.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -24,8 +24,6 @@ import java.util.stream.Stream; import org.hipparchus.analysis.differentiation.DerivativeStructure; import org.hipparchus.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.orekit.errors.OrekitException; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.DSGenerator; import org.orekit.time.AbsoluteDate; import org.orekit.utils.ParameterDriver; diff --git a/src/main/java/org/orekit/rugged/los/PolynomialRotation.java b/src/main/java/org/orekit/rugged/los/PolynomialRotation.java index d7c6e965a13389e92d0f9f4926d39dfc25fa283b..80c2fb582495407c4fea1e7307f7bd8856bdc2fc 100644 --- a/src/main/java/org/orekit/rugged/los/PolynomialRotation.java +++ b/src/main/java/org/orekit/rugged/los/PolynomialRotation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -26,8 +26,6 @@ import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; -import org.orekit.errors.OrekitException; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.DSGenerator; import org.orekit.time.AbsoluteDate; import org.orekit.utils.ParameterDriver; diff --git a/src/main/java/org/orekit/rugged/raster/Tile.java b/src/main/java/org/orekit/rugged/raster/Tile.java index 2756ac0c40c3f3f3d733cd5f8d5650efb4c7dafd..81de1b64976bb0be5b35b114c9b8761eac39d66f 100644 --- a/src/main/java/org/orekit/rugged/raster/Tile.java +++ b/src/main/java/org/orekit/rugged/raster/Tile.java @@ -18,7 +18,6 @@ package org.orekit.rugged.raster; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.orekit.bodies.GeodeticPoint; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.utils.NormalizedGeodeticPoint; /** Interface representing a raster tile. @@ -238,10 +237,8 @@ public interface Tile extends UpdatableTile { * @param latitudeIndex grid point index along latitude * @param longitudeIndex grid point index along longitude * @return elevation at grid point - * @exception RuggedException if indices are out of bound */ - double getElevationAtIndices(int latitudeIndex, int longitudeIndex) - throws RuggedException; + double getElevationAtIndices(int latitudeIndex, int longitudeIndex); /** Interpolate elevation. * <p> @@ -255,10 +252,8 @@ public interface Tile extends UpdatableTile { * @param latitude ground point latitude * @param longitude ground point longitude * @return interpolated elevation - * @exception RuggedException if point is farthest from the tile than the tolerance */ - double interpolateElevation(double latitude, double longitude) - throws RuggedException; + double interpolateElevation(double latitude, double longitude); /** Find the intersection of a line-of-sight and a Digital Elevation Model cell. * @param p point on the line @@ -268,11 +263,9 @@ public interface Tile extends UpdatableTile { * @param longitudeIndex longitude index of the Digital Elevation Model cell * @return point corresponding to line-of-sight crossing the Digital Elevation Model surface * if it lies within the cell, null otherwise - * @exception RuggedException if intersection point cannot be computed */ NormalizedGeodeticPoint cellIntersection(GeodeticPoint p, Vector3D los, - int latitudeIndex, int longitudeIndex) - throws RuggedException; + int latitudeIndex, int longitudeIndex); /** Check if a tile covers a ground point. * @param latitude ground point latitude diff --git a/src/main/java/org/orekit/rugged/raster/TileUpdater.java b/src/main/java/org/orekit/rugged/raster/TileUpdater.java index c76c96a8e138fa53bc4a3efb996a087201f8202c..089a08853f3e7cddd9b05b6a16acfe1f18b72a71 100644 --- a/src/main/java/org/orekit/rugged/raster/TileUpdater.java +++ b/src/main/java/org/orekit/rugged/raster/TileUpdater.java @@ -16,8 +16,6 @@ */ package org.orekit.rugged.raster; -import org.orekit.rugged.errors.RuggedException; - /** Interface used to update Digital Elevation Model tiles. * <p> * Implementations of this interface are must be provided by @@ -80,9 +78,7 @@ public interface TileUpdater { * @param latitude latitude that must be covered by the tile (rad) * @param longitude longitude that must be covered by the tile (rad) * @param tile to update - * @exception RuggedException if tile cannot be updated */ - void updateTile(double latitude, double longitude, UpdatableTile tile) - throws RuggedException; + void updateTile(double latitude, double longitude, UpdatableTile tile); } diff --git a/src/main/java/org/orekit/rugged/raster/TilesCache.java b/src/main/java/org/orekit/rugged/raster/TilesCache.java index 11712412ffd77cb867ad05b306b74fa750f0fbde..c970779d4aedb0708997e5c463ea84a01f863b22 100644 --- a/src/main/java/org/orekit/rugged/raster/TilesCache.java +++ b/src/main/java/org/orekit/rugged/raster/TilesCache.java @@ -57,10 +57,8 @@ public class TilesCache<T extends Tile> { * @param latitude ground point latitude * @param longitude ground point longitude * @return tile covering the ground point - * @exception RuggedException if newly created tile cannot be updated */ - public T getTile(final double latitude, final double longitude) - throws RuggedException { + public T getTile(final double latitude, final double longitude) { for (int i = 0; i < tiles.length; ++i) { final T tile = tiles[i]; diff --git a/src/main/java/org/orekit/rugged/raster/UpdatableTile.java b/src/main/java/org/orekit/rugged/raster/UpdatableTile.java index 606aec1b744a98580d878e8db8d3698223f1afa5..4f5dbc9b38af4dc67abab380f145bef3a46c08da 100644 --- a/src/main/java/org/orekit/rugged/raster/UpdatableTile.java +++ b/src/main/java/org/orekit/rugged/raster/UpdatableTile.java @@ -16,8 +16,6 @@ */ package org.orekit.rugged.raster; -import org.orekit.rugged.errors.RuggedException; - /** Interface representing one tile of a raster Digital Elevation Model. * @author Luc Maisonobe * @author Guylaine Prat @@ -31,12 +29,10 @@ public interface UpdatableTile { * @param longitudeStep step in longitude (size of one raster element) (rad) * @param latitudeRows number of latitude rows * @param longitudeColumns number of longitude columns - * @exception RuggedException if tile is empty (zero rows or columns) */ void setGeometry(double minLatitude, double minLongitude, double latitudeStep, double longitudeStep, - int latitudeRows, int longitudeColumns) - throws RuggedException; + int latitudeRows, int longitudeColumns); /** Set the elevation for one raster element. * <p> @@ -52,9 +48,7 @@ public interface UpdatableTile { * @param latitudeIndex index of latitude (row index) * @param longitudeIndex index of longitude (column index) * @param elevation elevation (m) - * @exception RuggedException if indices are out of bound */ - void setElevation(int latitudeIndex, int longitudeIndex, double elevation) - throws RuggedException; + void setElevation(int latitudeIndex, int longitudeIndex, double elevation); } diff --git a/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java b/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java index 0ca61c4d0aa39c6a6234672abbf39112c2b4deb6..257eec8b238b7b8981819d1dca1cb41ec5b22205 100644 --- a/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java +++ b/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java @@ -74,9 +74,8 @@ public class AtmosphericComputationParameters { * @param sensor line sensor * @param minLine min line defined for the inverse location * @param maxLine max line defined for the inverse location - * @throws RuggedException if invalid range for lines */ - public void configureCorrectionGrid(final LineSensor sensor, final int minLine, final int maxLine) throws RuggedException { + public void configureCorrectionGrid(final LineSensor sensor, final int minLine, final int maxLine) { // Keep information about the sensor and the required search lines. // Needed to test if the grid is initialized with this context. @@ -110,9 +109,8 @@ public class AtmosphericComputationParameters { * Overwrite the default values, for time optimization if necessary. * @param gridPixelStep grid pixel step for the inverse location computation * @param gridLineStep grid line step for the inverse location computation - * @throws RuggedException if invalid steps */ - public void setGridSteps(final int gridPixelStep, final int gridLineStep) throws RuggedException { + public void setGridSteps(final int gridPixelStep, final int gridLineStep) { if (gridPixelStep <= 0) { final String reason = " pixelStep <= 0"; diff --git a/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java b/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java index 961db64f65087e2ef0f5940f8e7c2713b4f67598..af4ea0bf07ef81136e4fc847f34d1bef50a18f6d 100644 --- a/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java +++ b/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java @@ -74,13 +74,11 @@ public abstract class AtmosphericRefraction { * @param rawIntersection intersection point before refraction correction * @param algorithm intersection algorithm * @return corrected point with the effect of atmospheric refraction - * @throws RuggedException if there is no refraction data at altitude of rawIntersection or see * {@link org.orekit.rugged.utils.ExtendedEllipsoid#pointAtAltitude(Vector3D, Vector3D, double)} or see * {@link org.orekit.rugged.intersection.IntersectionAlgorithm#refineIntersection(org.orekit.rugged.utils.ExtendedEllipsoid, Vector3D, Vector3D, NormalizedGeodeticPoint)} */ public abstract NormalizedGeodeticPoint applyCorrection(Vector3D satPos, Vector3D satLos, NormalizedGeodeticPoint rawIntersection, - IntersectionAlgorithm algorithm) - throws RuggedException; + IntersectionAlgorithm algorithm); /** Apply correction to the intersected point with an atmospheric refraction model, * using a time optimized algorithm. @@ -91,15 +89,13 @@ public abstract class AtmosphericRefraction { * @param rawIntersection intersection point before refraction correction * @param algorithm intersection algorithm * @return corrected point with the effect of atmospheric refraction - * @throws RuggedException if there is no refraction data at altitude of rawIntersection or see * {@link org.orekit.rugged.utils.ExtendedEllipsoid#pointAtAltitude(Vector3D, Vector3D, double)} or see * {@link org.orekit.rugged.intersection.IntersectionAlgorithm#refineIntersection(org.orekit.rugged.utils.ExtendedEllipsoid, Vector3D, Vector3D, NormalizedGeodeticPoint)} * @since 3.0 */ public abstract NormalizedGeodeticPoint applyCorrection(LineSensor lineSensor, SensorPixel sensorPixel, Vector3D satPos, Vector3D satLos, NormalizedGeodeticPoint rawIntersection, - IntersectionAlgorithm algorithm) - throws RuggedException; + IntersectionAlgorithm algorithm); /** Deactivate computation (needed for the inverse location computation). * @since 3.0 @@ -136,9 +132,8 @@ public abstract class AtmosphericRefraction { * @param sensor line sensor * @param minLine min line defined for the inverse location * @param maxLine max line defined for the inverse location - * @throws RuggedException if invalid range for lines */ - public void configureCorrectionGrid(final LineSensor sensor, final int minLine, final int maxLine) throws RuggedException { + public void configureCorrectionGrid(final LineSensor sensor, final int minLine, final int maxLine) { atmosphericParams.configureCorrectionGrid(sensor, minLine, maxLine); } @@ -167,9 +162,8 @@ public abstract class AtmosphericRefraction { * Overwrite the default values, for time optimization for instance. * @param pixelStep pixel step for the inverse location computation * @param lineStep line step for the inverse location computation - * @throws RuggedException if invalid steps */ - public void setGridSteps(final int pixelStep, final int lineStep) throws RuggedException { + public void setGridSteps(final int pixelStep, final int lineStep) { atmosphericParams.setGridSteps(pixelStep, lineStep); } @@ -180,9 +174,8 @@ public abstract class AtmosphericRefraction { * The bilinear interpolating functions are then computed for pixel and for line. * Need to be computed only once for a given sensor with the same minLine and maxLine. * @param sensorPixelGridInverseWithout inverse location grid WITHOUT atmospheric refraction - * @throws RuggedException if invalid range for lines */ - public void computeGridCorrectionFunctions(final SensorPixel[][] sensorPixelGridInverseWithout) throws RuggedException { + public void computeGridCorrectionFunctions(final SensorPixel[][] sensorPixelGridInverseWithout) { // Compute for a sensor grid, the associated ground grid, WITH atmospheric effect // (for interpolations we need a regular grid) diff --git a/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java b/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java index db8bd800f1b2905fa01c4ca217ab6ad1f5cbeedc..7b8b7f1463ab132a273842b2dece9be13bf49584 100644 --- a/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java +++ b/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java @@ -54,9 +54,8 @@ public class MultiLayerModel extends AtmosphericRefraction { * This model uses a built-in set of layers. * </p> * @param ellipsoid the ellipsoid to be used. - * @throws RuggedException if problem at layers construction */ - public MultiLayerModel(final ExtendedEllipsoid ellipsoid) throws RuggedException { + public MultiLayerModel(final ExtendedEllipsoid ellipsoid) { super(); @@ -86,10 +85,8 @@ public class MultiLayerModel extends AtmosphericRefraction { /** Simple constructor. * @param ellipsoid the ellipsoid to be used. * @param refractionLayers the refraction layers to be used with this model (layers can be in any order). - * @throws RuggedException if problem at layers construction */ - public MultiLayerModel(final ExtendedEllipsoid ellipsoid, final List<ConstantRefractionLayer> refractionLayers) - throws RuggedException { + public MultiLayerModel(final ExtendedEllipsoid ellipsoid, final List<ConstantRefractionLayer> refractionLayers) { super(); // at this stage no optimization is set up: no optimization grid is defined @@ -110,12 +107,11 @@ public class MultiLayerModel extends AtmosphericRefraction { * @param satLos satellite line of sight, in body frame * @param rawIntersection intersection point without refraction correction * @return the intersection position and LOS with the lowest atmospheric layer - * @throws RuggedException if no layer data at asked altitude * @since 3.0 */ private IntersectionLOS computeToLowestAtmosphereLayer( final Vector3D satPos, final Vector3D satLos, - final NormalizedGeodeticPoint rawIntersection) throws RuggedException { + final NormalizedGeodeticPoint rawIntersection) { if (rawIntersection.getAltitude() < atmosphereLowestAltitude) { throw new RuggedException(RuggedMessages.NO_LAYER_DATA, rawIntersection.getAltitude(), @@ -241,7 +237,7 @@ public class MultiLayerModel extends AtmosphericRefraction { public NormalizedGeodeticPoint applyCorrection(final Vector3D satPos, final Vector3D satLos, final NormalizedGeodeticPoint rawIntersection, final IntersectionAlgorithm algorithm) - throws RuggedException { + { final IntersectionLOS intersectionLOS = computeToLowestAtmosphereLayer(satPos, satLos, rawIntersection); final Vector3D pos = intersectionLOS.getIntersectionPos(); @@ -258,8 +254,7 @@ public class MultiLayerModel extends AtmosphericRefraction { public NormalizedGeodeticPoint applyCorrection(final LineSensor lineSensor, final SensorPixel sensorPixel, final Vector3D satPos, final Vector3D satLos, final NormalizedGeodeticPoint rawIntersection, - final IntersectionAlgorithm algorithm) - throws RuggedException { + final IntersectionAlgorithm algorithm) { // TODO to be done throw new RuggedException(RuggedMessages.UNINITIALIZED_CONTEXT, "Atmospheric optimization for direct loc"); diff --git a/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java b/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java index 81b8a8d7b133fee56b543bc5e861b859575d815a..c95060af412879694c41f11dc8904cd92700bb81 100644 --- a/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java +++ b/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -22,7 +22,6 @@ import org.hipparchus.util.FastMath; import org.hipparchus.util.MathArrays; import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; -import org.orekit.errors.OrekitException; import org.orekit.frames.Frame; import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.RuggedException; @@ -68,8 +67,7 @@ public class ExtendedEllipsoid extends OneAxisEllipsoid { /** {@inheritDoc} */ @Override - public GeodeticPoint transform(final Vector3D point, final Frame frame, final AbsoluteDate date) - throws OrekitException { + public GeodeticPoint transform(final Vector3D point, final Frame frame, final AbsoluteDate date) { DumpManager.dumpEllipsoid(this); return super.transform(point, frame, date); } @@ -82,11 +80,9 @@ public class ExtendedEllipsoid extends OneAxisEllipsoid { * when there are two points at the desired latitude along the line, it should * be close to los surface intersection (m) * @return point at latitude (m) - * @exception RuggedException if no such point exists */ public Vector3D pointAtLatitude(final Vector3D position, final Vector3D los, - final double latitude, final Vector3D closeReference) - throws RuggedException { + final double latitude, final Vector3D closeReference) { DumpManager.dumpEllipsoid(this); @@ -165,10 +161,8 @@ public class ExtendedEllipsoid extends OneAxisEllipsoid { * @param los pixel line-of-sight, not necessarily normalized (in body frame) * @param longitude longitude with respect to ellipsoid (rad) * @return point at longitude (m) - * @exception RuggedException if no such point exists */ - public Vector3D pointAtLongitude(final Vector3D position, final Vector3D los, final double longitude) - throws RuggedException { + public Vector3D pointAtLongitude(final Vector3D position, final Vector3D los, final double longitude) { DumpManager.dumpEllipsoid(this); @@ -307,11 +301,9 @@ public class ExtendedEllipsoid extends OneAxisEllipsoid { * @param centralLongitude reference longitude lc such that the point longitude will * be normalized between lc-π and lc+π (rad) * @return point at the same location but as a surface-relative point - * @exception OrekitException if point cannot be converted to body frame */ public NormalizedGeodeticPoint transform(final Vector3D point, final Frame frame, final AbsoluteDate date, - final double centralLongitude) - throws OrekitException { + final double centralLongitude) { final GeodeticPoint gp = transform(point, frame, date); return new NormalizedGeodeticPoint(gp.getLatitude(), gp.getLongitude(), gp.getAltitude(), centralLongitude); diff --git a/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java b/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java index 300ab31de5ed20c9f0246dc67cac82d5acdba952..a47cf4c55b230ed0f06ea9d6026c916ca87925cd 100644 --- a/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java +++ b/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -16,14 +16,13 @@ */ package org.orekit.rugged.utils; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.util.FastMath; import java.util.ArrayList; import java.util.List; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; -import org.orekit.errors.OrekitException; import org.orekit.frames.Frame; import org.orekit.frames.Transform; import org.orekit.time.AbsoluteDate; @@ -64,11 +63,9 @@ public class RoughVisibilityEstimator { * @param ellipsoid ground ellipsoid * @param frame frame in which position and velocity are defined (may be inertial or body frame) * @param positionsVelocities satellite position and velocity (m and m/s in specified frame) - * @exception OrekitException if position-velocity cannot be converted to body frame */ public RoughVisibilityEstimator(final OneAxisEllipsoid ellipsoid, final Frame frame, - final List<TimeStampedPVCoordinates> positionsVelocities) - throws OrekitException { + final List<TimeStampedPVCoordinates> positionsVelocities) { this.ellipsoid = ellipsoid; diff --git a/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java b/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java index 0ffb747903c3bee641337e0a5685e7c29feb4ab4..3d4c61ba5da51e488c75655998db0ac7b52246d6 100644 --- a/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java +++ b/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -16,13 +16,12 @@ */ package org.orekit.rugged.utils; -import org.hipparchus.util.FastMath; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import org.orekit.errors.OrekitException; +import org.hipparchus.util.FastMath; import org.orekit.frames.Frame; import org.orekit.frames.Transform; import org.orekit.rugged.errors.DumpManager; @@ -253,30 +252,24 @@ public class SpacecraftToObservedBody implements Serializable { /** Get transform from spacecraft to inertial frame. * @param date date of the transform * @return transform from spacecraft to inertial frame - * @exception RuggedException if frames cannot be computed at date */ - public Transform getScToInertial(final AbsoluteDate date) - throws RuggedException { + public Transform getScToInertial(final AbsoluteDate date) { return interpolate(date, scToInertial); } /** Get transform from inertial frame to observed body frame. * @param date date of the transform * @return transform from inertial frame to observed body frame - * @exception RuggedException if frames cannot be computed at date */ - public Transform getInertialToBody(final AbsoluteDate date) - throws RuggedException { + public Transform getInertialToBody(final AbsoluteDate date) { return interpolate(date, inertialToBody); } /** Get transform from observed body frame to inertial frame. * @param date date of the transform * @return transform from observed body frame to inertial frame - * @exception RuggedException if frames cannot be computed at date */ - public Transform getBodyToInertial(final AbsoluteDate date) - throws RuggedException { + public Transform getBodyToInertial(final AbsoluteDate date) { return interpolate(date, bodyToInertial); } @@ -284,10 +277,8 @@ public class SpacecraftToObservedBody implements Serializable { * @param date date of the transform * @param list transforms list to interpolate from * @return interpolated transform - * @exception RuggedException if frames cannot be computed at date */ - private Transform interpolate(final AbsoluteDate date, final List<Transform> list) - throws RuggedException { + private Transform interpolate(final AbsoluteDate date, final List<Transform> list) { // check date range if (!isInRange(date)) { diff --git a/src/test/java/org/orekit/rugged/TestUtils.java b/src/test/java/org/orekit/rugged/TestUtils.java index 39e8ea6d5b9bcf5f3a37d5c92fff65607e4624f2..fbef4fc39c451a0a7dee6a71c5f84b7b592ee314 100644 --- a/src/test/java/org/orekit/rugged/TestUtils.java +++ b/src/test/java/org/orekit/rugged/TestUtils.java @@ -17,13 +17,6 @@ package org.orekit.rugged; -import org.hipparchus.geometry.euclidean.threed.Rotation; -import org.hipparchus.geometry.euclidean.threed.RotationConvention; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.ode.nonstiff.DormandPrince853Integrator; -import org.hipparchus.util.FastMath; -import org.junit.Assert; - import static org.junit.Assert.assertEquals; import java.lang.reflect.Field; @@ -32,6 +25,12 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import org.hipparchus.geometry.euclidean.threed.Rotation; +import org.hipparchus.geometry.euclidean.threed.RotationConvention; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.ode.nonstiff.DormandPrince853Integrator; +import org.hipparchus.util.FastMath; +import org.junit.Assert; import org.orekit.attitudes.AttitudeProvider; import org.orekit.attitudes.NadirPointing; import org.orekit.attitudes.YawCompensation; @@ -40,7 +39,6 @@ import org.orekit.bodies.CelestialBodyFactory; import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; import org.orekit.data.DataProvidersManager; -import org.orekit.errors.OrekitException; import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel; import org.orekit.forces.gravity.ThirdBodyAttraction; import org.orekit.forces.gravity.potential.GravityFieldFactory; diff --git a/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java b/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java index e897ecdf4e08657aa84d51c6770ffd85af56a827..f7dd7482390a818f4e373bf932c329ec84f03558 100644 --- a/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java @@ -62,7 +62,7 @@ public class AdjustmentContextTest { } @Test - public void testAdjustmentContext() throws RuggedException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + public void testAdjustmentContext() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { AdjustmentContext adjustmentContext = new AdjustmentContext(ruggedList, measurements); @@ -86,7 +86,7 @@ public class AdjustmentContextTest { } @Test - public void testEstimateFreeParameters() throws RuggedException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + public void testEstimateFreeParameters() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { AdjustmentContext adjustmentContext = new AdjustmentContext(ruggedList, measurements); diff --git a/src/test/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilderTest.java b/src/test/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilderTest.java index 00e50fab525e8d7ec374733a73a9089ce0f93c76..be7ad216ab106c087b5f667347871894ea5b57a0 100644 --- a/src/test/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilderTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilderTest.java @@ -1,7 +1,6 @@ package org.orekit.rugged.adjustment; import java.lang.reflect.Field; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -11,14 +10,11 @@ import java.util.Map.Entry; import java.util.Set; import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum; - import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; - import org.orekit.bodies.GeodeticPoint; -import org.orekit.errors.OrekitException; import org.orekit.rugged.TestUtils; import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; @@ -53,7 +49,7 @@ public class GroundOptimizationProblemBuilderTest { } @Test - public void testEstimateFreeParameters() throws RuggedException { + public void testEstimateFreeParameters() { AdjustmentContext adjustmentContext = new AdjustmentContext(Collections.singletonList(rugged), measurements); final int maxIterations = 50; @@ -88,7 +84,7 @@ public class GroundOptimizationProblemBuilderTest { } @Test - public void testNoParametersSelected() throws RuggedException, OrekitException { + public void testNoParametersSelected() { try { RefiningParametersDriver.unselectRoll(rugged, sensorName); RefiningParametersDriver.unselectPitch(rugged, sensorName); @@ -131,7 +127,7 @@ public class GroundOptimizationProblemBuilderTest { } @Test - public void testDefaultRuggedName() throws RuggedException { + public void testDefaultRuggedName(){ // Get the measurements as computed in other tests Collection<SensorToGroundMapping> sensorToGroundMapping = measurements.getGroundMappings(); diff --git a/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java b/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java index 6018cda984fce7bbf8744b58ec690268abe060b1..5a56cc1f1b1826f43fe31156ee22d0ddc3a6e6fc 100644 --- a/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java @@ -17,7 +17,6 @@ package org.orekit.rugged.adjustment; import java.lang.reflect.Field; - import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -32,14 +31,12 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; - import org.orekit.rugged.TestUtils; import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; import org.orekit.rugged.adjustment.util.InitInterRefiningTest; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; @@ -66,7 +63,7 @@ public class InterSensorOptimizationProblemBuilderTest { } @Test - public void testEstimateFreeParameters() throws RuggedException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + public void testEstimateFreeParameters() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { AdjustmentContext adjustmentContext = new AdjustmentContext(ruggedList, measurements); @@ -108,7 +105,7 @@ public class InterSensorOptimizationProblemBuilderTest { } @Test - public void testEarthConstraintPostponed() throws RuggedException { + public void testEarthConstraintPostponed() { // Get the measurements as computed in other tests Collection<SensorToSensorMapping> sensorToSensorMapping = measurements.getInterMappings(); @@ -190,7 +187,7 @@ public class InterSensorOptimizationProblemBuilderTest { } @Test - public void testDefaultRuggedNames() throws RuggedException { + public void testDefaultRuggedNames() { // In that case there are no body distance set at construction @@ -286,7 +283,7 @@ public class InterSensorOptimizationProblemBuilderTest { } @Test - public void testInvalidRuggedNames() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, RuggedException { + public void testInvalidRuggedNames() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { final int maxIterations = 120; final double convergenceThreshold = 1.e-7; @@ -314,8 +311,8 @@ public class InterSensorOptimizationProblemBuilderTest { adjuster.optimize(theProblem); Assert.fail("An exception should have been thrown"); - } catch (RuggedExceptionWrapper re) { - Assert.assertEquals(RuggedMessages.INVALID_RUGGED_NAME,re.getException().getSpecifier()); + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.INVALID_RUGGED_NAME,re.getSpecifier()); } // Then set RuggedA to null to get the right exception ... @@ -329,8 +326,8 @@ public class InterSensorOptimizationProblemBuilderTest { adjuster.optimize(theProblem); Assert.fail("An exception should have been thrown"); - } catch (RuggedExceptionWrapper re) { - Assert.assertEquals(RuggedMessages.INVALID_RUGGED_NAME,re.getException().getSpecifier()); + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.INVALID_RUGGED_NAME,re.getSpecifier()); } } diff --git a/src/test/java/org/orekit/rugged/adjustment/util/InitGroundRefiningTest.java b/src/test/java/org/orekit/rugged/adjustment/util/InitGroundRefiningTest.java index 4cdb8be5b29db937cb7fb7b9b247a13338c6ab65..ce0739a6403b752c939c8f6bb10f313c3b39751d 100644 --- a/src/test/java/org/orekit/rugged/adjustment/util/InitGroundRefiningTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/util/InitGroundRefiningTest.java @@ -25,7 +25,6 @@ import org.orekit.rugged.api.EllipsoidId; import org.orekit.rugged.api.InertialFrameId; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.api.RuggedBuilder; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; import org.orekit.time.AbsoluteDate; @@ -65,9 +64,8 @@ public class InitGroundRefiningTest { /** * Initialize ground refining tests with default values for disruptions on sensors characteristics - * @throws RuggedException */ - public void initGroundRefiningTest() throws RuggedException { + public void initGroundRefiningTest() { initGroundRefiningTest(defaultRollDisruption, defaultPitchDisruption, defaultFactorDisruption); } @@ -76,9 +74,8 @@ public class InitGroundRefiningTest { * @param rollDisruption disruption to apply to roll angle for sensor (deg) * @param pitchDisruption disruption to apply to pitch angle for sensor (deg) * @param factorDisruption disruption to apply to homothety factor for sensor - * @throws RuggedException */ - public void initGroundRefiningTest(double rollDisruption, double pitchDisruption, double factorDisruption) throws RuggedException { + public void initGroundRefiningTest(double rollDisruption, double pitchDisruption, double factorDisruption) { try { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); @@ -177,9 +174,8 @@ public class InitGroundRefiningTest { * @param lineSampling line sampling * @param pixelSampling pixel sampling * @param flag to tell if the Rugged name used is the default one (true) or not (false) - * @throws RuggedException */ - public Observables generateNoisyPoints(final int lineSampling, final int pixelSampling, boolean defaultRuggedName) throws RuggedException { + public Observables generateNoisyPoints(final int lineSampling, final int pixelSampling, boolean defaultRuggedName) { // Generate reference mapping SensorToGroundMapping groundMapping; diff --git a/src/test/java/org/orekit/rugged/adjustment/util/InitInterRefiningTest.java b/src/test/java/org/orekit/rugged/adjustment/util/InitInterRefiningTest.java index 68bb5c96323d3e174ddcdc3561d96ee1b1ad4e09..ecb5679fbd4889df6b4c5a5388bdae216bca04f5 100644 --- a/src/test/java/org/orekit/rugged/adjustment/util/InitInterRefiningTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/util/InitInterRefiningTest.java @@ -31,7 +31,6 @@ import org.orekit.rugged.api.EllipsoidId; import org.orekit.rugged.api.InertialFrameId; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.api.RuggedBuilder; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; import org.orekit.rugged.utils.DSGenerator; @@ -86,9 +85,8 @@ public class InitInterRefiningTest { /** * Initialize refining tests with default values for disruptions on sensors characteristics - * @throws RuggedException */ - public void initRefiningTest() throws RuggedException { + public void initRefiningTest() { initRefiningTest(defaultRollDisruptionA, defaultPitchDisruptionA, defaultFactorDisruptionA, defaultRollDisruptionB, defaultPitchDisruptionB); @@ -100,10 +98,9 @@ public class InitInterRefiningTest { * @param factorDisruptionA disruption to apply to homothety factor for sensor A * @param rollDisruptionB disruption to apply to roll angle for sensor B (deg) * @param pitchDisruptionB disruption to apply to pitch angle for sensor B (deg) - * @throws RuggedException */ public void initRefiningTest(double rollDisruptionA, double pitchDisruptionA, double factorDisruptionA, - double rollDisruptionB, double pitchDisruptionB) throws RuggedException { + double rollDisruptionB, double pitchDisruptionB) { try { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); @@ -251,9 +248,8 @@ public class InitInterRefiningTest { * @param realPixelA real pixel from sensor A * @param realPixelB real pixel from sensor B * @return the distances of two real pixels computed between LOS and to the ground - * @throws RuggedException */ - public double[] computeDistancesBetweenLOS(final SensorPixel realPixelA, final SensorPixel realPixelB) throws RuggedException { + public double[] computeDistancesBetweenLOS(final SensorPixel realPixelA, final SensorPixel realPixelB) { final SpacecraftToObservedBody scToBodyA = ruggedA.getScToBody(); @@ -272,16 +268,10 @@ public class InitInterRefiningTest { * @param realPixelA real pixel from sensor A * @param realPixelB real pixel from sensor B * @return the distances of two real pixels computed between LOS and to the ground - * @throws RuggedException - * @throws SecurityException - * @throws NoSuchMethodException - * @throws InvocationTargetException - * @throws IllegalArgumentException - * @throws IllegalAccessException */ public DerivativeStructure[] computeDistancesBetweenLOSDerivatives(final SensorPixel realPixelA, final SensorPixel realPixelB, double losDistance, double earthDistance) - throws RuggedException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { + throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { final SpacecraftToObservedBody scToBodyA = ruggedA.getScToBody(); @@ -327,9 +317,8 @@ public class InitInterRefiningTest { * @param pixelSampling pixel sampling * @param earthConstraintWeight the earth constrint weight * @param earthConstraintPostponed flag to tell if the earth constraint weight is set at construction (false) or after (true) - For JUnit coverage purpose - * @throws RuggedException */ - public Observables generateNoisyPoints(final int lineSampling, final int pixelSampling, final double earthConstraintWeight, final boolean earthConstraintPostponed) throws RuggedException { + public Observables generateNoisyPoints(final int lineSampling, final int pixelSampling, final double earthConstraintWeight, final boolean earthConstraintPostponed) { // Outliers control final double outlierValue = 1.e+2; @@ -437,9 +426,8 @@ public class InitInterRefiningTest { * @param pixelSampling pixel sampling * @param earthConstraintWeight the earth constrint weight * @param earthConstraintPostponed flag to tell if the earth constraint weight is set at construction (false) or after (true) - For JUnit coverage purpose - * @throws RuggedException */ - public Observables generateSimpleInterMapping(final int lineSampling, final int pixelSampling, final double earthConstraintWeight, final boolean earthConstraintPostponed) throws RuggedException { + public Observables generateSimpleInterMapping(final int lineSampling, final int pixelSampling, final double earthConstraintWeight, final boolean earthConstraintPostponed) { // Outliers control final double outlierValue = 1.e+2; diff --git a/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java b/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java index bd7ef95ece8207c352b86271f0ca17c713a43020..5f76ebb808a0f108adb6a8eea66650655959c8e3 100644 --- a/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java +++ b/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java @@ -14,7 +14,6 @@ import org.orekit.attitudes.NadirPointing; import org.orekit.attitudes.TabulatedLofOffset; import org.orekit.attitudes.YawCompensation; import org.orekit.bodies.BodyShape; -import org.orekit.errors.OrekitException; import org.orekit.frames.Frame; import org.orekit.frames.FramesFactory; import org.orekit.frames.LOFType; @@ -57,7 +56,7 @@ public class PleiadesOrbitModel { /** Create a circular orbit. */ - public Orbit createOrbit(final double mu, final AbsoluteDate date) throws OrekitException { + public Orbit createOrbit(final double mu, final AbsoluteDate date) { // the following orbital parameters have been computed using // Orekit tutorial about phasing, using the following configuration: @@ -109,8 +108,7 @@ public class PleiadesOrbitModel { /** Get the offset. */ - private Rotation getOffset(final BodyShape earth, final Orbit orbit, final double shift) - throws OrekitException { + private Rotation getOffset(final BodyShape earth, final Orbit orbit, final double shift) { final LOFType type = LOFType.VVLH; final double roll = getPoly(lofTransformRollPoly, shift); @@ -133,8 +131,7 @@ public class PleiadesOrbitModel { /** Create the attitude provider. */ - public AttitudeProvider createAttitudeProvider(final BodyShape earth, final Orbit orbit) - throws OrekitException { + public AttitudeProvider createAttitudeProvider(final BodyShape earth, final Orbit orbit) { if (userDefinedLOFTransform) { final LOFType type = LOFType.VVLH; @@ -161,8 +158,7 @@ public class PleiadesOrbitModel { */ public List<TimeStampedPVCoordinates> orbitToPV(final Orbit orbit, final BodyShape earth, final AbsoluteDate minDate, final AbsoluteDate maxDate, - final double step) - throws OrekitException { + final double step) { final Propagator propagator = new KeplerianPropagator(orbit); @@ -185,8 +181,7 @@ public class PleiadesOrbitModel { */ public List<TimeStampedAngularCoordinates> orbitToQ(final Orbit orbit, final BodyShape earth, final AbsoluteDate minDate, final AbsoluteDate maxDate, - final double step) - throws OrekitException { + final double step) { final Propagator propagator = new KeplerianPropagator(orbit); propagator.setAttitudeProvider(createAttitudeProvider(earth, orbit)); diff --git a/src/test/java/org/orekit/rugged/adjustment/util/PleiadesViewingModel.java b/src/test/java/org/orekit/rugged/adjustment/util/PleiadesViewingModel.java index 244258a3ba9d3e2ad322f255080c84e5e807b90f..ab7561bbae3607b0ea22e914270572a1cf90c3c7 100644 --- a/src/test/java/org/orekit/rugged/adjustment/util/PleiadesViewingModel.java +++ b/src/test/java/org/orekit/rugged/adjustment/util/PleiadesViewingModel.java @@ -7,7 +7,6 @@ import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineDatation; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.LinearLineDatation; @@ -15,8 +14,6 @@ import org.orekit.rugged.los.FixedRotation; import org.orekit.rugged.los.FixedZHomothety; import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.TimeDependentLOS; - -import org.orekit.errors.OrekitException; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScale; import org.orekit.time.TimeScalesFactory; @@ -41,8 +38,7 @@ public class PleiadesViewingModel { * @param incidenceAngle incidence angle * @param referenceDate reference date */ - public PleiadesViewingModel(final String sensorName, final double incidenceAngle, final String referenceDate) - throws RuggedException, OrekitException { + public PleiadesViewingModel(final String sensorName, final double incidenceAngle, final String referenceDate) { this.sensorName = sensorName; this.referenceDate = referenceDate; @@ -83,7 +79,7 @@ public class PleiadesViewingModel { /** Get the reference date. */ - public AbsoluteDate getDatationReference() throws OrekitException { + public AbsoluteDate getDatationReference() { // We use Orekit for handling time and dates, and Rugged for defining the datation model: final TimeScale utc = TimeScalesFactory.getUTC(); @@ -93,13 +89,13 @@ public class PleiadesViewingModel { /** Get the min date. */ - public AbsoluteDate getMinDate() throws RuggedException { + public AbsoluteDate getMinDate() { return lineSensor.getDate(0); } /** Get the max date. */ - public AbsoluteDate getMaxDate() throws RuggedException { + public AbsoluteDate getMaxDate() { return lineSensor.getDate(DIMENSION); } @@ -124,7 +120,7 @@ public class PleiadesViewingModel { /** Create the line sensor. */ - private void createLineSensor() throws RuggedException, OrekitException { + private void createLineSensor() { // Offset of the MSI from center of mass of satellite // one line sensor diff --git a/src/test/java/org/orekit/rugged/adjustment/util/RefiningParametersDriver.java b/src/test/java/org/orekit/rugged/adjustment/util/RefiningParametersDriver.java index dae8fb87e9c5cb323aff626bccfadc0a72a56678..d4d89bb574c72ee0d5e5d4668c3d7cde973b8f0d 100644 --- a/src/test/java/org/orekit/rugged/adjustment/util/RefiningParametersDriver.java +++ b/src/test/java/org/orekit/rugged/adjustment/util/RefiningParametersDriver.java @@ -1,8 +1,6 @@ package org.orekit.rugged.adjustment.util; -import org.orekit.errors.OrekitException; import org.orekit.rugged.api.Rugged; -import org.orekit.rugged.errors.RuggedException; import org.orekit.utils.ParameterDriver; @@ -21,8 +19,7 @@ public class RefiningParametersDriver { * @param sensorName line sensor name * @param rollValue rotation on roll value */ - public static void applyDisruptionsRoll(final Rugged rugged, final String sensorName, final double rollValue) - throws OrekitException, RuggedException { + public static void applyDisruptionsRoll(final Rugged rugged, final String sensorName, final double rollValue) { rugged. getLineSensor(sensorName). @@ -36,8 +33,7 @@ public class RefiningParametersDriver { * @param sensorName line sensor name * @param pitchValue rotation on pitch value */ - public static void applyDisruptionsPitch(final Rugged rugged, final String sensorName, final double pitchValue) - throws OrekitException, RuggedException { + public static void applyDisruptionsPitch(final Rugged rugged, final String sensorName, final double pitchValue) { rugged. getLineSensor(sensorName). @@ -51,8 +47,7 @@ public class RefiningParametersDriver { * @param sensorName line sensor name * @param factorValue scale factor */ - public static void applyDisruptionsFactor(final Rugged rugged, final String sensorName, final double factorValue) - throws OrekitException, RuggedException { + public static void applyDisruptionsFactor(final Rugged rugged, final String sensorName, final double factorValue) { rugged. getLineSensor(sensorName). @@ -64,9 +59,8 @@ public class RefiningParametersDriver { /** Select roll angle to adjust * @param rugged Rugged instance * @param sensorName line sensor name - * @throws OrekitException, RuggedException */ - public static void setSelectedRoll(final Rugged rugged, final String sensorName) throws OrekitException, RuggedException { + public static void setSelectedRoll(final Rugged rugged, final String sensorName) { ParameterDriver rollDriver = rugged.getLineSensor(sensorName).getParametersDrivers(). @@ -77,9 +71,8 @@ public class RefiningParametersDriver { /** Select pitch angle to adjust * @param rugged Rugged instance * @param sensorName line sensor name - * @throws OrekitException, RuggedException */ - public static void setSelectedPitch(final Rugged rugged, final String sensorName) throws OrekitException, RuggedException { + public static void setSelectedPitch(final Rugged rugged, final String sensorName) { ParameterDriver pitchDriver = rugged.getLineSensor(sensorName).getParametersDrivers(). @@ -90,9 +83,8 @@ public class RefiningParametersDriver { /** Select scale factor to adjust * @param rugged Rugged instance * @param sensorName line sensor name - * @throws OrekitException, RuggedException */ - public static void setSelectedFactor(final Rugged rugged, final String sensorName) throws OrekitException, RuggedException { + public static void setSelectedFactor(final Rugged rugged, final String sensorName) { ParameterDriver factorDriver = rugged.getLineSensor(sensorName).getParametersDrivers(). @@ -103,9 +95,8 @@ public class RefiningParametersDriver { /** Unselect roll angle to adjust (for test coverage purpose) * @param rugged Rugged instance * @param sensorName line sensor name - * @throws OrekitException, RuggedException */ - public static void unselectRoll(final Rugged rugged, final String sensorName) throws OrekitException, RuggedException { + public static void unselectRoll(final Rugged rugged, final String sensorName) { ParameterDriver rollDriver = rugged.getLineSensor(sensorName).getParametersDrivers(). @@ -116,9 +107,8 @@ public class RefiningParametersDriver { /** Unselect pitch angle to adjust (for test coverage purpose) * @param rugged Rugged instance * @param sensorName line sensor name - * @throws OrekitException, RuggedException */ - public static void unselectPitch(final Rugged rugged, final String sensorName) throws OrekitException, RuggedException { + public static void unselectPitch(final Rugged rugged, final String sensorName) { ParameterDriver pitchDriver = rugged.getLineSensor(sensorName).getParametersDrivers(). @@ -129,9 +119,8 @@ public class RefiningParametersDriver { /** Unselect factor angle to adjust (for test coverage purpose) * @param rugged Rugged instance * @param sensorName line sensor name - * @throws OrekitException, RuggedException */ - public static void unselectFactor(final Rugged rugged, final String sensorName) throws OrekitException, RuggedException { + public static void unselectFactor(final Rugged rugged, final String sensorName) { ParameterDriver factorDriver = rugged.getLineSensor(sensorName).getParametersDrivers(). diff --git a/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java b/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java index 6617c818373dc45545b09c92072c917ac3f6b9d2..3f4c81303d0391f24063f1745d0c92d75c70601a 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java @@ -17,12 +17,6 @@ package org.orekit.rugged.api; -import org.hipparchus.geometry.euclidean.threed.Rotation; -import org.hipparchus.geometry.euclidean.threed.RotationConvention; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.ode.nonstiff.DormandPrince853Integrator; -import org.hipparchus.util.FastMath; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.EOFException; @@ -36,6 +30,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.hipparchus.geometry.euclidean.threed.Rotation; +import org.hipparchus.geometry.euclidean.threed.RotationConvention; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.ode.nonstiff.DormandPrince853Integrator; +import org.hipparchus.util.FastMath; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; @@ -49,7 +48,6 @@ import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; -import org.orekit.errors.OrekitException; import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel; import org.orekit.forces.gravity.ThirdBodyAttraction; import org.orekit.forces.gravity.potential.GravityFieldFactory; @@ -98,7 +96,7 @@ public class RuggedBuilderTest { @Test public void testSetContextWithEphemerides() - throws RuggedException, OrekitException, URISyntaxException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + throws URISyntaxException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -314,7 +312,7 @@ public class RuggedBuilderTest { @Test public void testSetContextWithPropagator() - throws RuggedException, OrekitException, URISyntaxException { + throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -359,7 +357,7 @@ public class RuggedBuilderTest { @Test public void testOutOfTimeRange() - throws RuggedException, OrekitException, URISyntaxException { + throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -461,7 +459,7 @@ public class RuggedBuilderTest { @Test public void testInterpolatorDump() - throws RuggedException, OrekitException, URISyntaxException { + throws URISyntaxException { int dimension = 200; @@ -530,7 +528,7 @@ public class RuggedBuilderTest { @Test public void testInterpolatorCannotDump() - throws RuggedException, OrekitException, URISyntaxException, IOException { + throws URISyntaxException, IOException { int dimension = 200; @@ -580,7 +578,7 @@ public class RuggedBuilderTest { @Test public void testInterpolatorDumpWrongFrame() - throws RuggedException, OrekitException, URISyntaxException { + throws URISyntaxException { int dimension = 200; @@ -641,7 +639,7 @@ public class RuggedBuilderTest { @Test public void testInterpolatorNotADump() - throws RuggedException, OrekitException, URISyntaxException { + throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -841,8 +839,8 @@ public class RuggedBuilderTest { private List<TimeStampedAngularCoordinates> orbitToQ(Orbit orbit, BodyShape earth, AbsoluteDate minDate, AbsoluteDate maxDate, - double step) - throws OrekitException { + double step) { + Propagator propagator = new KeplerianPropagator(orbit); propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); diff --git a/src/test/java/org/orekit/rugged/api/RuggedTest.java b/src/test/java/org/orekit/rugged/api/RuggedTest.java index e72f88cd9d50d7f06d666250cc5e6cf996f9bd53..5bd77c9aaa36e0f3c08a6e94256f67c4b9ddbfa6 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedTest.java @@ -64,7 +64,6 @@ import org.orekit.rugged.adjustment.GroundOptimizationProblemBuilder; import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.adjustment.util.InitInterRefiningTest; import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineDatation; import org.orekit.rugged.linesensor.LineSensor; @@ -388,7 +387,7 @@ public class RuggedTest { } // end loop on pixel i } - private RuggedBuilder initRuggedForAtmosphericTests(final int dimension, final String sensorName) throws URISyntaxException, RuggedException { + private RuggedBuilder initRuggedForAtmosphericTests(final int dimension, final String sensorName) throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -817,7 +816,7 @@ public class RuggedTest { @Test - public void testInverseLocNearLineEnd() throws OrekitException, RuggedException, URISyntaxException { + public void testInverseLocNearLineEnd() throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -919,7 +918,7 @@ public class RuggedTest { } @Test - public void testInverseLoc() throws OrekitException, RuggedException, URISyntaxException { + public void testInverseLoc() throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); @@ -1309,52 +1308,36 @@ public class RuggedTest { UnivariateDifferentiableFunction lineVSroll = differentiator.differentiate((double roll) -> { - try { - rollDriver.setValue(roll); - pitchDriver.setValue(0); - return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getLineNumber(); - } catch (RuggedException e) { - throw new RuggedExceptionWrapper(e); - } + rollDriver.setValue(roll); + pitchDriver.setValue(0); + return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getLineNumber(); }); double dLdR = lineVSroll.value(factory.variable(0, 0.0)).getPartialDerivative(1); Assert.assertEquals(dLdR, result[0].getPartialDerivative(1, 0), dLdR * lineDerivativeRelativeTolerance); UnivariateDifferentiableFunction lineVSpitch = differentiator.differentiate((double pitch) -> { - try { - rollDriver.setValue(0); - pitchDriver.setValue(pitch); - return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getLineNumber(); - } catch (RuggedException e) { - throw new RuggedExceptionWrapper(e); - } + rollDriver.setValue(0); + pitchDriver.setValue(pitch); + return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getLineNumber(); }); double dLdP = lineVSpitch.value(factory.variable(0, 0.0)).getPartialDerivative(1); Assert.assertEquals(dLdP, result[0].getPartialDerivative(0, 1), dLdP * lineDerivativeRelativeTolerance); UnivariateDifferentiableFunction pixelVSroll = differentiator.differentiate((double roll) -> { - try { - rollDriver.setValue(roll); - pitchDriver.setValue(0); - return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getPixelNumber(); - } catch (RuggedException e) { - throw new RuggedExceptionWrapper(e); - } + rollDriver.setValue(roll); + pitchDriver.setValue(0); + return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getPixelNumber(); }); double dXdR = pixelVSroll.value(factory.variable(0, 0.0)).getPartialDerivative(1); Assert.assertEquals(dXdR, result[1].getPartialDerivative(1, 0), dXdR * pixelDerivativeRelativeTolerance); UnivariateDifferentiableFunction pixelVSpitch = differentiator.differentiate((double pitch) -> { - try { - rollDriver.setValue(0); - pitchDriver.setValue(pitch); - return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getPixelNumber(); - } catch (RuggedException e) { - throw new RuggedExceptionWrapper(e); - } + rollDriver.setValue(0); + pitchDriver.setValue(pitch); + return rugged.inverseLocation("line", gp[referencePixel], 0, dimension).getPixelNumber(); }); double dXdP = pixelVSpitch.value(factory.variable(0, 0.0)).getPartialDerivative(1); Assert.assertEquals(dXdP, result[1].getPartialDerivative(0, 1), dXdP * pixelDerivativeRelativeTolerance); @@ -1362,7 +1345,7 @@ public class RuggedTest { } catch (InvocationTargetException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | URISyntaxException | - OrekitException | RuggedExceptionWrapper e) { + OrekitException | RuggedException e) { Assert.fail(e.getLocalizedMessage()); } } @@ -1542,7 +1525,7 @@ public class RuggedTest { @Before - public void setUp() throws OrekitException, URISyntaxException { + public void setUp() throws URISyntaxException { TestUtils.clearFactories(); } } diff --git a/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java b/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java index d2c4dd1b021f8d05480f86b36dc496da62d6f3fd..7b6f3f7036bd5c18f2495e099faadcf50384052d 100644 --- a/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java +++ b/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java @@ -35,7 +35,6 @@ import org.orekit.bodies.BodyShape; import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; -import org.orekit.errors.OrekitException; import org.orekit.orbits.Orbit; import org.orekit.rugged.TestUtils; import org.orekit.rugged.api.AlgorithmId; @@ -63,7 +62,7 @@ public class DumpManagerTest { public TemporaryFolder tempFolder = new TemporaryFolder(); @Test - public void testDump() throws URISyntaxException, IOException, OrekitException, RuggedException { + public void testDump() throws URISyntaxException, IOException { File dump = tempFolder.newFile(); DumpManager.activate(dump); @@ -146,7 +145,7 @@ public class DumpManagerTest { } public void variousRuggedCalls() - throws RuggedException, OrekitException, URISyntaxException { + throws URISyntaxException { int dimension = 200; @@ -209,7 +208,7 @@ public class DumpManagerTest { } @Test - public void testAlreadyActive() throws URISyntaxException, IOException, OrekitException, RuggedException { + public void testAlreadyActive() throws URISyntaxException, IOException { DumpManager.activate(tempFolder.newFile()); try { @@ -223,7 +222,7 @@ public class DumpManagerTest { } @Test - public void testNotActive() throws URISyntaxException, IOException, OrekitException, RuggedException { + public void testNotActive() throws URISyntaxException, IOException { try { DumpManager.deactivate(); Assert.fail("an exception should have been thrown"); @@ -233,7 +232,7 @@ public class DumpManagerTest { } @Test - public void testWriteError() throws URISyntaxException, IOException, OrekitException, RuggedException { + public void testWriteError() throws URISyntaxException, IOException { try { File dump = tempFolder.newFile(); dump.setReadOnly(); diff --git a/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java b/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java index 37a99a8b60c50dd4570597570469c580405ee205..5dce6d2aea7d4dd2dc694819ba5a6847df8e6a07 100644 --- a/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java +++ b/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java @@ -36,7 +36,6 @@ import org.junit.rules.TemporaryFolder; import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; -import org.orekit.errors.OrekitException; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.linesensor.SensorPixel; diff --git a/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java index ad970b0216c5d798b25d193f32c16865f5448fe6..f9e6998e4a589cc15d8ce8d14631bd4716eed6b9 100644 --- a/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java @@ -17,13 +17,13 @@ package org.orekit.rugged.intersection; +import java.io.File; +import java.net.URISyntaxException; + import org.hipparchus.geometry.euclidean.threed.Line; import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; -import java.io.File; -import java.net.URISyntaxException; - import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -32,13 +32,10 @@ import org.orekit.attitudes.Attitude; import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; -import org.orekit.errors.OrekitException; import org.orekit.frames.FramesFactory; import org.orekit.frames.Transform; import org.orekit.orbits.CartesianOrbit; import org.orekit.propagation.SpacecraftState; -import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.intersection.IntersectionAlgorithm; import org.orekit.rugged.intersection.duvenhage.MinMaxTreeTile; import org.orekit.rugged.intersection.duvenhage.MinMaxTreeTileFactory; import org.orekit.rugged.raster.CliffsElevationUpdater; @@ -119,7 +116,7 @@ public abstract class AbstractAlgorithmTest { @Test public void testCliffsOfMoher() - throws RuggedException, OrekitException { + { setUpCliffsOfMoherContext(); @@ -152,8 +149,7 @@ public abstract class AbstractAlgorithmTest { } - protected void checkIntersection(Vector3D position, Vector3D los, GeodeticPoint intersection) - throws RuggedException { + protected void checkIntersection(Vector3D position, Vector3D los, GeodeticPoint intersection) { // check the point is on the line Line line = new Line(position, new Vector3D(1, position, 1e6, los), 1.0e-12); @@ -168,7 +164,7 @@ public abstract class AbstractAlgorithmTest { } protected void setUpMayonVolcanoContext() - throws RuggedException, OrekitException { + { // Mayon Volcano location according to Wikipedia: 13°15′24″N 123°41′6″E GeodeticPoint summit = @@ -216,7 +212,7 @@ public abstract class AbstractAlgorithmTest { } protected void setUpCliffsOfMoherContext() - throws RuggedException, OrekitException { + { // cliffs of Moher location according to Wikipedia: 52°56′10″N 9°28′15″ W GeodeticPoint north = new GeodeticPoint(FastMath.toRadians(52.9984), @@ -270,8 +266,8 @@ public abstract class AbstractAlgorithmTest { } @Before - public void setUp() - throws OrekitException, URISyntaxException { + public void setUp() throws URISyntaxException { + String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); earth = new ExtendedEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, diff --git a/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java index 954d030f6ded2ce194d2626ed1de5626196891be..9b8d6a4ab1e0f7af010d10beceb58b7bd78f1663 100644 --- a/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2017 CS Systèmes d'Information +/* Copyright 2013-2018 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -17,12 +17,12 @@ package org.orekit.rugged.intersection; -import org.hipparchus.geometry.euclidean.threed.Rotation; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.util.FastMath; import java.io.File; import java.net.URISyntaxException; +import org.hipparchus.geometry.euclidean.threed.Rotation; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.util.FastMath; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -30,11 +30,9 @@ import org.junit.Test; import org.orekit.attitudes.Attitude; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; -import org.orekit.errors.OrekitException; import org.orekit.frames.FramesFactory; import org.orekit.orbits.CartesianOrbit; import org.orekit.propagation.SpacecraftState; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.intersection.duvenhage.DuvenhageAlgorithm; import org.orekit.rugged.raster.CheckedPatternElevationUpdater; import org.orekit.rugged.raster.TileUpdater; @@ -100,8 +98,7 @@ public class ConstantElevationAlgorithmTest { } @Before - public void setUp() - throws OrekitException, URISyntaxException { + public void setUp() throws URISyntaxException { String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); DataProvidersManager.getInstance().addProvider(new DirectoryCrawler(new File(path))); earth = new ExtendedEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, diff --git a/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java index 46563207a2a7281539a5aae2706e1d6bed6e7443..0abf6e556adf7b675f06a2dec3d7ac0a35aff7f5 100644 --- a/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java @@ -85,8 +85,8 @@ public class DuvenhageAlgorithmTest extends AbstractAlgorithmTest { final int n = 1201; final double size = FastMath.toRadians(1.0); updater = new TileUpdater() { - public void updateTile(double latitude, double longitude, UpdatableTile tile) - throws RuggedException { + public void updateTile(double latitude, double longitude, UpdatableTile tile) { + double step = size / (n - 1); // this geometry is incorrect: // the specified latitude/longitude belong to rows/columns [1, n-1] diff --git a/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java b/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java index 11f5538913564515550890659aa6deff9af466a1..1c3c442cd0f8dcab94aab3b8549d0bdfe6299d77 100644 --- a/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java +++ b/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java @@ -16,14 +16,13 @@ */ package org.orekit.rugged.intersection.duvenhage; +import java.lang.reflect.Field; + import org.hipparchus.random.RandomGenerator; import org.hipparchus.random.Well1024a; import org.hipparchus.util.FastMath; -import java.lang.reflect.Field; - import org.junit.Assert; import org.junit.Test; -import org.orekit.rugged.errors.RuggedException; public class MinMaxTreeTileTest { diff --git a/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java b/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java index eb99602d9fba1edf247a6dffce149c775d31571a..01fbbfb38f2264e26d4cf0f9899fb11140d6384f 100644 --- a/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java +++ b/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java @@ -37,8 +37,6 @@ import org.hipparchus.util.FastMath; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.orekit.errors.OrekitException; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.los.FixedRotation; import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.TimeDependentLOS; diff --git a/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java b/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java index 672f71ca10f9584dcced7df44352284fcf84f00d..9e5102174e06c5c6bf36d3cd73934f74eba30cc4 100644 --- a/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java +++ b/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java @@ -38,8 +38,6 @@ import org.hipparchus.util.FastMath; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.orekit.errors.OrekitException; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.PolynomialRotation; import org.orekit.rugged.los.TimeDependentLOS; diff --git a/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java b/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java index 9a8ffeba21038a8ea39144fe50a29526281bbb08..a0f61bfc8cd23c90d090097a267f89a4df3e5229 100644 --- a/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java +++ b/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java @@ -16,11 +16,6 @@ */ package org.orekit.rugged.linesensor; -import org.hipparchus.geometry.euclidean.threed.Line; -import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.hipparchus.random.RandomGenerator; -import org.hipparchus.random.Well19937a; -import org.hipparchus.util.FastMath; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -28,6 +23,11 @@ import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; +import org.hipparchus.geometry.euclidean.threed.Line; +import org.hipparchus.geometry.euclidean.threed.Vector3D; +import org.hipparchus.random.RandomGenerator; +import org.hipparchus.random.Well19937a; +import org.hipparchus.util.FastMath; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -38,7 +38,6 @@ import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; -import org.orekit.errors.OrekitException; import org.orekit.frames.FramesFactory; import org.orekit.frames.Transform; import org.orekit.orbits.CircularOrbit; @@ -49,7 +48,6 @@ import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.analytical.KeplerianPropagator; import org.orekit.propagation.sampling.OrekitFixedStepHandler; import org.orekit.rugged.TestUtils; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.SensorMeanPlaneCrossing.CrossingResult; import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.utils.SpacecraftToObservedBody; diff --git a/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java b/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java index 59655cf1afaf54dba00c842f4774d4d7bb43ee31..d4349f5e783e798b7128285e7e61d91b23a0c256 100644 --- a/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java @@ -17,7 +17,6 @@ package org.orekit.rugged.raster; import org.hipparchus.util.FastMath; -import org.orekit.rugged.errors.RuggedException; public class CheckedPatternElevationUpdater implements TileUpdater { diff --git a/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java b/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java index 3f5ee8d0ab40249037f5673eec5dec971ea7c442..ef23c39fef15587ee2f57cdfdb5c9af815251cf8 100644 --- a/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java @@ -18,7 +18,6 @@ package org.orekit.rugged.raster; import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; -import org.orekit.rugged.errors.RuggedException; public class CliffsElevationUpdater implements TileUpdater { diff --git a/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java b/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java index 43fefdc182f34f28c6ef4bd5c481cb7985922013..f84b81c76b4750be4e7878036b450be88f9a5708 100644 --- a/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java @@ -22,7 +22,6 @@ import org.hipparchus.random.RandomGenerator; import org.hipparchus.random.Well19937a; import org.hipparchus.util.ArithmeticUtils; import org.hipparchus.util.FastMath; -import org.orekit.rugged.errors.RuggedException; public class RandomLandscapeUpdater implements TileUpdater { @@ -37,11 +36,9 @@ public class RandomLandscapeUpdater implements TileUpdater { * @param seed * @param size size in latitude / size in longitude (rad) * @param n number of latitude / number of longitude - * @throws MathIllegalArgumentException */ public RandomLandscapeUpdater(double baseH, double initialScale, double reductionFactor, - long seed, double size, int n) - throws MathIllegalArgumentException { + long seed, double size, int n) { if (!ArithmeticUtils.isPowerOfTwo(n - 1)) { throw new MathIllegalArgumentException(LocalizedCoreFormats.SIMPLE_MESSAGE, diff --git a/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java b/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java index 8f236d23c9ddf85f28cea63812868bbfc96003a7..63e11e3e6d05c75b174fd920943238418cea8add 100644 --- a/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java +++ b/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java @@ -21,9 +21,6 @@ import org.hipparchus.random.Well19937a; import org.hipparchus.util.FastMath; import org.junit.Assert; import org.junit.Test; -import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.raster.SimpleTile; -import org.orekit.rugged.raster.TilesCache; public class TilesCacheTest { diff --git a/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java b/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java index bd23625623247a1e9fee7faa526ee9500aca2cd0..b8a694cdd6b2c218ebd0dc308a17b94140bab8e5 100644 --- a/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java @@ -18,7 +18,6 @@ package org.orekit.rugged.raster; import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; -import org.orekit.rugged.errors.RuggedException; import org.orekit.utils.Constants; public class VolcanicConeElevationUpdater implements TileUpdater { diff --git a/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java b/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java index cc2904d5a255e830217141de7a0f4d0d89582b0d..4f5de4087f1c89e6a71cc975c3afc7c5c7d976da 100644 --- a/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java +++ b/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java @@ -16,6 +16,11 @@ */ package org.orekit.rugged.refraction; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import org.hipparchus.analysis.UnivariateFunction; import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; @@ -23,7 +28,6 @@ import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; import org.junit.Assert; import org.junit.Test; -import org.orekit.errors.OrekitException; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.intersection.AbstractAlgorithmTest; @@ -32,11 +36,6 @@ import org.orekit.rugged.intersection.duvenhage.DuvenhageAlgorithm; import org.orekit.rugged.raster.TileUpdater; import org.orekit.rugged.utils.NormalizedGeodeticPoint; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - public class MultiLayerModelTest extends AbstractAlgorithmTest { @Test diff --git a/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java b/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java index c64df5491451c44778e3112151a1e6f675733f0d..8e75d4de2774007f92ee78ace98c91599c9b5aad 100644 --- a/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java +++ b/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java @@ -16,13 +16,13 @@ */ package org.orekit.rugged.utils; -import org.hipparchus.ode.nonstiff.DormandPrince853Integrator; -import org.hipparchus.util.FastMath; import java.io.File; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; +import org.hipparchus.ode.nonstiff.DormandPrince853Integrator; +import org.hipparchus.util.FastMath; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -51,7 +51,6 @@ import org.orekit.propagation.Propagator; import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.numerical.NumericalPropagator; import org.orekit.propagation.sampling.OrekitFixedStepHandler; -import org.orekit.rugged.errors.RuggedException; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScalesFactory; import org.orekit.utils.Constants; diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java index e53d2ee69f02d0e7e769b11c6730b08ac5ae8f97..9fe09bae06923963ff98bc283fb33db8c6509be3 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java @@ -22,14 +22,13 @@ import java.util.Collections; import java.util.List; import org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum; -import org.orekit.errors.OrekitException; import org.orekit.rugged.adjustment.AdjustmentContext; -import org.orekit.rugged.api.Rugged; -import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; +import org.orekit.rugged.api.Rugged; +import org.orekit.rugged.errors.RuggedException; +import org.orekit.rugged.errors.RuggedMessages; import fr.cs.examples.refiningPleiades.generators.GroundMeasurementGenerator; import fr.cs.examples.refiningPleiades.generators.InterMeasurementGenerator; diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java index e3b2efec74bc9e1a37261fff89f540a93968d0be..3d15220710784e5c5736e8818ec4f8866f257da5 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java @@ -22,12 +22,11 @@ import org.hipparchus.random.UncorrelatedRandomVectorGenerator; import org.hipparchus.random.Well19937a; import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; +import org.orekit.rugged.adjustment.measurements.Observables; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.rugged.api.Rugged; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; -import org.orekit.rugged.adjustment.measurements.Observables; -import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.time.AbsoluteDate; /** Ground measurements generator (sensor to ground mapping). diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java index 9dfe7d4e6a613b81b5e5d3bc3ff04518b5d96a04..bccf204312418685cc07af919732be79aa642d68 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java @@ -22,7 +22,6 @@ import org.hipparchus.random.Well19937a; import org.orekit.bodies.GeodeticPoint; import org.orekit.rugged.api.Rugged; import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java index a9b9854345e5de66164557dddb3428756f88a99d..b8125862d6189086a33991e8541d9b37ccdbe872 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java @@ -23,12 +23,11 @@ import java.util.Set; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; import org.orekit.bodies.GeodeticPoint; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; +import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; import org.orekit.rugged.api.Rugged; -import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; -import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; -import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; import org.orekit.rugged.utils.SpacecraftToObservedBody; import org.orekit.time.AbsoluteDate; diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java index d0fe5132d3bda54aba25a5bcab8e54db67f4f605..ddf1e12c7ab1f5759c61e0774163fe183d6e762f 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java @@ -31,7 +31,6 @@ import org.orekit.attitudes.TabulatedLofOffset; import org.orekit.attitudes.YawCompensation; import org.orekit.bodies.BodyShape; import org.orekit.bodies.OneAxisEllipsoid; -import org.orekit.errors.OrekitException; import org.orekit.forces.gravity.potential.GravityFieldFactory; import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider; import org.orekit.frames.Frame; diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java index 9714793facce97e02ed5e30f693abfd93ba8f034..609fb4dc28ae9461ae0de0eafbf24cd257337960 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java @@ -16,15 +16,16 @@ */ package fr.cs.examples.refiningPleiades.models; +import java.util.ArrayList; +import java.util.List; + import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; import org.hipparchus.geometry.euclidean.threed.Vector3D; - import org.hipparchus.util.FastMath; -import java.util.ArrayList; -import java.util.List; - - +import org.orekit.rugged.linesensor.LineDatation; +import org.orekit.rugged.linesensor.LineSensor; +import org.orekit.rugged.linesensor.LinearLineDatation; import org.orekit.rugged.los.FixedRotation; import org.orekit.rugged.los.FixedZHomothety; import org.orekit.rugged.los.LOSBuilder; @@ -35,13 +36,6 @@ import org.orekit.time.TimeScalesFactory; import fr.cs.examples.refiningPleiades.Refining; -import org.orekit.rugged.linesensor.LinearLineDatation; -import org.orekit.rugged.linesensor.LineDatation; -import org.orekit.rugged.linesensor.LineSensor; - -import org.orekit.rugged.errors.RuggedException; -import org.orekit.errors.OrekitException; - /** * Pleiades viewing model class definition. * The aim of this class is to simulate PHR sensor.