diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 7c07c4507475c2e2e5bed87e55e721d2f21ae244..648bde547261e2d690562a0b5b03fb90f74fd9ff 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 242e993080dcd67e2207659794a69c1329bc8810..166e18c4704c59c05fef0a22b4735bf26aeffb5a 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);