From 721d9e957db187d5c7775c6302cd366580666101 Mon Sep 17 00:00:00 2001 From: Guylaine Prat <guylaine.prat@c-s.fr> Date: Tue, 15 Jan 2019 15:20:49 +0100 Subject: [PATCH] Reactivate atmospheric computation before inverse location failed In case the inverse location failed, but computation continue (for instance while computing an inverse loc grid), the user can manage the failure and continue the computation of the grid. So the atmospheric computation must be reactivated. --- src/main/java/org/orekit/rugged/api/Rugged.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 63afee42..1b218466 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -755,11 +755,12 @@ public class Rugged { // compute the sensor pixel on the desired ground point WITHOUT atmosphere atmosphericRefraction.deactivateComputation(); final SensorPixel sp0 = inverseLocation(sensorName, point, minLine, maxLine); + atmosphericRefraction.reactivateComputation(); + if (sp0 == null) { - // Impossible to find the point in the given min line and max line + // Impossible to find the point in the given min line and max line (without atmosphere) throw new RuggedException(RuggedMessages.INVALID_RANGE_FOR_LINES, minLine, maxLine, ""); } - atmosphericRefraction.reactivateComputation(); // set up the starting point of the fixed point method final double pixel0 = sp0.getPixelNumber(); -- GitLab