]>
gitweb.michael.orlitzky.com - dead/census-tools.git/blob - GPS.py
bc2e20be64b5e04e62ea836369aa73ae601de4fe
5 """Represents a set of GPS coordinates (latitude/longitude)."""
13 def CalculateDistance(p1
, p2
):
15 Calculate the distance between two Coordinates, p1 and p2.
17 delta_x
= p2
.longitude
- p1
.longitude
18 delta_y
= p2
.latitude
- p1
.latitude
19 euclidean_distance
= sqrt(delta_x
**2 + delta_y
**2)
21 return euclidean_distance