aboutsummaryrefslogtreecommitdiff
path: root/hdist.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-04-27 17:27:43 -0400
committerAlex Auvolat <alex.auvolat@ens.fr>2015-04-27 17:27:43 -0400
commit9a60f6c4e39c09187710608a9e225b6024b34364 (patch)
tree92e43401b6c6d3982081a35ec680b82856ec00c0 /hdist.py
parent107b3798cca35472e158d94f36a0bd08f3fe1fe8 (diff)
downloadtaxi-9a60f6c4e39c09187710608a9e225b6024b34364.tar.gz
taxi-9a60f6c4e39c09187710608a9e225b6024b34364.zip
Add validation set ; fix lat/lon
Diffstat (limited to 'hdist.py')
-rw-r--r--hdist.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/hdist.py b/hdist.py
index 4944cb8..ca9dba6 100644
--- a/hdist.py
+++ b/hdist.py
@@ -6,10 +6,10 @@ def hdist(a, b):
rearth = numpy.float32(6371)
deg2rad = numpy.float32(3.14159265358979 / 180)
- lat1 = a[:, 0] * deg2rad
- lon1 = a[:, 1] * deg2rad
- lat2 = b[:, 0] * deg2rad
- lon2 = b[:, 1] * deg2rad
+ lat1 = a[:, 1] * deg2rad
+ lon1 = a[:, 0] * deg2rad
+ lat2 = b[:, 1] * deg2rad
+ lon2 = b[:, 0] * deg2rad
dlat = abs(lat1-lat2)
dlon = abs(lon1-lon2)