Added unit information to qra.php library

pull/306/head
Peter Goodhall 2019-06-24 12:10:49 +01:00
rodzic 9891b44ae3
commit 6aa0e5dfcc
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -20,6 +20,15 @@ class Qra {
}
}
/*
Info: Distance Function
M = Miles
K = Kilometers
N = Nautical Miles
*/
function distance($lat1, $lon1, $lat2, $lon2, $unit = 'M') {
$theta = $lon1 - $lon2;
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) *