kopia lustrzana https://github.com/magicbug/Cloudlog
Added unit information to qra.php library
rodzic
9891b44ae3
commit
6aa0e5dfcc
|
@ -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)) *
|
||||
|
|
Ładowanie…
Reference in New Issue