From d188c07305c2d2357c3a98832e0d561772f75b03 Mon Sep 17 00:00:00 2001 From: Guylaine Prat <guylaine.prat@c-s.fr> Date: Mon, 30 Oct 2017 13:17:02 +0100 Subject: [PATCH] Checktyle corrections: internal representation exposures; unsued import --- .../rugged/adjustment/measurements/Noise.java | 35 +++++++++---------- .../measurements/SensorToSensorMapping.java | 6 +--- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java b/src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java index 8498df8f..9a5dbfc1 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/Noise.java @@ -28,7 +28,7 @@ public class Noise { private static final int GAUSSIAN = 0; /** Dimension. */ - private static int dimension; + private int dimension; /** Mean. */ private double[] mean; @@ -47,50 +47,49 @@ public class Noise { this.mean = new double[dimension]; this.standardDeviation = new double[dimension]; - Noise.dimension = dimension; + this.dimension = dimension; this.distribution = distribution; } - /** Get the mean + /** Get the mean. * @return the mean */ public double[] getMean() { - return mean; + return mean.clone(); } - /** Set the mean - * @param mean the mean to set + /** Set the mean. + * @param meanValue the mean to set */ - public void setMean(final double[] mean) { - this.mean = mean; + public void setMean(final double[] meanValue) { + this.mean = meanValue.clone(); } - /** Get the standard deviation + /** Get the standard deviation. * @return the standard deviation */ public double[] getStandardDeviation() { - return standardDeviation; + return standardDeviation.clone(); } - /** Set the standard deviation - * @param standardDeviation the standard deviation to set + /** Set the standard deviation. + * @param standardDeviationValue the standard deviation to set */ - public void setStandardDeviation(final double[] standardDeviation) { - this.standardDeviation = standardDeviation; + public void setStandardDeviation(final double[] standardDeviationValue) { + this.standardDeviation = standardDeviationValue.clone(); } - /** Get the distribution + /** Get the distribution. * @return the distribution */ public int getDistribution() { return distribution; } - /** Get the dimension + /** Get the dimension. * @return the dimension */ - public static int getDimension() { + public int getDimension() { return dimension; } } - diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java index 2b425d4d..3428fba4 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java @@ -21,15 +21,11 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.orekit.rugged.api.Rugged; -import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.SensorPixel; -import org.orekit.rugged.utils.SpacecraftToObservedBody; -import org.orekit.time.AbsoluteDate; /** Container for mapping sensors pixels of two viewing models. * Store the distance between both lines of sight computed with - * {@link Rugged#distanceBetweenLOS(LineSensor, AbsoluteDate, double, SpacecraftToObservedBody, LineSensor, AbsoluteDate, double)} + * {@link org.orekit.rugged.api.Rugged#distanceBetweenLOS(org.orekit.rugged.linesensor.LineSensor, org.orekit.time.AbsoluteDate, double, org.orekit.rugged.utils.SpacecraftToObservedBody, org.orekit.rugged.linesensor.LineSensor, org.orekit.time.AbsoluteDate, double)} * <p> Constraints in relation to Earth distance can be added. * @see SensorMapping * @author Lucie LabatAllee -- GitLab