From e9c9acf1499ece26e2ebf43987ea3e45ecae1673 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe <luc@orekit.org> Date: Wed, 7 May 2014 10:28:09 +0200 Subject: [PATCH] Renamed setLineSensor into addLineSensor. The new name explains more clearly that several sensors can be set up at once. --- src/main/java/org/orekit/rugged/api/Rugged.java | 8 ++++---- src/test/java/org/orekit/rugged/api/RuggedTest.java | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 7c07c450..648bde54 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -297,7 +297,7 @@ public class Rugged { /** Set up line sensor model. * @param lineSensor line sensor model */ - public void setLineSensor(final LineSensor lineSensor) { + public void addLineSensor(final LineSensor lineSensor) { sensors.put(lineSensor.getName(), lineSensor); } @@ -481,7 +481,7 @@ public class Rugged { */ public GeodeticPoint[] directLocalization(final String sensorName, final double lineNumber) throws RuggedException { - final LineSensor sensor = getSensor(sensorName); + final LineSensor sensor = getLineSensor(sensorName); return directLocalization(sensor, 0, sensor.getNbPixels(), algorithm, lineNumber); } @@ -576,7 +576,7 @@ public class Rugged { throws RuggedException { try { - final LineSensor sensor = getSensor(sensorName); + final LineSensor sensor = getLineSensor(sensorName); final Vector3D target = ellipsoid.transform(groundPoint); final UnivariateSolver coarseSolver = @@ -841,7 +841,7 @@ public class Rugged { * @return selected sensor * @exception RuggedException if sensor is not known */ - private LineSensor getSensor(final String sensorName) throws RuggedException { + private LineSensor getLineSensor(final String sensorName) throws RuggedException { final LineSensor sensor = sensors.get(sensorName); if (sensor == null) { throw new RuggedException(RuggedMessages.UNKNOWN_SENSOR, sensorName); diff --git a/src/test/java/org/orekit/rugged/api/RuggedTest.java b/src/test/java/org/orekit/rugged/api/RuggedTest.java index 242e9930..166e18c4 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedTest.java @@ -227,7 +227,7 @@ public class RuggedTest { rugged.setLightTimeCorrection(true); rugged.setAberrationOfLightCorrection(true); - rugged.setLineSensor(lineSensor); + rugged.addLineSensor(lineSensor); try { @@ -298,7 +298,7 @@ public class RuggedTest { orbitToPV(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 8, orbitToQ(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 2); - rugged.setLineSensor(lineSensor); + rugged.addLineSensor(lineSensor); rugged.setLightTimeCorrection(true); rugged.setAberrationOfLightCorrection(false); @@ -348,7 +348,7 @@ public class RuggedTest { orbitToPV(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 8, orbitToQ(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 2); - rugged.setLineSensor(lineSensor); + rugged.addLineSensor(lineSensor); rugged.setLightTimeCorrection(false); rugged.setAberrationOfLightCorrection(true); @@ -402,14 +402,14 @@ public class RuggedTest { EllipsoidId.WGS84, InertialFrameId.EME2000, BodyRotatingFrameId.ITRF, orbitToPV(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 8, orbitToQ(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 2); - ruggedFull.setLineSensor(lineSensor); + ruggedFull.addLineSensor(lineSensor); GeodeticPoint[] gpWithFlatBodyCorrection = ruggedFull.directLocalization("line", 100); Rugged ruggedFlat = new Rugged(updater, 8, AlgorithmId.DUVENHAGE_FLAT_BODY, EllipsoidId.WGS84, InertialFrameId.EME2000, BodyRotatingFrameId.ITRF, orbitToPV(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 8, orbitToQ(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 2); - ruggedFlat.setLineSensor(lineSensor); + ruggedFlat.addLineSensor(lineSensor); GeodeticPoint[] gpWithoutFlatBodyCorrection = ruggedFlat.directLocalization("line", 100); SummaryStatistics stats = new SummaryStatistics(); @@ -468,7 +468,7 @@ public class RuggedTest { orbitToQ(orbit, earth, lineDatation, firstLine, lastLine, 0.25), 2); rugged.setLightTimeCorrection(lightTimeCorrection); rugged.setAberrationOfLightCorrection(aberrationOfLightCorrection); - rugged.setLineSensor(lineSensor); + rugged.addLineSensor(lineSensor); double referenceLine = 0.56789 * dimension; GeodeticPoint[] gp = rugged.directLocalization("line", referenceLine); -- GitLab