diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-04-27 17:27:43 -0400 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-04-27 17:27:43 -0400 |
commit | 9a60f6c4e39c09187710608a9e225b6024b34364 (patch) | |
tree | 92e43401b6c6d3982081a35ec680b82856ec00c0 /hdist.py | |
parent | 107b3798cca35472e158d94f36a0bd08f3fe1fe8 (diff) | |
download | taxi-9a60f6c4e39c09187710608a9e225b6024b34364.tar.gz taxi-9a60f6c4e39c09187710608a9e225b6024b34364.zip |
Add validation set ; fix lat/lon
Diffstat (limited to 'hdist.py')
-rw-r--r-- | hdist.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |