approxAngularDistance function
Cosine of angular distance between two geographic points.
Implementation
double approxAngularDistance(double lat1, double lon1, double lat2, double lon2) {
return math.sin(lat1) * math.sin(lat2) +
math.cos(lat1) * math.cos(lat2) * math.cos(lon1 - lon2);
}