From f0f5dc4bd78292da8b01eac093c187c999fd744c Mon Sep 17 00:00:00 2001 From: Rick Hays Date: Tue, 1 Oct 2019 15:02:14 -0500 Subject: [PATCH] Corrected Straight Line Distances, found I left the UNIT set to N when testing and distances were in Nautical Miles. Signed-off-by: Rick Hays --- RX.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RX.php b/RX.php index 077697b..4d0edbe 100644 --- a/RX.php +++ b/RX.php @@ -31,7 +31,7 @@ include_once 'classes/geocode.php'; $result = $db->query('SELECT rowid,* FROM pharmacies'); foreach ($result as $row) { - $distance = $geo->straight_line_distance($Lat, $Lon, $row['Latitude'], $row['Longitude'], 'N'); + $distance = $geo->straight_line_distance($Lat, $Lon, $row['Latitude'], $row['Longitude']); if ($distance < $shortest) { $pharmacy = $row['Pharmacy'];