Skip to content

Instantly share code, notes, and snippets.

@nickstewart95
Last active July 15, 2022 14:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nickstewart95/ae3d07a2476ab4fd15d3a9349b4af87a to your computer and use it in GitHub Desktop.
$location_x = '-85.491302';
$location_y = '38.36621792373851';
$theta = $location_x - $x;
$distance = sin(deg2rad($location_y)) * sin(deg2rad($y)) + cos(deg2rad($location_y)) * cos(deg2rad($y)) * cos(deg2rad($theta));
$distance = round(rad2deg(acos($distance)) * 60 * 1.1515);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment