More robust geofence checking

This commit is contained in:
Paulus Schoutsen committed 2015-10-02 08:16:53 -07:00
1 parent 42b80868d4
commit 9bdfa89b7c
7 files changed
+44 -36

No files matched your search

+2 -2
View File
@@ -31,6 +31,6 @@ def detect_location_info():
return LocationInfo(**data)
def distance(lon1, lat1, lon2, lat2):
def distance(lat1, lon1, lat2, lon2):
""" Calculate the distance in meters between two points. """
return vincenty((lon1, lat1), (lon2, lat2)) * 1000
return vincenty((lat1, lon1), (lat2, lon2)) * 1000