diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 7426efcaab765af4d30a431a35b68f1fa6b684ab..f8b109b4cf21cb39b9b0d40fe83b0a8e99629511 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -726,7 +726,7 @@ public class Rugged { // set up the starting point of the fixed point method final double pixel0 = sp0.getPixelNumber(); final double line0 = sp0.getLineNumber(); - // Needed data for the dump + // Needed data for the dump sensor.dumpRate(line0); // Apply fixed point method until convergence in pixel and line diff --git a/src/main/java/org/orekit/rugged/errors/DumpManager.java b/src/main/java/org/orekit/rugged/errors/DumpManager.java index 78e0f2a803a8efc9f7de650cc47534477bb775ab..7fc33bf5bd552e4597739f08aa56f52209fbd767 100644 --- a/src/main/java/org/orekit/rugged/errors/DumpManager.java +++ b/src/main/java/org/orekit/rugged/errors/DumpManager.java @@ -108,9 +108,9 @@ public class DumpManager { isSuspended = false; } } - - /** In case dump is suspended and an exception is thrown, - * allow the dump to end nicely. + + /** In case dump is suspended and an exception is thrown, + * allows the dump to end nicely. */ public static void endNicely() { isSuspended = false; diff --git a/src/main/java/org/orekit/rugged/linesensor/LineSensor.java b/src/main/java/org/orekit/rugged/linesensor/LineSensor.java index 9963174f5ca43ef7b132bf3c655e762e99e88ce9..9f4569b4833c4c9945633a3a137620977699a253 100644 --- a/src/main/java/org/orekit/rugged/linesensor/LineSensor.java +++ b/src/main/java/org/orekit/rugged/linesensor/LineSensor.java @@ -183,8 +183,8 @@ public class LineSensor { public Vector3D getPosition() { return position; } - - /** Dump the rate for the current line number + + /** Dump the rate for the current line number. * @param lineNumber line number */ public void dumpRate(final double lineNumber) { diff --git a/src/main/java/org/orekit/rugged/raster/TilesCache.java b/src/main/java/org/orekit/rugged/raster/TilesCache.java index 6e487987487563aaf6911174a6405686032756ab..528048e17c4297f8fb9609498e1429e14de3d2fd 100644 --- a/src/main/java/org/orekit/rugged/raster/TilesCache.java +++ b/src/main/java/org/orekit/rugged/raster/TilesCache.java @@ -19,6 +19,7 @@ package org.orekit.rugged.raster; import org.hipparchus.util.FastMath; import java.lang.reflect.Array; +import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; @@ -86,7 +87,16 @@ public class TilesCache<T extends Tile> { // create the tile and retrieve its data final T tile = factory.createTile(); + + // In case dump is asked for, suspend the dump manager as we don't need to dump anything here + // For instance for SRTM DEM, the user needs to read Geoid data that are not useful in the dump + final Boolean wasSuspended = DumpManager.suspend(); + updater.updateTile(latitude, longitude, tile); + + // Resume the dump manager if necessary + DumpManager.resume(wasSuspended); + tile.tileUpdateCompleted(); if (tile.getLocation(latitude, longitude) != Tile.Location.HAS_INTERPOLATION_NEIGHBORS) {