Skip to content
Snippets Groups Projects
Commit e656b57d authored by Guylaine Prat's avatar Guylaine Prat
Browse files

Migration to Hipparchus 1.0-SNAPSHOT and Orekit 8.0-SNAPSHOT

parent e998cc5e
No related branches found
No related tags found
No related merge requests found
Showing
with 155 additions and 108 deletions
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.orekit</groupId> <groupId>org.orekit</groupId>
<artifactId>rugged</artifactId> <artifactId>rugged</artifactId>
<version>1.0</version> <version>2.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Rugged</name> <name>Rugged</name>
<url>https://www.orekit.org/rugged</url> <url>https://www.orekit.org/rugged</url>
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
<rugged.maven-surefire-report-plugin.version>2.18.1</rugged.maven-surefire-report-plugin.version> <rugged.maven-surefire-report-plugin.version>2.18.1</rugged.maven-surefire-report-plugin.version>
<rugged.jgit.buildnumber.version>1.2.8</rugged.jgit.buildnumber.version> <rugged.jgit.buildnumber.version>1.2.8</rugged.jgit.buildnumber.version>
<rugged.plantuml.version>7999</rugged.plantuml.version> <rugged.plantuml.version>7999</rugged.plantuml.version>
<rugged.orekit.version>7.1</rugged.orekit.version> <rugged.orekit.version>8.0-SNAPSHOT</rugged.orekit.version>
<rugged.apache-commons-math.version>3.6</rugged.apache-commons-math.version> <rugged.hipparchus.version>1.0-SNAPSHOT</rugged.hipparchus.version>
<rugged.compiler.source>1.6</rugged.compiler.source> <rugged.compiler.source>1.8</rugged.compiler.source>
<rugged.compiler.target>1.6</rugged.compiler.target> <rugged.compiler.target>1.8</rugged.compiler.target>
<rugged.maven-resources-plugin.version>2.7</rugged.maven-resources-plugin.version> <rugged.maven-resources-plugin.version>2.7</rugged.maven-resources-plugin.version>
<rugged.implementation.build>${git.revision}; ${maven.build.timestamp}</rugged.implementation.build> <rugged.implementation.build>${git.revision}; ${maven.build.timestamp}</rugged.implementation.build>
...@@ -143,13 +143,22 @@ ...@@ -143,13 +143,22 @@
<type>jar</type> <type>jar</type>
<optional>false</optional> <optional>false</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.hipparchus</groupId>
<artifactId>commons-math3</artifactId> <artifactId>hipparchus-core</artifactId>
<version>${rugged.apache-commons-math.version}</version> <version>${rugged.hipparchus.version}</version>
<type>jar</type> <type>jar</type>
<optional>false</optional> <optional>false</optional>
</dependency> </dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-geometry</artifactId>
<version>${rugged.hipparchus.version}</version>
<type>jar</type>
<optional>false</optional>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
*/ */
package org.orekit.rugged.api; package org.orekit.rugged.api;
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 java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.util.FastMath;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.frames.Transform; import org.orekit.frames.Transform;
import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.DumpManager;
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
*/ */
package org.orekit.rugged.api; package org.orekit.rugged.api;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
...@@ -25,9 +27,6 @@ import java.util.ArrayList; ...@@ -25,9 +27,6 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.geometry.euclidean.threed.Rotation;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.bodies.OneAxisEllipsoid; import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.errors.PropagationException; import org.orekit.errors.PropagationException;
...@@ -629,7 +628,9 @@ public class RuggedBuilder { ...@@ -629,7 +628,9 @@ public class RuggedBuilder {
createInterpolatorIfNeeded(); createInterpolatorIfNeeded();
new ObjectOutputStream(storageStream).writeObject(scToBody); new ObjectOutputStream(storageStream).writeObject(scToBody);
} catch (IOException ioe) { } catch (IOException ioe) {
throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getMessage()); // TODO hipparchus migration : change to the appropriate message
// throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getMessage());
throw new RuggedException(ioe, RuggedMessages.DEBUG_DUMP_ACTIVATION_ERROR, ioe.getLocalizedMessage());
} }
} }
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
*/ */
package org.orekit.rugged.errors; package org.orekit.rugged.errors;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.OpenIntToDoubleHashMap;
import org.hipparchus.util.Pair;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
...@@ -25,11 +30,6 @@ import java.util.Locale; ...@@ -25,11 +30,6 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.TimeZone; import java.util.TimeZone;
import org.apache.commons.math3.geometry.euclidean.threed.Rotation;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.OpenIntToDoubleHashMap;
import org.apache.commons.math3.util.Pair;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.frames.FactoryManagedFrame; import org.orekit.frames.FactoryManagedFrame;
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
*/ */
package org.orekit.rugged.errors; package org.orekit.rugged.errors;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.frames.Transform; import org.orekit.frames.Transform;
import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.AlgorithmId;
......
...@@ -16,6 +16,13 @@ ...@@ -16,6 +16,13 @@
*/ */
package org.orekit.rugged.errors; package org.orekit.rugged.errors;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.OpenIntToDoubleHashMap;
import org.hipparchus.util.Pair;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
...@@ -33,14 +40,6 @@ import java.util.Map; ...@@ -33,14 +40,6 @@ import java.util.Map;
import java.util.NavigableMap; import java.util.NavigableMap;
import java.util.TreeMap; import java.util.TreeMap;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.geometry.euclidean.threed.Rotation;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.OpenIntToDoubleHashMap;
import org.apache.commons.math3.util.Pair;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.bodies.OneAxisEllipsoid; import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
...@@ -278,7 +277,9 @@ public class DumpReplayer { ...@@ -278,7 +277,9 @@ public class DumpReplayer {
} }
reader.close(); reader.close();
} catch (IOException ioe) { } catch (IOException ioe) {
throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getLocalizedMessage()); // TODO hipparchus migration : change to the appropriate message
// throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getLocalizedMessage());
throw new RuggedException(ioe, RuggedMessages.DEBUG_DUMP_ACTIVATION_ERROR, file.getAbsolutePath(), ioe.getLocalizedMessage());
} }
} }
...@@ -389,7 +390,9 @@ public class DumpReplayer { ...@@ -389,7 +390,9 @@ public class DumpReplayer {
return rugged; return rugged;
} catch (IOException ioe) { } catch (IOException ioe) {
throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getLocalizedMessage()); // TODO hipparchus migration : change to the appropriate message
// throw new RuggedException(ioe, LocalizedFormats.SIMPLE_MESSAGE, ioe.getLocalizedMessage());
throw new RuggedException(ioe, RuggedMessages.DEBUG_DUMP_ACTIVATION_ERROR, ioe.getLocalizedMessage());
} catch (SecurityException e) { } catch (SecurityException e) {
// this should never happen // this should never happen
throw RuggedException.createInternalError(e); throw RuggedException.createInternalError(e);
......
/* Copyright 2013-2016 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.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.rugged.errors;
import java.util.Locale;
import org.hipparchus.exception.Localizable;
/** This interface specified methods implemented by localized exception classes.
* @author Luc Maisonobe
*/
public interface LocalizedException {
/** Gets the message in a specified locale.
* @param locale Locale in which the message should be translated
* @return localized message
*/
String getMessage(final Locale locale);
/** Get the localizable specifier of the error message.
* @return localizable specifier of the error message
*/
Localizable getSpecifier();
/** Get the variable parts of the error message.
* @return a copy of the variable parts of the error message
*/
Object[] getParts();
}
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
*/ */
package org.orekit.rugged.errors; package org.orekit.rugged.errors;
import org.hipparchus.exception.Localizable;
import org.hipparchus.exception.MathRuntimeException;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Locale; import java.util.Locale;
import org.apache.commons.math3.exception.util.ExceptionContext;
import org.apache.commons.math3.exception.util.ExceptionContextProvider;
import org.apache.commons.math3.exception.util.Localizable;
/** This class is the base class for all specific exceptions thrown by /** This class is the base class for all specific exceptions thrown by
* the rugged library classes. * the rugged library classes.
...@@ -35,14 +35,11 @@ import org.apache.commons.math3.exception.util.Localizable; ...@@ -35,14 +35,11 @@ import org.apache.commons.math3.exception.util.Localizable;
*/ */
public class RuggedException extends Exception { public class RuggedException extends Exception implements LocalizedException {
/** Serializable UID. */ /** Serializable UID. */
private static final long serialVersionUID = 20140309L; private static final long serialVersionUID = 20140309L;
/** Exception context (may be null). */
private final ExceptionContext context;
/** Format specifier (to be translated). */ /** Format specifier (to be translated). */
private final Localizable specifier; private final Localizable specifier;
...@@ -55,7 +52,6 @@ public class RuggedException extends Exception { ...@@ -55,7 +52,6 @@ public class RuggedException extends Exception {
* @param parts parts to insert in the format (no translation) * @param parts parts to insert in the format (no translation)
*/ */
public RuggedException(final Localizable specifier, final Object ... parts) { public RuggedException(final Localizable specifier, final Object ... parts) {
this.context = null;
this.specifier = specifier; this.specifier = specifier;
this.parts = (parts == null) ? new Object[0] : parts.clone(); this.parts = (parts == null) ? new Object[0] : parts.clone();
} }
...@@ -65,7 +61,6 @@ public class RuggedException extends Exception { ...@@ -65,7 +61,6 @@ public class RuggedException extends Exception {
*/ */
public RuggedException(final RuggedException exception) { public RuggedException(final RuggedException exception) {
super(exception); super(exception);
this.context = exception.context;
this.specifier = exception.specifier; this.specifier = exception.specifier;
this.parts = exception.parts.clone(); this.parts = exception.parts.clone();
} }
...@@ -77,7 +72,6 @@ public class RuggedException extends Exception { ...@@ -77,7 +72,6 @@ public class RuggedException extends Exception {
*/ */
public RuggedException(final Localizable message, final Throwable cause) { public RuggedException(final Localizable message, final Throwable cause) {
super(cause); super(cause);
this.context = null;
this.specifier = message; this.specifier = message;
this.parts = new Object[0]; this.parts = new Object[0];
} }
...@@ -91,30 +85,24 @@ public class RuggedException extends Exception { ...@@ -91,30 +85,24 @@ public class RuggedException extends Exception {
public RuggedException(final Throwable cause, final Localizable specifier, public RuggedException(final Throwable cause, final Localizable specifier,
final Object ... parts) { final Object ... parts) {
super(cause); super(cause);
this.context = null;
this.specifier = specifier; this.specifier = specifier;
this.parts = (parts == null) ? new Object[0] : parts.clone(); this.parts = (parts == null) ? new Object[0] : parts.clone();
} }
/** Simple constructor. /** Simple constructor.
* Build an exception from an Apache Commons Math exception context context * Build an exception from an Hipparchus exception
* @param provider underlying exception context provider * @param exception underlying Hipparchus exception
*/ */
public RuggedException(final ExceptionContextProvider provider) { public RuggedException(final MathRuntimeException exception) {
super(provider.getContext().getThrowable()); super(exception);
this.context = provider.getContext(); this.specifier = exception.getSpecifier();
this.specifier = null; this.parts = exception.getParts();
this.parts = new Object[0];
} }
/** Gets the message in a specified locale. /** {@inheritDoc} */
* @param locale Locale in which the message should be translated @Override
* @return localized message
*/
public String getMessage(final Locale locale) { public String getMessage(final Locale locale) {
return (context != null) ? return buildMessage(locale, specifier, parts);
context.getMessage(locale) :
buildMessage(locale, specifier, parts);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
package org.orekit.rugged.errors; package org.orekit.rugged.errors;
import org.hipparchus.exception.Localizable;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
...@@ -26,7 +27,6 @@ import java.util.MissingResourceException; ...@@ -26,7 +27,6 @@ import java.util.MissingResourceException;
import java.util.PropertyResourceBundle; import java.util.PropertyResourceBundle;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import org.apache.commons.math3.exception.util.Localizable;
/** /**
* Enumeration for localized messages formats. * Enumeration for localized messages formats.
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
*/ */
package org.orekit.rugged.intersection; package org.orekit.rugged.intersection;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.util.FastMath;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.AlgorithmId;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
package org.orekit.rugged.intersection; package org.orekit.rugged.intersection;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.AlgorithmId;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
package org.orekit.rugged.intersection; package org.orekit.rugged.intersection;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.AlgorithmId;
import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.DumpManager;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
package org.orekit.rugged.intersection; package org.orekit.rugged.intersection;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.utils.ExtendedEllipsoid; import org.orekit.rugged.utils.ExtendedEllipsoid;
import org.orekit.rugged.utils.NormalizedGeodeticPoint; import org.orekit.rugged.utils.NormalizedGeodeticPoint;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
*/ */
package org.orekit.rugged.intersection.duvenhage; package org.orekit.rugged.intersection.duvenhage;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.util.FastMath; import org.hipparchus.util.FastMath;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.AlgorithmId;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
package org.orekit.rugged.intersection.duvenhage; package org.orekit.rugged.intersection.duvenhage;
import org.apache.commons.math3.util.FastMath; import org.hipparchus.util.FastMath;
import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.DumpManager;
import org.orekit.rugged.raster.SimpleTile; import org.orekit.rugged.raster.SimpleTile;
import org.orekit.rugged.utils.MaxSelector; import org.orekit.rugged.utils.MaxSelector;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
package org.orekit.rugged.linesensor; package org.orekit.rugged.linesensor;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.DumpManager;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.los.TimeDependentLOS; import org.orekit.rugged.los.TimeDependentLOS;
......
...@@ -16,24 +16,24 @@ ...@@ -16,24 +16,24 @@
*/ */
package org.orekit.rugged.linesensor; package org.orekit.rugged.linesensor;
import org.apache.commons.math3.analysis.UnivariateFunction; import org.hipparchus.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.solvers.BracketingNthOrderBrentSolver; import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
import org.apache.commons.math3.analysis.solvers.UnivariateSolver; import org.hipparchus.analysis.solvers.UnivariateSolver;
import org.apache.commons.math3.exception.NoBracketingException; import org.hipparchus.exception.MathIllegalArgumentException;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.exception.MathIllegalStateException;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.linear.Array2DRowRealMatrix; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.linear.ArrayRealVector; import org.hipparchus.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.DecompositionSolver; import org.hipparchus.linear.ArrayRealVector;
import org.apache.commons.math3.linear.MatrixUtils; import org.hipparchus.linear.DecompositionSolver;
import org.apache.commons.math3.linear.QRDecomposition; import org.hipparchus.linear.MatrixUtils;
import org.apache.commons.math3.linear.RealMatrix; import org.hipparchus.linear.QRDecomposition;
import org.apache.commons.math3.linear.RealVector; import org.hipparchus.linear.RealMatrix;
import org.apache.commons.math3.linear.SingularMatrixException; import org.hipparchus.linear.RealVector;
import org.apache.commons.math3.linear.SingularValueDecomposition; import org.hipparchus.linear.SingularValueDecomposition;
import org.apache.commons.math3.util.FastMath; import org.hipparchus.util.FastMath;
import org.apache.commons.math3.util.Precision; import org.hipparchus.util.Precision;
import org.orekit.frames.Transform; import org.orekit.frames.Transform;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedExceptionWrapper;
...@@ -480,7 +480,7 @@ public class SensorMeanPlaneCrossing { ...@@ -480,7 +480,7 @@ public class SensorMeanPlaneCrossing {
target.getZ() * coefficients.getEntry(2) + target.getZ() * coefficients.getEntry(2) +
coefficients.getEntry(3); coefficients.getEntry(3);
} catch (SingularMatrixException sme) { } catch (MathIllegalStateException sme) {
// the points are not independent // the points are not independent
return Double.NaN; return Double.NaN;
} }
...@@ -528,7 +528,7 @@ public class SensorMeanPlaneCrossing { ...@@ -528,7 +528,7 @@ public class SensorMeanPlaneCrossing {
evaluateLine(crossingLine, targetPV, scToBody.getBodyToInertial(date), scToBody.getScToInertial(date)); evaluateLine(crossingLine, targetPV, scToBody.getBodyToInertial(date), scToBody.getScToInertial(date));
return new CrossingResult(sensor.getDate(crossingLine), crossingLine, targetPV.getPosition(), targetDirection); return new CrossingResult(sensor.getDate(crossingLine), crossingLine, targetPV.getPosition(), targetDirection);
} catch (NoBracketingException nbe) { } catch (MathIllegalArgumentException nbe) {
return null; return null;
} catch (RuggedExceptionWrapper rew) { } catch (RuggedExceptionWrapper rew) {
throw rew.getException(); throw rew.getException();
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
*/ */
package org.orekit.rugged.linesensor; package org.orekit.rugged.linesensor;
import org.apache.commons.math3.analysis.UnivariateFunction; import org.hipparchus.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.solvers.BracketingNthOrderBrentSolver; import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
import org.apache.commons.math3.analysis.solvers.UnivariateSolver; import org.hipparchus.analysis.solvers.UnivariateSolver;
import org.apache.commons.math3.exception.NoBracketingException; import org.hipparchus.exception.MathIllegalArgumentException;
import org.apache.commons.math3.exception.TooManyEvaluationsException; import org.hipparchus.exception.MathIllegalArgumentException;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.util.FastMath; import org.hipparchus.util.FastMath;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedExceptionWrapper;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
...@@ -93,11 +93,12 @@ public class SensorPixelCrossing { ...@@ -93,11 +93,12 @@ public class SensorPixelCrossing {
new BracketingNthOrderBrentSolver(0.0, accuracy, 5); new BracketingNthOrderBrentSolver(0.0, accuracy, 5);
return solver.solve(maxEval, f, -MARGIN, sensor.getNbPixels() - 1 + MARGIN); return solver.solve(maxEval, f, -MARGIN, sensor.getNbPixels() - 1 + MARGIN);
} catch (NoBracketingException nbe) { } catch (MathIllegalArgumentException nbe) {
// there are no solutions in the search interval // there are no solutions in the search interval
return Double.NaN; return Double.NaN;
} catch (TooManyEvaluationsException tmee) { // TODO hipparchus migration : no need for this catch ?
throw new RuggedException(tmee); // } catch (MathIllegalArgumentException tmee) {
// throw new RuggedException(tmee);
} catch (RuggedExceptionWrapper rew) { } catch (RuggedExceptionWrapper rew) {
throw rew.getException(); throw rew.getException();
} }
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
*/ */
package org.orekit.rugged.los; package org.orekit.rugged.los;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.geometry.euclidean.threed.FieldRotation; import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.apache.commons.math3.geometry.euclidean.threed.RotationConvention; import org.hipparchus.geometry.euclidean.threed.RotationConvention;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.errors.RuggedMessages;
import org.orekit.rugged.utils.ParameterType; import org.orekit.rugged.utils.ParameterType;
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
*/ */
package org.orekit.rugged.los; package org.orekit.rugged.los;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.errors.RuggedMessages;
import org.orekit.rugged.utils.ParametricModel; import org.orekit.rugged.utils.ParametricModel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment