<How to calculate distance between two locations u...
# stackoverflow
u
How to calculate distance between two locations using their lat and long value and find the locations between those two point fun getNewLatLongs(Double latitude, Double longitude,Float distance) Pair { double earth = 6378.137; // radius of earth in kms double pi = Math.PI; double m = 1 / (2 * pi / 360 * earth) / 1000; //1 meter in degree double newLatitude = ("%.4f".format(latitude + distance * m)).toDouble(); val newLongitude = ("%.4f".format(longitude + distance * m / kotlin.math.cos(latitude * (pi / 180)))).toDouble(); return Pair(newLatitude, newLongitude); }