public double calculateLOSSlope(LatLonPoint startLLP,int startTotalHeight,LatLonPoint endLLP,int endObjHeight){
  if (dtedCache == null) {
    return 0;
  }
  double arc_dist=startLLP.distance(endLLP);
  int endTotalHeight=endObjHeight + dtedCache.getElevation(endLLP.getLatitude(),endLLP.getLongitude());
  return calculateLOSSlope(startTotalHeight,endTotalHeight,arc_dist);
}

public double calculateLOSSlope ( LatLonPoint startLLP , int startTotalHeight , LatLonPoint endLLP , int endObjHeight ) { if ( dtedCache == null ) { return 0 ; } double arc_dist = startLLP . distance ( endLLP ) ; int endTotalHeight = endObjHeight + dtedCache . getElevation ( endLLP . getLatitude ( ) , endLLP . getLongitude ( ) ) ; return calculateLOSSlope ( startTotalHeight , endTotalHeight , arc_dist ) ; }
calculatelosslope figures out the slope from one point to another . the arc_dist is in radians , and is the radian arc distance of the point from the center point of the image , on the earth . this slope calculation does take the earth ' s curvature into account , based on the spherical model . the slope returned is the angle from the end point to the beginning point , relative to the vertical of the end point to the center of the earth - i . e . starting at the axis pointing straight down into the earth , how many radians do you have to angle up until you hit the starting point . the dted elevation of the end point is gathered from the dted cache .
