Skip to content

Commit

Permalink
Start at first point of each segment
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 1, 2024
1 parent b9982a4 commit e32bdeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stravavis/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def process_gpx(gpxfile: str) -> pd.DataFrame | None:

for activity_track in activity.tracks:
for segment in activity_track.segments:
if not activity.tracks[0].segments[0].points:
if not segment.points:
continue

x0 = activity.tracks[0].segments[0].points[0].longitude
y0 = activity.tracks[0].segments[0].points[0].latitude
x0 = segment.points[0].longitude
y0 = segment.points[0].latitude
d0 = 0
for point in segment.points:
x = point.longitude
Expand Down

0 comments on commit e32bdeb

Please sign in to comment.