diff --git a/src/main/java/org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java b/src/main/java/org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java index 2ab466a2f375dd946f5de833c0191959e6ef8e6c..813a7fb31980147c5b783ae4d433ab56392632eb 100644 --- a/src/main/java/org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java +++ b/src/main/java/org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java @@ -115,7 +115,7 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm { current = ellipsoid.transform(forward, ellipsoid.getBodyFrame(), null); tile = cache.getTile(current.getLatitude(), current.getLongitude()); - if (tile.interpolateElevation(current.getLatitude(), current.getLongitude()) <= current.getAltitude()) { + if (tile.interpolateElevation(current.getLatitude(), current.getLongitude()) >= current.getAltitude()) { // extremely rare case! The line-of-sight traversed the Digital Elevation Model // during the very short forward step we used to move to next tile // we consider this point to be OK