diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index b39d620b5639f14301c9573939a177b2b451c283..00a58715407c180efdbe3d14cbd56417b16e8fae 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -569,7 +569,7 @@ public class Rugged { // find the pixel along the line final double meanPixel = solver.solve(INVERSE_LOCALIZATION_MAX_EVAL, new SensorPixelCrossing(sensor, targetDirection), - 0, sensor.getNbPixels()); + -1.0, sensor.getNbPixels()); // TODO: fix pixel offset with respect to mean sensor plane final double fixedLine = meanLine; diff --git a/src/test/java/org/orekit/rugged/api/RuggedTest.java b/src/test/java/org/orekit/rugged/api/RuggedTest.java index fbd7234e1f2a541644edb8650085a4e174c6c9a7..ab8c5fe384a9c38e09f05f3cc132c4054912a8ef 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedTest.java @@ -484,7 +484,7 @@ public class RuggedTest { double referenceLine = 100.00; GeodeticPoint[] gp = rugged.directLocalization("line", referenceLine); - for (int i = 1; i < gp.length; ++i) { + for (int i = 0; i < gp.length; ++i) { SensorPixel sp = rugged.inverseLocalization("line", gp[i], 0, dimension); Assert.assertEquals(referenceLine, sp.getLineNumber(), 3.0e-9); Assert.assertEquals(i, sp.getPixelNumber(), 8.0e-5);