Touch up distance API
This commit is contained in:
parent
4448de1288
commit
f79748c113
|
@ -48,8 +48,9 @@ def collars_distance():
|
|||
|
||||
distance_kilometers = 0
|
||||
coords_pairs = list(map(lambda e : (e.longitude, e.latitude), coords))
|
||||
if len(coord_pairs) < 1: continue
|
||||
|
||||
coord_last = coords_pairs.pop()
|
||||
coord_last = coords_pairs.pop(0)
|
||||
for coord in coords_pairs:
|
||||
distance_kilometers += geopy.distance.VincentyDistance(coord_last,coord).km
|
||||
coord_last = coord
|
||||
|
|
Loading…
Reference in New Issue
Block a user