Skip to content

Commit

Permalink
require meters
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Davis committed Jul 18, 2020
1 parent 40e7542 commit 4a5f44f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpsfun/tracks.py
Expand Up @@ -90,7 +90,7 @@ def time(self):
"moving_time": self.moving_time,
}

def distance(self, unit="mi"):
def distance(self):
"""
:return:
"""
Expand All @@ -100,7 +100,7 @@ def distance(self, unit="mi"):
self.df["distance_between"] = self.df.apply(
lambda x: sqrt(
(haversine((x["Latitude"], x["Longitude"]),
(x["shift_Latitude"], x["shift_Longitude"]), unit=unit,)** 2
(x["shift_Latitude"], x["shift_Longitude"]), unit="m",)** 2
+ x["altitude_change"] ** 2)),axis=1)
self.df.drop(['shift_Longitude', 'shift_Latitude'], axis=1)
self.total_distance = self.df["distance_between"].sum()
Expand Down

0 comments on commit 4a5f44f

Please sign in to comment.