Skip to content

Instantly share code, notes, and snippets.

View KminekMatej's full-sized avatar

Matěj Kmínek KminekMatej

View GitHub Profile
{
"contact": {
"type": "user",
"id": 189742717,
"full_name": "Antonin Tyralik",
"name": "Antonin Tyralik",
"email": "kminekmatej@boost.space",
"user_id": "Subject022",
"phone_number": null,
"phone": null,
const EARTH_RADIUS = 6371000;
/**
* Calculates the great-circle distance between two points, with
* the Haversine formula.
*
* @param float $latitudeFrom Latitude of start point in [deg decimal]
* @param float $longitudeFrom Longitude of start point in [deg decimal]
* @param float $latitudeTo Latitude of target point in [deg decimal]