From eaff57665a61c6b1cf90efe15dd23f836e217681 Mon Sep 17 00:00:00 2001 From: Guylaine Prat <guylaine.prat@c-s.fr> Date: Fri, 27 Oct 2017 12:18:13 +0200 Subject: [PATCH] Rename measure to measurement; move refining.measures to adjustment.measurements; remove refining package --- .../rugged/adjustment/AdjustmentContext.java | 16 +-- .../GroundOptimizationProblemBuilder.java | 12 +-- ...nterSensorsOptimizationProblemBuilder.java | 12 +-- .../OptimizationProblemBuilder.java | 12 +-- .../measurements}/Noise.java | 4 +- .../measurements}/Observables.java | 4 +- .../measurements}/SensorMapping.java | 2 +- .../measurements}/SensorToGroundMapping.java | 2 +- .../measurements}/SensorToSensorMapping.java | 2 +- .../org/orekit/rugged/api/RuggedTest.java | 6 +- .../java/RefiningPleiades/GroundRefining.java | 36 +++---- .../java/RefiningPleiades/InterRefining.java | 34 +++--- .../java/RefiningPleiades/Refining.java | 102 +++++++++--------- ...r.java => GroundMeasurementGenerator.java} | 34 +++--- ...or.java => InterMeasurementGenerator.java} | 46 ++++---- .../generators/Measurable.java | 20 ++-- .../metrics/LocalisationMetrics.java | 44 ++++---- 17 files changed, 194 insertions(+), 194 deletions(-) rename src/main/java/org/orekit/rugged/{refining/measures => adjustment/measurements}/Noise.java (96%) rename src/main/java/org/orekit/rugged/{refining/measures => adjustment/measurements}/Observables.java (98%) rename src/main/java/org/orekit/rugged/{refining/measures => adjustment/measurements}/SensorMapping.java (98%) rename src/main/java/org/orekit/rugged/{refining/measures => adjustment/measurements}/SensorToGroundMapping.java (98%) rename src/main/java/org/orekit/rugged/{refining/measures => adjustment/measurements}/SensorToSensorMapping.java (99%) rename src/tutorials/java/RefiningPleiades/generators/{GroundMeasureGenerator.java => GroundMeasurementGenerator.java} (87%) rename src/tutorials/java/RefiningPleiades/generators/{InterMeasureGenerator.java => InterMeasurementGenerator.java} (89%) diff --git a/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java b/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java index cd8bf214..e06953bc 100644 --- a/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java +++ b/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java @@ -32,7 +32,7 @@ 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.refining.measures.Observables; +import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.utils.ParameterDriver; /** Create adjustment context for viewing model refining. @@ -47,8 +47,8 @@ public class AdjustmentContext { /** List of Rugged instances to optimize. */ private final Map<String, Rugged> viewingModel; - /** Set of measures. */ - private final Observables measures; + /** Set of measurements. */ + private final Observables measurements; /** Least square optimizer choice.*/ private OptimizerId optimizerID; @@ -57,15 +57,15 @@ public class AdjustmentContext { /** Build a new instance. * The default optimizer is Gauss Newton with QR decomposition. * @param viewingModel viewing model - * @param measures control and tie points + * @param measurements control and tie points */ - public AdjustmentContext(final Collection<Rugged> viewingModel, final Observables measures) { + public AdjustmentContext(final Collection<Rugged> viewingModel, final Observables measurements) { this.viewingModel = new HashMap<String, Rugged>(); for (final Rugged r : viewingModel) { this.viewingModel.put(r.getName(), r); } - this.measures = measures; + this.measurements = measurements; this.optimizerID = OptimizerId.GAUSS_NEWTON_QR; } @@ -149,11 +149,11 @@ public class AdjustmentContext { switch (ruggedList.size()) { case 1: final Rugged rugged = ruggedList.get(0); - final GroundOptimizationProblemBuilder groundOptimizationProblem = new GroundOptimizationProblemBuilder(selectedSensors, measures, rugged); + final GroundOptimizationProblemBuilder groundOptimizationProblem = new GroundOptimizationProblemBuilder(selectedSensors, measurements, rugged); theProblem = groundOptimizationProblem.build(maxEvaluations, parametersConvergenceThreshold); break; case 2: - final InterSensorsOptimizationProblemBuilder interSensorsOptimizationProblem = new InterSensorsOptimizationProblemBuilder(selectedSensors, measures, ruggedList); + final InterSensorsOptimizationProblemBuilder interSensorsOptimizationProblem = new InterSensorsOptimizationProblemBuilder(selectedSensors, measurements, ruggedList); theProblem = interSensorsOptimizationProblem.build(maxEvaluations, parametersConvergenceThreshold); break; default : diff --git a/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java index 5ea75f87..60abb145 100644 --- a/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java @@ -42,8 +42,8 @@ import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; -import org.orekit.rugged.refining.measures.Observables; -import org.orekit.rugged.refining.measures.SensorToGroundMapping; +import org.orekit.rugged.adjustment.measurements.Observables; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.utils.ParameterDriver; /** @@ -77,15 +77,15 @@ public class GroundOptimizationProblemBuilder extends OptimizationProblemBuilder /** TODO GP description a completer * @param sensors list of sensors to refine - * @param measures set of observables + * @param measurements set of observables * @param rugged name of rugged to refine * @throws RuggedException an exception is generated if no parameters has been selected for refining */ public GroundOptimizationProblemBuilder(final List<LineSensor> sensors, - final Observables measures, final Rugged rugged) + final Observables measurements, final Rugged rugged) throws RuggedException { - super(sensors, measures); + super(sensors, measurements); this.rugged = rugged; this.initMapping(); } @@ -99,7 +99,7 @@ public class GroundOptimizationProblemBuilder extends OptimizationProblemBuilder final String ruggedName = rugged.getName(); this.sensorToGroundMappings = new ArrayList<SensorToGroundMapping>(); for (final LineSensor lineSensor : sensors) { - final SensorToGroundMapping mapping = this.measures.getGroundMapping(ruggedName, lineSensor.getName()); + final SensorToGroundMapping mapping = this.measurements.getGroundMapping(ruggedName, lineSensor.getName()); if (mapping != null) { this.sensorToGroundMappings.add(mapping); } diff --git a/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java index 12835c58..d73fb711 100644 --- a/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java @@ -43,8 +43,8 @@ import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; -import org.orekit.rugged.refining.measures.Observables; -import org.orekit.rugged.refining.measures.SensorToSensorMapping; +import org.orekit.rugged.adjustment.measurements.Observables; +import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; import org.orekit.rugged.utils.SpacecraftToObservedBody; import org.orekit.time.AbsoluteDate; import org.orekit.utils.ParameterDriver; @@ -73,15 +73,15 @@ public class InterSensorsOptimizationProblemBuilder extends OptimizationProblemB /** Constructor * @param sensors list of sensors to refine - * @param measures set of observables + * @param measurements set of observables * @param ruggedList names of rugged to refine * @throws RuggedException an exception is generated if no parameters has been selected for refining */ public InterSensorsOptimizationProblemBuilder(final List<LineSensor> sensors, - final Observables measures, final Collection<Rugged> ruggedList) + final Observables measurements, final Collection<Rugged> ruggedList) throws RuggedException { - super(sensors, measures); + super(sensors, measurements); this.ruggedMap = new LinkedHashMap<String, Rugged>(); for (final Rugged rugged : ruggedList) { this.ruggedMap.put(rugged.getName(), rugged); @@ -105,7 +105,7 @@ public class InterSensorsOptimizationProblemBuilder extends OptimizationProblemB final String sensorNameA = sensorA.getName(); final String sensorNameB = sensorB.getName(); - final SensorToSensorMapping mapping = this.measures.getInterMapping(ruggedNameA, sensorNameA, ruggedNameB, sensorNameB); + final SensorToSensorMapping mapping = this.measurements.getInterMapping(ruggedNameA, sensorNameA, ruggedNameB, sensorNameB); if (mapping != null) { this.sensorToSensorMappings.add(mapping); diff --git a/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java index c8c12ea8..366190ec 100644 --- a/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java @@ -36,7 +36,7 @@ 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.refining.measures.Observables; +import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.utils.DSGenerator; import org.orekit.utils.ParameterDriver; @@ -63,18 +63,18 @@ abstract class OptimizationProblemBuilder { /** Number of parameters to refine. */ protected final int nbParams; - /** Measures. */ - protected Observables measures; + /** Measurements. */ + protected Observables measurements; /** Sensors list. */ protected final List<LineSensor> sensors; /** Constructor. * @param sensors list of sensors to refine - * @param measures set of observables + * @param measurements set of observables * @throws RuggedException an exception is generated if no parameters has been selected for refining */ - OptimizationProblemBuilder(final List<LineSensor> sensors, final Observables measures) throws RuggedException { + OptimizationProblemBuilder(final List<LineSensor> sensors, final Observables measurements) throws RuggedException { try { this.generator = this.createGenerator(sensors); @@ -87,7 +87,7 @@ abstract class OptimizationProblemBuilder { throw rew.getException(); } - this.measures = measures; + this.measurements = measurements; this.sensors = sensors; } diff --git a/src/main/java/org/orekit/rugged/refining/measures/Noise.java b/src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java similarity index 96% rename from src/main/java/org/orekit/rugged/refining/measures/Noise.java rename to src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java index 1c578385..1e2f3f97 100644 --- a/src/main/java/org/orekit/rugged/refining/measures/Noise.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java @@ -14,10 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.orekit.rugged.refining.measures; +package org.orekit.rugged.adjustment.measurements; -/** Class for adding a noise to measures. +/** Class for adding a noise to measurements. * @author Lucie Labat-Allee * @author Guylaine Prat * @since 2.0 diff --git a/src/main/java/org/orekit/rugged/refining/measures/Observables.java b/src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java similarity index 98% rename from src/main/java/org/orekit/rugged/refining/measures/Observables.java rename to src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java index cab15368..4864f428 100644 --- a/src/main/java/org/orekit/rugged/refining/measures/Observables.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.orekit.rugged.refining.measures; +package org.orekit.rugged.adjustment.measurements; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; -/** Class for measures generation. +/** Class for measurements generation. * @see SensorToSensorMapping * @see SensorToGroundMapping * @author Lucie Labat-Allee diff --git a/src/main/java/org/orekit/rugged/refining/measures/SensorMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java similarity index 98% rename from src/main/java/org/orekit/rugged/refining/measures/SensorMapping.java rename to src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java index 8434e3fa..199e3139 100644 --- a/src/main/java/org/orekit/rugged/refining/measures/SensorMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.orekit.rugged.refining.measures; +package org.orekit.rugged.adjustment.measurements; import java.util.Collections; import java.util.LinkedHashMap; diff --git a/src/main/java/org/orekit/rugged/refining/measures/SensorToGroundMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java similarity index 98% rename from src/main/java/org/orekit/rugged/refining/measures/SensorToGroundMapping.java rename to src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java index d8e63b71..5cb1f228 100644 --- a/src/main/java/org/orekit/rugged/refining/measures/SensorToGroundMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.orekit.rugged.refining.measures; +package org.orekit.rugged.adjustment.measurements; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/org/orekit/rugged/refining/measures/SensorToSensorMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java similarity index 99% rename from src/main/java/org/orekit/rugged/refining/measures/SensorToSensorMapping.java rename to src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java index efe85913..931adaa5 100644 --- a/src/main/java/org/orekit/rugged/refining/measures/SensorToSensorMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.orekit.rugged.refining.measures; +package org.orekit.rugged.adjustment.measurements; import java.util.ArrayList; import java.util.List; diff --git a/src/test/java/org/orekit/rugged/api/RuggedTest.java b/src/test/java/org/orekit/rugged/api/RuggedTest.java index 709e0a80..635d318a 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedTest.java @@ -71,7 +71,7 @@ import org.orekit.rugged.los.TimeDependentLOS; import org.orekit.rugged.raster.RandomLandscapeUpdater; import org.orekit.rugged.raster.TileUpdater; import org.orekit.rugged.raster.VolcanicConeElevationUpdater; -import org.orekit.rugged.refining.measures.Observables; +import org.orekit.rugged.adjustment.measurements.Observables; import org.orekit.rugged.utils.DSGenerator; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScale; @@ -1145,9 +1145,9 @@ public class RuggedTest { pitchDriver.setSelected(true); // prepare generator - final Observables measures = new Observables(1); + final Observables measurements = new Observables(1); GroundOptimizationProblemBuilder OptimizationProblembuilder = new GroundOptimizationProblemBuilder(Collections.singletonList(lineSensor), - measures, rugged); + measurements, rugged); DSGenerator generator = OptimizationProblembuilder.getGenerator(); double referenceLine = 0.87654 * dimension; diff --git a/src/tutorials/java/RefiningPleiades/GroundRefining.java b/src/tutorials/java/RefiningPleiades/GroundRefining.java index 21eb12bf..b7735ffb 100644 --- a/src/tutorials/java/RefiningPleiades/GroundRefining.java +++ b/src/tutorials/java/RefiningPleiades/GroundRefining.java @@ -37,8 +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.measures.Noise; -import org.orekit.rugged.refining.measures.SensorToGroundMapping; +import org.orekit.rugged.adjustment.measurements.Noise; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.time.AbsoluteDate; import org.orekit.utils.AngularDerivativesFilter; import org.orekit.utils.CartesianDerivativesFilter; @@ -46,7 +46,7 @@ import org.orekit.utils.PVCoordinates; import org.orekit.utils.TimeStampedAngularCoordinates; import org.orekit.utils.TimeStampedPVCoordinates; -import RefiningPleiades.generators.GroundMeasureGenerator; +import RefiningPleiades.generators.GroundMeasurementGenerator; import RefiningPleiades.metrics.DistanceTools; import RefiningPleiades.models.OrbitModel; import RefiningPleiades.models.PleiadesViewingModel; @@ -58,7 +58,7 @@ import RefiningPleiades.models.PleiadesViewingModel; * @author Lucie Labat-Allee * @author Guylaine Prat * @see SensorToGroundMapping - * @see GroundMeasureGenerator + * @see GroundMeasurementGenerator * @since 2.0 */ public class GroundRefining extends Refining { @@ -76,7 +76,7 @@ public class GroundRefining extends Refining { Rugged rugged; /** Ground measurements */ - GroundMeasureGenerator measures; + GroundMeasurementGenerator measurements; /** Main function */ @@ -170,8 +170,8 @@ public class GroundRefining extends Refining { refining.applyDisruptions(refining.getRugged(), refining.getSensorName(), rollValue, pitchValue, factorValue); - // Generate measures (observations) from physical model disrupted - // -------------------------------------------------------------- + // Generate measurements (observations) from physical model disrupted + // ------------------------------------------------------------------ int lineSampling = 1000; int pixelSampling = 1000; @@ -182,16 +182,16 @@ public class GroundRefining extends Refining { noise.setMean(mean); noise.setStandardDeviation(standardDeviation); - GroundMeasureGenerator measures = refining.generateNoisyPoints(lineSampling, pixelSampling, + GroundMeasurementGenerator measurements = refining.generateNoisyPoints(lineSampling, pixelSampling, refining.getRugged(), refining.getSensorName(), refining.getPleiadesViewingModel().getDimension(), noise); - refining.setMeasures(measures); + refining.setMeasurements(measurements); // Compute ground truth residues // ----------------------------- System.out.format("\n**** Ground truth residuals **** %n"); - refining.computeMetrics(measures.getGroundMapping(), refining.getRugged(), false); + refining.computeMetrics(measurements.getGroundMapping(), refining.getRugged(), false); // Initialize physical model without disruptions // --------------------------------------------- @@ -201,7 +201,7 @@ public class GroundRefining extends Refining { // Compute initial residues // ------------------------ System.out.format("\n**** Initial Residuals **** %n"); - refining.computeMetrics(measures.getGroundMapping(), refining.getRugged(), false); + refining.computeMetrics(measurements.getGroundMapping(), refining.getRugged(), false); // Start optimization // ------------------ @@ -210,7 +210,7 @@ public class GroundRefining extends Refining { int maxIterations = 100; double convergenceThreshold = 1e-14; - refining.optimization(maxIterations, convergenceThreshold, measures.getObservables(), refining.getRugged()); + refining.optimization(maxIterations, convergenceThreshold, measurements.getObservables(), refining.getRugged()); // Check estimated values // ---------------------- @@ -223,10 +223,10 @@ public class GroundRefining extends Refining { System.out.format("\n**** Compute Statistics **** %n"); // Residues computed in meters - refining.computeMetrics(measures.getGroundMapping(), refining.getRugged(), false); + refining.computeMetrics(measurements.getGroundMapping(), refining.getRugged(), false); // Residues computed in degrees - refining.computeMetrics(measures.getGroundMapping(), refining.getRugged(), true); + refining.computeMetrics(measurements.getGroundMapping(), refining.getRugged(), true); } catch (OrekitException oe) { System.err.println(oe.getLocalizedMessage()); @@ -343,11 +343,11 @@ public class GroundRefining extends Refining { } /** - * Set the measures - * @param measures the measures to set + * Set the measurements + * @param measurements the measurements to set */ - public void setMeasures(final GroundMeasureGenerator measures) { - this.measures = measures; + public void setMeasurements(final GroundMeasurementGenerator measurements) { + this.measurements = measurements; } } diff --git a/src/tutorials/java/RefiningPleiades/InterRefining.java b/src/tutorials/java/RefiningPleiades/InterRefining.java index fa07097b..613b269b 100644 --- a/src/tutorials/java/RefiningPleiades/InterRefining.java +++ b/src/tutorials/java/RefiningPleiades/InterRefining.java @@ -39,8 +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.measures.Noise; -import org.orekit.rugged.refining.measures.SensorToGroundMapping; +import org.orekit.rugged.adjustment.measurements.Noise; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.time.AbsoluteDate; import org.orekit.utils.AngularDerivativesFilter; import org.orekit.utils.CartesianDerivativesFilter; @@ -48,8 +48,8 @@ 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.generators.GroundMeasurementGenerator; +import RefiningPleiades.generators.InterMeasurementGenerator; import RefiningPleiades.metrics.DistanceTools; import RefiningPleiades.models.OrbitModel; import RefiningPleiades.models.PleiadesViewingModel; @@ -61,7 +61,7 @@ import RefiningPleiades.models.PleiadesViewingModel; * @author Lucie Labat-Allee * @author Guylaine Prat * @see SensorToGroundMapping - * @see GroundMeasureGenerator + * @see GroundMeasurementGenerator * @since 2.0 */ public class InterRefining extends Refining { @@ -91,7 +91,7 @@ public class InterRefining extends Refining { Rugged ruggedB; /** Inter-measurements (between both viewing models) */ - InterMeasureGenerator measures; + InterMeasurementGenerator measurements; /** Main function @@ -248,8 +248,8 @@ public class InterRefining extends Refining { rollValueB, pitchValueB, factorValue); - // Generate measures (observations) from physical model disrupted - // -------------------------------------------------------------- + // Generate measurements (observations) from physical model disrupted + // ------------------------------------------------------------------ int lineSampling = 1000; int pixelSampling = 1000; @@ -267,18 +267,18 @@ public class InterRefining extends Refining { System.out.format("\tSensor A mean: %f std %f %n",mean[0],standardDeviation[0]); System.out.format("\tSensor B mean: %f std %f %n",mean[1],standardDeviation[1]); - InterMeasureGenerator measures = refining.generateNoisyPoints(lineSampling, pixelSampling, + InterMeasurementGenerator measurements = refining.generateNoisyPoints(lineSampling, pixelSampling, refining.getRuggedA(), refining.getSensorNameA(), refining.getPleiadesViewingModelA().getDimension(), refining.getRuggedB(), refining.getSensorNameB(), refining.getPleiadesViewingModelB().getDimension(), noise); - refining.setMeasures(measures); + refining.setMeasurements(measurements); // Compute ground truth residues // ----------------------------- System.out.format("\n**** Ground truth residuals **** %n"); - refining.computeMetrics(measures.getInterMapping(), refining.getRuggedA(), refining.getRuggedB(), false); + refining.computeMetrics(measurements.getInterMapping(), refining.getRuggedA(), refining.getRuggedB(), false); // Initialize physical models without disruptions // ----------------------------------------------- @@ -289,7 +289,7 @@ public class InterRefining extends Refining { // Compute initial residues // ------------------------ System.out.format("\n**** Initial Residuals **** %n"); - refining.computeMetrics(measures.getInterMapping(), refining.getRuggedA(), refining.getRuggedB(), false); + refining.computeMetrics(measurements.getInterMapping(), refining.getRuggedA(), refining.getRuggedB(), false); // Start optimization // ------------------ @@ -299,7 +299,7 @@ public class InterRefining extends Refining { double convergenceThreshold = 1e-10; refining.optimization(maxIterations, convergenceThreshold, - measures.getObservables(), + measurements.getObservables(), refining.getRuggeds()); // Check estimated values @@ -317,7 +317,7 @@ public class InterRefining extends Refining { // Compute statistics // ------------------ System.out.format("\n**** Compute Statistics **** %n"); - refining.computeMetrics(measures.getInterMapping(), refining.getRuggedA(), refining.getRuggedB(), false); + refining.computeMetrics(measurements.getInterMapping(), refining.getRuggedA(), refining.getRuggedB(), false); } catch (OrekitException oe) { System.err.println(oe.getLocalizedMessage()); @@ -510,9 +510,9 @@ public class InterRefining extends Refining { } /** - * @param measures the measures to set + * @param measurements the measurements to set */ - public void setMeasures(final InterMeasureGenerator measures) { - this.measures = measures; + public void setMeasurements(final InterMeasurementGenerator measurements) { + this.measurements = measurements; } } diff --git a/src/tutorials/java/RefiningPleiades/Refining.java b/src/tutorials/java/RefiningPleiades/Refining.java index dbd5d8b1..5e08a4e1 100644 --- a/src/tutorials/java/RefiningPleiades/Refining.java +++ b/src/tutorials/java/RefiningPleiades/Refining.java @@ -28,13 +28,13 @@ 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.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.adjustment.measurements.Noise; +import org.orekit.rugged.adjustment.measurements.Observables; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; +import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; -import RefiningPleiades.generators.GroundMeasureGenerator; -import RefiningPleiades.generators.InterMeasureGenerator; +import RefiningPleiades.generators.GroundMeasurementGenerator; +import RefiningPleiades.generators.InterMeasurementGenerator; import RefiningPleiades.metrics.LocalisationMetrics; /** @@ -44,8 +44,8 @@ import RefiningPleiades.metrics.LocalisationMetrics; * @author Guylaine Prat * @see SensorToGroundMapping * @see SensorToSensorMapping - * @see GroundMeasureGenerator - * @see InterMeasureGenerator + * @see GroundMeasurementGenerator + * @see InterMeasurementGenerator * @since 2.0 */ public class Refining { @@ -95,23 +95,23 @@ public class Refining { * @param rugged Rugged instance * @param sensorName line sensor name * @param dimension number of line of the sensor - * @return ground measures generator (sensor to ground mapping) + * @return ground measurements generator (sensor to ground mapping) * @throws RuggedException */ - public GroundMeasureGenerator generatePoints(final int lineSampling, final int pixelSampling, + public GroundMeasurementGenerator generatePoints(final int lineSampling, final int pixelSampling, final Rugged rugged, final String sensorName, final int dimension) throws RuggedException { - GroundMeasureGenerator measures = new GroundMeasureGenerator(rugged, sensorName, dimension); + GroundMeasurementGenerator measurements = new GroundMeasurementGenerator(rugged, sensorName, dimension); - System.out.format("\n**** Generate measures (without noise; sensor to ground mapping) **** %n"); + System.out.format("\n**** Generate measurements (without noise; sensor to ground mapping) **** %n"); - // Generation measures without noise - measures.createMeasure(lineSampling, pixelSampling); + // Generation measurements without noise + measurements.createMeasurement(lineSampling, pixelSampling); - System.out.format("Number of tie points generated: %d %n", measures.getMeasureCount()); + System.out.format("Number of tie points generated: %d %n", measurements.getMeasurementCount()); - return measures; + return measurements; } /** Generate measurements without noise (sensor to sensor mapping) @@ -123,10 +123,10 @@ public class Refining { * @param ruggedB Rugged instance of acquisition B * @param sensorNameB line sensor name B * @param dimensionB dimension for acquisition B - * @return inter measures generator (sensor to sensor mapping) + * @return inter measurements generator (sensor to sensor mapping) * @throws RuggedException */ - public InterMeasureGenerator generatePoints(final int lineSampling, final int pixelSampling, + public InterMeasurementGenerator generatePoints(final int lineSampling, final int pixelSampling, final Rugged ruggedA, final String sensorNameA, final int dimensionA, final Rugged ruggedB, final String sensorNameB, final int dimensionB) throws RuggedException { @@ -136,20 +136,20 @@ public class Refining { // Earth constraint weight final double earthConstraintWeight = 0.1; - // Generate measures with constraints on outliers control and Earth distance - InterMeasureGenerator measures = new InterMeasureGenerator(ruggedA, sensorNameA, dimensionA, + // Generate measurements with constraints on outliers control and Earth distance + InterMeasurementGenerator measurements = new InterMeasurementGenerator(ruggedA, sensorNameA, dimensionA, ruggedB, sensorNameB, dimensionB, outlierValue, earthConstraintWeight); - System.out.format("\n**** Generate measures (without noise; sensor to sensor mapping) **** %n"); + System.out.format("\n**** Generate measurements (without noise; sensor to sensor mapping) **** %n"); - // Generation measures without noise - measures.createMeasure(lineSampling, pixelSampling); + // Generation measurements without noise + measurements.createMeasurement(lineSampling, pixelSampling); - System.out.format("Number of tie points generated: %d %n", measures.getMeasureCount()); + System.out.format("Number of tie points generated: %d %n", measurements.getMeasurementCount()); - return measures; + return measurements; } /** Generate noisy measurements (sensor to ground mapping) @@ -158,25 +158,25 @@ public class Refining { * @param rugged Rugged instance * @param sensorName line sensor name * @param dimension dimension - * @param noise Noise structure to generate noisy measures - * @return ground measures generator (sensor to ground mapping) + * @param noise Noise structure to generate noisy measurements + * @return ground measurements generator (sensor to ground mapping) * @throws RuggedException */ - public GroundMeasureGenerator generateNoisyPoints(final int lineSampling, final int pixelSampling, + public GroundMeasurementGenerator generateNoisyPoints(final int lineSampling, final int pixelSampling, final Rugged rugged, final String sensorName, final int dimension, final Noise noise) throws RuggedException { - // Generate ground measures - GroundMeasureGenerator measures = new GroundMeasureGenerator(rugged, sensorName, dimension); + // Generate ground measurements + GroundMeasurementGenerator measurements = new GroundMeasurementGenerator(rugged, sensorName, dimension); - System.out.format("\n**** Generate noisy measures (sensor to ground mapping) **** %n"); + System.out.format("\n**** Generate noisy measurements (sensor to ground mapping) **** %n"); - // Generate noisy measures - measures.createNoisyMeasure(lineSampling, pixelSampling, noise); + // Generate noisy measurements + measurements.createNoisyMeasurement(lineSampling, pixelSampling, noise); - System.out.format("Number of tie points generated: %d %n", measures.getMeasureCount()); + System.out.format("Number of tie points generated: %d %n", measurements.getMeasurementCount()); - return measures; + return measurements; } /** Generate noisy measurements (sensor to sensor mapping) @@ -188,11 +188,11 @@ public class Refining { * @param ruggedB Rugged instance of acquisition B * @param sensorNameB line sensor name B * @param dimensionB dimension for acquisition B - * @param noise noise structure to generate noisy measures - * @return inter-measures generator (sensor to sensor mapping) + * @param noise noise structure to generate noisy measurements + * @return inter-measurements generator (sensor to sensor mapping) * @throws RuggedException */ - public InterMeasureGenerator generateNoisyPoints(final int lineSampling, final int pixelSampling, + public InterMeasurementGenerator generateNoisyPoints(final int lineSampling, final int pixelSampling, final Rugged ruggedA, final String sensorNameA, final int dimensionA, final Rugged ruggedB, final String sensorNameB, final int dimensionB, final Noise noise) throws RuggedException { @@ -203,19 +203,19 @@ public class Refining { // Earth constraint weight final double earthConstraintWeight = 0.1; - // Generate measures with constraints on Earth distance and outliers control - InterMeasureGenerator measures = new InterMeasureGenerator(ruggedA, sensorNameA, dimensionA, + // Generate measurements with constraints on Earth distance and outliers control + InterMeasurementGenerator measurements = new InterMeasurementGenerator(ruggedA, sensorNameA, dimensionA, ruggedB, sensorNameB, dimensionB, outlierValue, earthConstraintWeight); - System.out.format("\n**** Generate noisy measures (sensor to sensor mapping) **** %n"); + System.out.format("\n**** Generate noisy measurements (sensor to sensor mapping) **** %n"); - // Generation noisy measures - measures.createNoisyMeasure(lineSampling, pixelSampling, noise); + // Generation noisy measurements + measurements.createNoisyMeasurement(lineSampling, pixelSampling, noise); - System.out.format("Number of tie points generated: %d %n", measures.getMeasureCount()); + System.out.format("Number of tie points generated: %d %n", measurements.getMeasurementCount()); - return measures; + return measurements; } /** Compute metrics to evaluate geometric performances in location, @@ -304,16 +304,16 @@ public class Refining { /** Start optimization to adjust parameters (fulcrum points study). * @param maxIterations iterations max * @param convergenceThreshold threshold of convergence - * @param measures ground measures + * @param measurements ground measurements * @param rugged Rugged instance * @throws RuggedException */ public void optimization(final int maxIterations, final double convergenceThreshold, - final Observables measures, final Rugged rugged) throws RuggedException { + final Observables measurements, final Rugged rugged) throws RuggedException { System.out.format("Iterations max: %d\tconvergence threshold: %3.6e \n", maxIterations, convergenceThreshold); - AdjustmentContext adjustmentContext = new AdjustmentContext(Collections.singletonList(rugged), measures); + AdjustmentContext adjustmentContext = new AdjustmentContext(Collections.singletonList(rugged), measurements); Optimum optimum = adjustmentContext.estimateFreeParameters(Collections.singletonList(rugged.getName()), maxIterations, convergenceThreshold); // Print statistics @@ -325,12 +325,12 @@ public class Refining { /** Start optimization to adjust parameters (liaison points study). * @param maxIterations iterations max * @param convergenceThreshold threshold of convergence - * @param measures measures + * @param measurements measurements * @param ruggeds Rugged instances A and B * @throws RuggedException */ public void optimization(final int maxIterations, final double convergenceThreshold, - final Observables measures, + final Observables measurements, final Collection<Rugged> ruggeds) throws RuggedException { System.out.format("Iterations max: %d\tconvergence threshold: %3.6e \n", maxIterations, convergenceThreshold); @@ -339,7 +339,7 @@ public class Refining { throw new RuggedException(RuggedMessages.UNSUPPORTED_REFINING_CONTEXT,ruggeds.size()); } - AdjustmentContext adjustmentContext = new AdjustmentContext(ruggeds, measures); + AdjustmentContext adjustmentContext = new AdjustmentContext(ruggeds, measurements); List<String> ruggedNameList = new ArrayList<String>(); for(Rugged rugged : ruggeds) { diff --git a/src/tutorials/java/RefiningPleiades/generators/GroundMeasureGenerator.java b/src/tutorials/java/RefiningPleiades/generators/GroundMeasurementGenerator.java similarity index 87% rename from src/tutorials/java/RefiningPleiades/generators/GroundMeasureGenerator.java rename to src/tutorials/java/RefiningPleiades/generators/GroundMeasurementGenerator.java index 8d0c98ec..21c34ce1 100644 --- a/src/tutorials/java/RefiningPleiades/generators/GroundMeasureGenerator.java +++ b/src/tutorials/java/RefiningPleiades/generators/GroundMeasurementGenerator.java @@ -26,18 +26,18 @@ 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.refining.measures.Noise; -import org.orekit.rugged.refining.measures.Observables; -import org.orekit.rugged.refining.measures.SensorToGroundMapping; +import org.orekit.rugged.adjustment.measurements.Noise; +import org.orekit.rugged.adjustment.measurements.Observables; +import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.time.AbsoluteDate; -/** Ground measures generator (sensor to ground mapping). +/** Ground measurements generator (sensor to ground mapping). * @author Jonathan Guinet * @author Lucie Labat-Allee * @author Guylaine Prat * @since 2.0 */ -public class GroundMeasureGenerator implements Measurable { +public class GroundMeasurementGenerator implements Measurable { /** Sensor to ground mapping. */ private SensorToGroundMapping groundMapping; @@ -54,8 +54,8 @@ public class GroundMeasureGenerator implements Measurable { /** Number of lines of the sensor */ private int dimension; - /** Number of measures */ - private int measureCount; + /** Number of measurements */ + private int measurementCount; /** Simple constructor. * @param rugged Rugged instance @@ -63,7 +63,7 @@ public class GroundMeasureGenerator implements Measurable { * @param dimension number of line of the sensor * @throws RuggedException */ - public GroundMeasureGenerator(final Rugged rugged, final String sensorName, final int dimension) + public GroundMeasurementGenerator(final Rugged rugged, final String sensorName, final int dimension) throws RuggedException { // Generate reference mapping @@ -75,7 +75,7 @@ public class GroundMeasureGenerator implements Measurable { this.rugged = rugged; this.sensor = rugged.getLineSensor(groundMapping.getSensorName()); this.dimension = dimension; - this.measureCount = 0; + this.measurementCount = 0; } /** Get the sensor to ground mapping @@ -93,12 +93,12 @@ public class GroundMeasureGenerator implements Measurable { } @Override - public int getMeasureCount() { - return measureCount; + public int getMeasurementCount() { + return measurementCount; } @Override - public void createMeasure(final int lineSampling, final int pixelSampling) throws RuggedException { + public void createMeasurement(final int lineSampling, final int pixelSampling) throws RuggedException { for (double line = 0; line < dimension; line += lineSampling) { @@ -111,8 +111,8 @@ public class GroundMeasureGenerator implements Measurable { groundMapping.addMapping(new SensorPixel(line, pixel), gp2); - // increment the number of measures - measureCount++; + // increment the number of measurements + measurementCount++; } } @@ -120,7 +120,7 @@ public class GroundMeasureGenerator implements Measurable { } @Override - public void createNoisyMeasure(final int lineSampling, final int pixelSampling, final Noise noise) + public void createNoisyMeasurement(final int lineSampling, final int pixelSampling, final Noise noise) throws RuggedException { // Estimate latitude and longitude errors (rad) @@ -162,8 +162,8 @@ public class GroundMeasureGenerator implements Measurable { groundMapping.addMapping(new SensorPixel(line, pixel), gpNoisy); - // increment the number of measures - measureCount++; + // increment the number of measurements + measurementCount++; } } diff --git a/src/tutorials/java/RefiningPleiades/generators/InterMeasureGenerator.java b/src/tutorials/java/RefiningPleiades/generators/InterMeasurementGenerator.java similarity index 89% rename from src/tutorials/java/RefiningPleiades/generators/InterMeasureGenerator.java rename to src/tutorials/java/RefiningPleiades/generators/InterMeasurementGenerator.java index f13cab47..841be96b 100644 --- a/src/tutorials/java/RefiningPleiades/generators/InterMeasureGenerator.java +++ b/src/tutorials/java/RefiningPleiades/generators/InterMeasurementGenerator.java @@ -26,22 +26,22 @@ import org.orekit.rugged.errors.RuggedExceptionWrapper; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineSensor; 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.adjustment.measurements.Noise; +import org.orekit.rugged.adjustment.measurements.Observables; +import org.orekit.rugged.adjustment.measurements.SensorToSensorMapping; import org.orekit.rugged.utils.SpacecraftToObservedBody; import org.orekit.time.AbsoluteDate; import RefiningPleiades.metrics.DistanceTools; /** - * Inter-measures generator (sensor to sensor mapping). + * Inter-measurements generator (sensor to sensor mapping). * @author Jonathan Guinet * @author Lucie Labatallee * @author Guylaine Prat * @since 2.0 */ -public class InterMeasureGenerator implements Measurable { +public class InterMeasurementGenerator implements Measurable { /** Mapping from sensor A to sensor B. */ private SensorToSensorMapping interMapping; @@ -61,8 +61,8 @@ public class InterMeasureGenerator implements Measurable { /** Sensor B */ private LineSensor sensorB; - /** Number of measures */ - private int measureCount; + /** Number of measurements */ + private int measurementCount; // TODO GP pas utilise ... // private String sensorNameA; @@ -80,7 +80,7 @@ public class InterMeasureGenerator implements Measurable { private double outlier; - /** Default constructor: measures generation without outlier points control + /** Default constructor: measurements generation without outlier points control * and without Earth distance constraint. * @param ruggedA Rugged instance corresponding to the viewing model A * @param sensorNameA sensor name A @@ -90,7 +90,7 @@ public class InterMeasureGenerator implements Measurable { * @param dimensionB number of line for acquisition B * @throws RuggedException */ - public InterMeasureGenerator(final Rugged ruggedA, final String sensorNameA, final int dimensionA, + public InterMeasurementGenerator(final Rugged ruggedA, final String sensorNameA, final int dimensionA, final Rugged ruggedB, final String sensorNameB, final int dimensionB) throws RuggedException { @@ -105,7 +105,7 @@ public class InterMeasureGenerator implements Measurable { } - /** Constructor for measures generation taking into account outlier points control, + /** Constructor for measurements generation taking into account outlier points control, * without Earth distance constraint. * @param ruggedA Rugged instance corresponding to the viewing model A * @param sensorNameA sensor name A @@ -116,7 +116,7 @@ public class InterMeasureGenerator implements Measurable { * @param outlier limit value for outlier points * @throws RuggedException */ - public InterMeasureGenerator(final Rugged ruggedA, final String sensorNameA, final int dimensionA, + public InterMeasurementGenerator(final Rugged ruggedA, final String sensorNameA, final int dimensionA, final Rugged ruggedB, final String sensorNameB, final int dimensionB, final double outlier) throws RuggedException { @@ -125,7 +125,7 @@ public class InterMeasureGenerator implements Measurable { this.outlier = outlier; } - /** Constructor for measures generation taking into account outlier points control, + /** Constructor for measurements generation taking into account outlier points control, * and Earth distance constraint. * @param ruggedA Rugged instance corresponding to the viewing model A * @param sensorNameA sensor name A @@ -138,7 +138,7 @@ public class InterMeasureGenerator implements Measurable { * with respect to the LOS distance (between 0 and 1). * @throws RuggedException */ - public InterMeasureGenerator(final Rugged ruggedA, final String sensorNameA, final int dimensionA, + public InterMeasurementGenerator(final Rugged ruggedA, final String sensorNameA, final int dimensionA, final Rugged ruggedB, final String sensorNameB, final int dimensionB, final double outlier, final double earthConstraintWeight) throws RuggedException { @@ -174,12 +174,12 @@ public class InterMeasureGenerator implements Measurable { } @Override - public int getMeasureCount() { - return measureCount; + public int getMeasurementCount() { + return measurementCount; } @Override - public void createMeasure(final int lineSampling, final int pixelSampling) throws RuggedException { + public void createMeasurement(final int lineSampling, final int pixelSampling) throws RuggedException { // Search the sensor pixel seeing point final int minLine = 0; @@ -225,8 +225,8 @@ public class InterMeasureGenerator implements Measurable { interMapping.addMapping(RealPixelA, RealPixelB, losDistance, earthDistance); - // increment the number of measures - this.measureCount++; + // increment the number of measurements + this.measurementCount++; } } } @@ -242,7 +242,7 @@ public class InterMeasureGenerator implements Measurable { * @param noise errors to apply to measure for pixel A and pixel B * @throws RuggedException */ - public void createNoisyMeasure(final int lineSampling, final int pixelSampling, final Noise noise) + public void createNoisyMeasurement(final int lineSampling, final int pixelSampling, final Noise noise) throws RuggedException { // Get noise features (errors) @@ -309,8 +309,8 @@ public class InterMeasureGenerator implements Measurable { interMapping.addMapping(RealPixelA, RealPixelB, losDistance, earthDistance); - // increment the number of measures - this.measureCount++; + // increment the number of measurements + this.measurementCount++; } } } @@ -319,7 +319,7 @@ public class InterMeasureGenerator implements Measurable { this.observables.addInterMapping(interMapping); } - /** Default constructor: measures generation without outlier points control + /** Default constructor: measurements generation without outlier points control * and Earth distances constraint. * @param rA Rugged instance A * @param sNameA sensor name A @@ -348,6 +348,6 @@ public class InterMeasureGenerator implements Measurable { this.dimensionA = dimA; this.dimensionB = dimB; - this.measureCount = 0; + this.measurementCount = 0; } } diff --git a/src/tutorials/java/RefiningPleiades/generators/Measurable.java b/src/tutorials/java/RefiningPleiades/generators/Measurable.java index ab00f2ec..77532b2e 100644 --- a/src/tutorials/java/RefiningPleiades/generators/Measurable.java +++ b/src/tutorials/java/RefiningPleiades/generators/Measurable.java @@ -17,34 +17,34 @@ package RefiningPleiades.generators; import org.orekit.rugged.errors.RuggedException; -import org.orekit.rugged.refining.measures.Noise; +import org.orekit.rugged.adjustment.measurements.Noise; -/** For measures generator. +/** For measurements generator. * @author Lucie Labat-Allee * @author Guylaine Prat * @since 2.0 */ public interface Measurable { - /** Get the number of measures - * @return the number of measures + /** Get the number of measurements + * @return the number of measurements * @throws RuggedException */ - int getMeasureCount() throws RuggedException; + int getMeasurementCount() throws RuggedException; - /** Create measures (without noise) + /** Create measurements (without noise) * @param lineSampling line sampling * @param pixelSampling pixel sampling * @throws RuggedException */ - void createMeasure(int lineSampling, int pixelSampling) throws RuggedException; + void createMeasurement(int lineSampling, int pixelSampling) throws RuggedException; - /** Create noisy measures + /** Create noisy measurements * @param lineSampling line sampling * @param pixelSampling pixel sampling - * @param noise the noise to add to the measures + * @param noise the noise to add to the measurements * @throws RuggedException */ - void createNoisyMeasure(int lineSampling, int pixelSampling, Noise noise) throws RuggedException; + void createNoisyMeasurement(int lineSampling, int pixelSampling, Noise noise) throws RuggedException; } diff --git a/src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java b/src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java index 93a97ffc..d87437c4 100644 --- a/src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java +++ b/src/tutorials/java/RefiningPleiades/metrics/LocalisationMetrics.java @@ -27,8 +27,8 @@ 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.refining.measures.SensorToGroundMapping; -import org.orekit.rugged.refining.measures.SensorToSensorMapping; +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; @@ -65,7 +65,7 @@ public class LocalisationMetrics { /** Compute metrics corresponding to the ground points study. - * @param measMapping Mapping of observations/measures = the ground truth + * @param measMapping Mapping of observations/measurements = the ground truth * @param rugged Rugged instance * @param computeAngular flag to know if distance is computed in meters (false) or with angular (true) * @exception RuggedException if direct location fails @@ -82,7 +82,7 @@ public class LocalisationMetrics { } /** Compute metrics corresponding to the liaison points study. - * @param measMapping Mapping of observations/measures = the ground truth + * @param measMapping Mapping of observations/measurements = the ground truth * @param ruggedA Rugged instance corresponding to viewing model A * @param ruggedB Rugged instance corresponding to viewing model B * @param computeAngular flag to know if distance is computed in meters (false) or with angular (true) @@ -106,7 +106,7 @@ public class LocalisationMetrics { /** * Compute metrics: case of ground control points. - * @param measMapping Mapping of observations/measures = the ground truth + * @param measMapping Mapping of observations/measurements = the ground truth * @param rugged Rugged instance * @param computeAngular flag to know if distance is computed in meters (false) or with angular (true) * @exception RuggedException if direct location fails @@ -114,23 +114,23 @@ public class LocalisationMetrics { public void computeMetrics(final SensorToGroundMapping measMapping, final Rugged rugged, final boolean computeAngular) throws RuggedException { - // Mapping of observations/measures = the ground truth - final Set<Map.Entry<SensorPixel, GeodeticPoint>> measuresMapping; + // Mapping of observations/measurements = the ground truth + final Set<Map.Entry<SensorPixel, GeodeticPoint>> measurementsMapping; final LineSensor lineSensor; // counter for compute mean distance double count = 0; // Initialization - measuresMapping = measMapping.getMapping(); + measurementsMapping = measMapping.getMapping(); lineSensor = rugged.getLineSensor(measMapping.getSensorName()); - // number of measures - int nbMeas = measuresMapping.size(); + // number of measurements + int nbMeas = measurementsMapping.size(); - final Iterator<Map.Entry<SensorPixel, GeodeticPoint>> gtIt = measuresMapping.iterator(); + final Iterator<Map.Entry<SensorPixel, GeodeticPoint>> gtIt = measurementsMapping.iterator(); - // Browse map of measures + // Browse map of measurements while (gtIt.hasNext()) { final Map.Entry<SensorPixel, GeodeticPoint> gtMeas = gtIt.next(); @@ -158,7 +158,7 @@ public class LocalisationMetrics { /** * Compute metrics: case of liaison points. - * @param measMapping Mapping of observations/measures = the ground truth + * @param measMapping Mapping of observations/measurements = the ground truth * @param ruggedA Rugged instance corresponding to viewing model A * @param ruggedB Rugged instance corresponding to viewing model B * @param computeAngular Flag to know if distance is computed in meters (false) or with angular (true) @@ -168,28 +168,28 @@ public class LocalisationMetrics { final boolean computeAngular) throws RuggedException { - // Mapping of observations/measures = the ground truth - final Set<Map.Entry<SensorPixel, SensorPixel>> measuresMapping; + // Mapping of observations/measurements = the ground truth + final Set<Map.Entry<SensorPixel, SensorPixel>> measurementsMapping; final LineSensor lineSensorA; // line sensor corresponding to rugged A final LineSensor lineSensorB; // line sensor corresponding to rugged B double count = 0; // counter for computing remaining mean distance double losDistanceCount = 0; // counter for computing LOS distance mean double earthDistanceCount = 0; // counter for computing Earth distance mean - int i = 0; // increment of measures + int i = 0; // increment of measurements // Initialization - measuresMapping = measMapping.getMapping(); + measurementsMapping = measMapping.getMapping(); lineSensorA = ruggedA.getLineSensor(measMapping.getSensorNameA()); lineSensorB = ruggedB.getLineSensor(measMapping.getSensorNameB()); - int nbMeas = measuresMapping.size(); // number of measures + int nbMeas = measurementsMapping.size(); // number of measurements - // Browse map of measures - for (Iterator<Map.Entry<SensorPixel, SensorPixel>> gtIt = measuresMapping.iterator(); + // Browse map of measurements + for (Iterator<Map.Entry<SensorPixel, SensorPixel>> gtIt = measurementsMapping.iterator(); gtIt.hasNext(); i++) { - if (i == measuresMapping.size()) { + if (i == measurementsMapping.size()) { break; } @@ -224,7 +224,7 @@ public class LocalisationMetrics { // Earth distance control final double estEarthDistance = distances[1]; // Earth distance estimation - final double measEarthDistance = measMapping.getEarthDistance(i).doubleValue(); // Earth measured distance + final double measEarthDistance = measMapping.getEarthDistance(i).doubleValue(); // Earth measurement distance final double earthDistance = FastMath.abs(estEarthDistance - measEarthDistance); if (earthDistance > earthDistanceMax) { -- GitLab