OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.
The method DTEDFrame.interpElevationAt() is producing unexpected values for the output elevation value. As an example, using a sample DTED2 elevation file and point lat=-14.123 (index=3157.1995) and lon=-68.555 (index=1601.9989) the nearest 4 elevation posts in this dataset are:
ur = 1513
ul = 1522
ll = 1523
lr = 1515
Manually calculating a bilinear interpolation shows that the output elevation should be very close to the lower-right elevation post which is 1515 meters, but the resulting value is near the upper-right post (i.e. 1513). The code is not utilizing the lower elevation posts to generate the output interpolated value.
The method DTEDFrame.interpElevationAt() is producing unexpected values for the output elevation value. As an example, using a sample DTED2 elevation file and point lat=-14.123 (index=3157.1995) and lon=-68.555 (index=1601.9989) the nearest 4 elevation posts in this dataset are:
ur = 1513 ul = 1522 ll = 1523 lr = 1515
Manually calculating a bilinear interpolation shows that the output elevation should be very close to the lower-right elevation post which is 1515 meters, but the resulting value is near the upper-right post (i.e. 1513). The code is not utilizing the lower elevation posts to generate the output interpolated value.