]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - src/GPS.py
Added the linear program solving the midatlantic region.
[dead/census-tools.git] / src / GPS.py
index bc2e20be64b5e04e62ea836369aa73ae601de4fe..59f8d5b3c2092ba3df2b16cce8c66c449f0526d9 100644 (file)
@@ -1,21 +1,6 @@
-from math import sqrt
-
-
 class Coordinates:
-    """Represents a set of GPS coordinates (latitude/longitude)."""
+    """Represents a set of GPS coordinates (longitude/latitude)."""
     
-    def __init__(self):
-        self.latitude = 0
-        self.longitude = 0
-        
-
-
-def CalculateDistance(p1, p2):
-    """
-    Calculate the distance between two Coordinates, p1 and p2.
-    """
-    delta_x = p2.longitude - p1.longitude
-    delta_y = p2.latitude - p1.latitude
-    euclidean_distance = sqrt(delta_x**2 + delta_y**2)
-    
-    return euclidean_distance
+    def __init__(self, x=0, y=0):
+        self.longitude = x
+        self.latitude = y