Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ffd9730

Browse files
author
Carpenter
committedOct 9, 2019
Updating interpElevationAt() to utilize the lower points in the interpolation algorithm.
1 parent 3b67691 commit ffd9730

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/openmap/com/bbn/openmap/dataAccess/dted/DTEDFrame.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public int interpElevationAt(float lat, float lon) {
230230

231231
int lflon_index = (int) Math.floor(lon_index);
232232
int lclon_index = (int) Math.ceil(lon_index);
233-
/* int lflat_index = (int) Math.floor(lat_index); */
233+
int lflat_index = (int) Math.floor(lat_index);
234234
int lclat_index = (int) Math.ceil(lat_index);
235235

236236
if (elevations[lflon_index] == null)
@@ -256,8 +256,8 @@ public int interpElevationAt(float lat, float lon) {
256256

257257
int ul = elevations[lflon_index][lclat_index];
258258
int ur = elevations[lclon_index][lclat_index];
259-
int ll = elevations[lflon_index][lclat_index];
260-
int lr = elevations[lclon_index][lclat_index];
259+
int ll = elevations[lflon_index][lflat_index];
260+
int lr = elevations[lclon_index][lflat_index];
261261

262262
float answer = resolveFourPoints(ul, ur, lr, ll, lat_index, lon_index);
263263
return Math.round(answer);

1 commit comments

Comments
 (1)

carpenlc commented on Oct 9, 2019

@carpenlc

Fixing #50

Please sign in to comment.