This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is the implementation Haversine Distance Algorithm between two places | |
* @author ananth | |
* R = earth’s radius (mean radius = 6,371km) | |
Δlat = lat2− lat1 | |
Δlong = long2− long1 | |
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2) | |
c = 2.atan2(√a, √(1−a)) | |
d = R.c | |
* |