Use Pythagoras to calculate the distance between two locations in km (based on their respective longitudes and latitudes).
For example: Berlin's coordinates are [52.5200°, 13.4050°]. New York's coordinates are [40.7128°, 74.0059°].
The two cities are approx 4811 km apart, according to Pythagoras (not taking into account factors such as the Earth's curvature).
- The earth's radius is assumed as 6371 km.
- Degrees to Radians: rad = deg * pi/180