From c1f0659a515ff99bfef68c020882fc0c8a292328 Mon Sep 17 00:00:00 2001
From: Guylaine Prat <guylaine.prat@c-s.fr>
Date: Tue, 24 Oct 2017 10:41:19 +0200
Subject: [PATCH] Migration of packages under refining (generators, metrics,
 models) under tutorials

---
 .../java/RefiningPleiades/GroundRefining.java         |  9 +++++----
 .../java/RefiningPleiades/InterRefining.java          | 11 ++++++-----
 src/tutorials/java/RefiningPleiades/Refining.java     |  7 ++++---
 .../generators/GroundMeasureGenerator.java            |  2 +-
 .../generators/InterMeasureGenerator.java             |  5 +++--
 .../java/RefiningPleiades}/generators/Measurable.java |  2 +-
 .../java/RefiningPleiades}/metrics/DistanceTools.java |  4 ++--
 .../metrics/LocalisationMetrics.java                  |  8 ++++----
 .../java/RefiningPleiades}/models/OrbitModel.java     |  2 +-
 .../models/PleiadesViewingModel.java                  |  2 +-
 10 files changed, 28 insertions(+), 24 deletions(-)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/generators/GroundMeasureGenerator.java (99%)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/generators/InterMeasureGenerator.java (99%)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/generators/Measurable.java (97%)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/metrics/DistanceTools.java (96%)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/metrics/LocalisationMetrics.java (97%)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/models/OrbitModel.java (99%)
 rename src/{main/java/org/orekit/rugged/refining => tutorials/java/RefiningPleiades}/models/PleiadesViewingModel.java (99%)

diff --git a/src/tutorials/java/RefiningPleiades/GroundRefining.java b/src/tutorials/java/RefiningPleiades/GroundRefining.java
index 4703b072..0ee1e3a4 100644
--- a/src/tutorials/java/RefiningPleiades/GroundRefining.java
+++ b/src/tutorials/java/RefiningPleiades/GroundRefining.java
@@ -37,12 +37,8 @@ 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.refining.generators.GroundMeasureGenerator;
 import org.orekit.rugged.refining.measures.Noise;
 import org.orekit.rugged.refining.measures.SensorToGroundMapping;
-import org.orekit.rugged.refining.metrics.DistanceTools;
-import org.orekit.rugged.refining.models.OrbitModel;
-import org.orekit.rugged.refining.models.PleiadesViewingModel;
 import org.orekit.time.AbsoluteDate;
 import org.orekit.utils.AngularDerivativesFilter;
 import org.orekit.utils.CartesianDerivativesFilter;
@@ -50,6 +46,11 @@ import org.orekit.utils.PVCoordinates;
 import org.orekit.utils.TimeStampedAngularCoordinates;
 import org.orekit.utils.TimeStampedPVCoordinates;
 
+import RefiningPleiades.generators.GroundMeasureGenerator;
+import RefiningPleiades.metrics.DistanceTools;
+import RefiningPleiades.models.OrbitModel;
+import RefiningPleiades.models.PleiadesViewingModel;
+
 /**
  * Class for testing refining (fulcrum points study)
  * with or without noisy measurements
diff --git a/src/tutorials/java/RefiningPleiades/InterRefining.java b/src/tutorials/java/RefiningPleiades/InterRefining.java
index 9d17f7a2..75f9fa8e 100644
--- a/src/tutorials/java/RefiningPleiades/InterRefining.java
+++ b/src/tutorials/java/RefiningPleiades/InterRefining.java
@@ -39,13 +39,8 @@ 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.refining.generators.GroundMeasureGenerator;
-import org.orekit.rugged.refining.generators.InterMeasureGenerator;
 import org.orekit.rugged.refining.measures.Noise;
 import org.orekit.rugged.refining.measures.SensorToGroundMapping;
-import org.orekit.rugged.refining.metrics.DistanceTools;
-import org.orekit.rugged.refining.models.OrbitModel;
-import org.orekit.rugged.refining.models.PleiadesViewingModel;
 import org.orekit.time.AbsoluteDate;
 import org.orekit.utils.AngularDerivativesFilter;
 import org.orekit.utils.CartesianDerivativesFilter;
@@ -53,6 +48,12 @@ import org.orekit.utils.PVCoordinates;
 import org.orekit.utils.TimeStampedAngularCoordinates;
 import org.orekit.utils.TimeStampedPVCoordinates;
 
+import RefiningPleiades.generators.GroundMeasureGenerator;
+import RefiningPleiades.generators.InterMeasureGenerator;
+import RefiningPleiades.metrics.DistanceTools;
+import RefiningPleiades.models.OrbitModel;
+import RefiningPleiades.models.PleiadesViewingModel;
+
 /**
  * Class for testing refining (liaison points study)
  * with or without noisy measurements
diff --git a/src/tutorials/java/RefiningPleiades/Refining.java b/src/tutorials/java/RefiningPleiades/Refining.java
index 5d71a81f..6b0cacbc 100644
--- a/src/tutorials/java/RefiningPleiades/Refining.java
+++ b/src/tutorials/java/RefiningPleiades/Refining.java
@@ -28,13 +28,14 @@ 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.refining.generators.GroundMeasureGenerator;
-import org.orekit.rugged.refining.generators.InterMeasureGenerator;
 import org.orekit.rugged.refining.measures.Noise;
 import org.orekit.rugged.refining.measures.Observables;
 import org.orekit.rugged.refining.measures.SensorToGroundMapping;
 import org.orekit.rugged.refining.measures.SensorToSensorMapping;
-import org.orekit.rugged.refining.metrics.LocalisationMetrics;
+
+import RefiningPleiades.generators.GroundMeasureGenerator;
+import RefiningPleiades.generators.InterMeasureGenerator;
+import RefiningPleiades.metrics.LocalisationMetrics;
 
 /**
  * Class for refining problems common methods
diff --git a/src/main/java/org/orekit/rugged/refining/generators/GroundMeasureGenerator.java b/src/tutorials/java/RefiningPleiades/generators/GroundMeasureGenerator.java
similarity index 99%
rename from src/main/java/org/orekit/rugged/refining/generators/GroundMeasureGenerator.java
rename to src/tutorials/java/RefiningPleiades/generators/GroundMeasureGenerator.java
index 6d9bc4c6..8d0c98ec 100644
--- a/src/main/java/org/orekit/rugged/refining/generators/GroundMeasureGenerator.java
+++ b/src/tutorials/java/RefiningPleiades/generators/GroundMeasureGenerator.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.generators;
+package RefiningPleiades.generators;
 
 import org.hipparchus.geometry.euclidean.threed.Vector3D;
 import org.hipparchus.random.GaussianRandomGenerator;
diff --git a/src/main/java/org/orekit/rugged/refining/generators/InterMeasureGenerator.java b/src/tutorials/java/RefiningPleiades/generators/InterMeasureGenerator.java
similarity index 99%
rename from src/main/java/org/orekit/rugged/refining/generators/InterMeasureGenerator.java
rename to src/tutorials/java/RefiningPleiades/generators/InterMeasureGenerator.java
index 3fa808ad..f13cab47 100644
--- a/src/main/java/org/orekit/rugged/refining/generators/InterMeasureGenerator.java
+++ b/src/tutorials/java/RefiningPleiades/generators/InterMeasureGenerator.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.generators;
+package RefiningPleiades.generators;
 
 import org.hipparchus.random.GaussianRandomGenerator;
 import org.hipparchus.random.UncorrelatedRandomVectorGenerator;
@@ -29,10 +29,11 @@ import org.orekit.rugged.linesensor.SensorPixel;
 import org.orekit.rugged.refining.measures.Noise;
 import org.orekit.rugged.refining.measures.Observables;
 import org.orekit.rugged.refining.measures.SensorToSensorMapping;
-import org.orekit.rugged.refining.metrics.DistanceTools;
 import org.orekit.rugged.utils.SpacecraftToObservedBody;
 import org.orekit.time.AbsoluteDate;
 
+import RefiningPleiades.metrics.DistanceTools;
+
 /**
  * Inter-measures generator (sensor to sensor mapping).
  * @author Jonathan Guinet
diff --git a/src/main/java/org/orekit/rugged/refining/generators/Measurable.java b/src/tutorials/java/RefiningPleiades/generators/Measurable.java
similarity index 97%
rename from src/main/java/org/orekit/rugged/refining/generators/Measurable.java
rename to src/tutorials/java/RefiningPleiades/generators/Measurable.java
index 985663aa..ab00f2ec 100644
--- a/src/main/java/org/orekit/rugged/refining/generators/Measurable.java
+++ b/src/tutorials/java/RefiningPleiades/generators/Measurable.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.generators;
+package RefiningPleiades.generators;
 
 import org.orekit.rugged.errors.RuggedException;
 import org.orekit.rugged.refining.measures.Noise;
diff --git a/src/main/java/org/orekit/rugged/refining/metrics/DistanceTools.java b/src/tutorials/java/RefiningPleiades/metrics/DistanceTools.java
similarity index 96%
rename from src/main/java/org/orekit/rugged/refining/metrics/DistanceTools.java
rename to src/tutorials/java/RefiningPleiades/metrics/DistanceTools.java
index 3e4184a2..e48c97fc 100644
--- a/src/main/java/org/orekit/rugged/refining/metrics/DistanceTools.java
+++ b/src/tutorials/java/RefiningPleiades/metrics/DistanceTools.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.metrics;
+package RefiningPleiades.metrics;
 
 import org.hipparchus.geometry.euclidean.threed.Vector3D;
 import org.hipparchus.util.FastMath;
@@ -42,7 +42,7 @@ public class DistanceTools {
      * @param lat1 Latitude of first geodetic point (rad)
      * @param long2 Longitude of second geodetic point (rad)
      * @param lat2 Latitude of second geodetic point (rad)
-     * @param computeAngular if true, distance will be angular
+     * @param computeAngular if true, distance will be angular, otherwise will be in meters
      * @return distance in meters or radians if flag computeAngular is true
      */
     public static double computeDistance(final double long1, final double lat1,
diff --git a/src/main/java/org/orekit/rugged/refining/metrics/LocalisationMetrics.java b/src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java
similarity index 97%
rename from src/main/java/org/orekit/rugged/refining/metrics/LocalisationMetrics.java
rename to src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java
index b6662f62..93a97ffc 100644
--- a/src/main/java/org/orekit/rugged/refining/metrics/LocalisationMetrics.java
+++ b/src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.metrics;
+package RefiningPleiades.metrics;
 
 import java.util.Iterator;
 import java.util.Map;
@@ -142,11 +142,11 @@ public class LocalisationMetrics {
 
             final GeodeticPoint esGP = rugged.directLocation(date, lineSensor.getPosition(),
                                                              lineSensor.getLOS(date,
-                                                                               (int) gtSP.getPixelNumber()));
+                                                             (int) gtSP.getPixelNumber()));
             // Compute distance
             double distance = DistanceTools.computeDistance(esGP.getLongitude(), esGP.getLatitude(),
-                                                     gtGP.getLongitude(), gtGP.getLatitude(),
-                                                     computeAngular);
+                                                            gtGP.getLongitude(), gtGP.getLatitude(),
+                                                            computeAngular);
             count += distance;
             if (distance > resMax) {
                 resMax = distance;
diff --git a/src/main/java/org/orekit/rugged/refining/models/OrbitModel.java b/src/tutorials/java/RefiningPleiades/models/OrbitModel.java
similarity index 99%
rename from src/main/java/org/orekit/rugged/refining/models/OrbitModel.java
rename to src/tutorials/java/RefiningPleiades/models/OrbitModel.java
index c77028df..5c19aa9e 100644
--- a/src/main/java/org/orekit/rugged/refining/models/OrbitModel.java
+++ b/src/tutorials/java/RefiningPleiades/models/OrbitModel.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.models;
+package RefiningPleiades.models;
 
 import org.hipparchus.geometry.euclidean.threed.Rotation;
 import org.hipparchus.geometry.euclidean.threed.RotationOrder;
diff --git a/src/main/java/org/orekit/rugged/refining/models/PleiadesViewingModel.java b/src/tutorials/java/RefiningPleiades/models/PleiadesViewingModel.java
similarity index 99%
rename from src/main/java/org/orekit/rugged/refining/models/PleiadesViewingModel.java
rename to src/tutorials/java/RefiningPleiades/models/PleiadesViewingModel.java
index 2051061b..83541a8b 100644
--- a/src/main/java/org/orekit/rugged/refining/models/PleiadesViewingModel.java
+++ b/src/tutorials/java/RefiningPleiades/models/PleiadesViewingModel.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.orekit.rugged.refining.models;
+package RefiningPleiades.models;
 
 import org.hipparchus.geometry.euclidean.threed.Rotation;
 import org.hipparchus.geometry.euclidean.threed.RotationConvention;
-- 
GitLab