Class DuvenhageAlgorithm
- java.lang.Object
-
- org.orekit.rugged.intersection.duvenhage.DuvenhageAlgorithm
-
- All Implemented Interfaces:
IntersectionAlgorithm
public class DuvenhageAlgorithm extends Object implements IntersectionAlgorithm
Digital Elevation Model intersection using Bernardt Duvenhage's algorithm.The algorithm is described in the 2009 paper: Using An Implicit Min/Max KD-Tree for Doing Efficient Terrain Line of Sight Calculations.
- Author:
- Luc Maisonobe, Guylaine Prat
-
-
Constructor Summary
Constructors Constructor Description DuvenhageAlgorithm(TileUpdater updater, int maxCachedTiles, boolean flatBody, boolean isOverlappingTiles)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmId
getAlgorithmId()
Get the algorithmId.double
getElevation(double latitude, double longitude)
Get elevation at a given ground point.NormalizedGeodeticPoint
intersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los)
Compute intersection of line with Digital Elevation Model.NormalizedGeodeticPoint
refineIntersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los, NormalizedGeodeticPoint closeGuess)
Refine intersection of line with Digital Elevation Model.
-
-
-
Constructor Detail
-
DuvenhageAlgorithm
public DuvenhageAlgorithm(TileUpdater updater, int maxCachedTiles, boolean flatBody, boolean isOverlappingTiles)
Simple constructor.- Parameters:
updater
- updater used to load Digital Elevation Model tilesmaxCachedTiles
- maximum number of tiles stored in the cacheflatBody
- if true, the body is considered flat, i.e. lines computed from entry/exit points in the DEM are considered to be straight lines also in geodetic coordinates. The sagitta resulting from real ellipsoid curvature is therefore not corrected in this case. As this computation is not costly (a few percents overhead), it is highly recommended to set this parameter tofalse
. This flag is mainly intended for comparison purposes with other systemsisOverlappingTiles
- flag to tell if the DEM tiles are overlapping: true if overlapping; false otherwise.
-
-
Method Detail
-
intersection
public NormalizedGeodeticPoint intersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los)
Compute intersection of line with Digital Elevation Model.- Specified by:
intersection
in interfaceIntersectionAlgorithm
- Parameters:
ellipsoid
- reference ellipsoidposition
- pixel position in ellipsoid framelos
- pixel line-of-sight in ellipsoid frame- Returns:
- point at which the line first enters ground
-
refineIntersection
public NormalizedGeodeticPoint refineIntersection(ExtendedEllipsoid ellipsoid, Vector3D position, Vector3D los, NormalizedGeodeticPoint closeGuess)
Refine intersection of line with Digital Elevation Model.This method is used to refine an intersection when a close guess is already known. The intersection is typically looked for by a direct
cell intersection
in the tile which already contains the close guess, or any similar very fast algorithm.- Specified by:
refineIntersection
in interfaceIntersectionAlgorithm
- Parameters:
ellipsoid
- reference ellipsoidposition
- pixel position in ellipsoid framelos
- pixel line-of-sight in ellipsoid framecloseGuess
- guess close to the real intersection- Returns:
- point at which the line first enters ground
-
getElevation
public double getElevation(double latitude, double longitude)
Get elevation at a given ground point.- Specified by:
getElevation
in interfaceIntersectionAlgorithm
- Parameters:
latitude
- ground point latitudelongitude
- ground point longitude- Returns:
- elevation at specified point
-
getAlgorithmId
public AlgorithmId getAlgorithmId()
Get the algorithmId.- Specified by:
getAlgorithmId
in interfaceIntersectionAlgorithm
- Returns:
- the algorithmId
-
-