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 <rhays@haysgang.com>
This commit is contained in:
2019-10-01 15:02:14 -05:00
parent a8eda42e64
commit f0f5dc4bd7

2
RX.php
View File

@@ -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'];