From 056195a188920fbedc230c0dd94377287f7052af Mon Sep 17 00:00:00 2001 From: Mondei1 Date: Wed, 28 Oct 2020 13:13:02 +0100 Subject: [PATCH] Fix bug where distance was calculated wrongly --- frontend/src/app/dashboard/dashboard.component.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index 4be3a06..20cbca1 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -78,8 +78,6 @@ export class DashboardComponent implements AfterViewInit { const dist1 = beats[i].coordinate; const dist2 = beats[i + 1].coordinate; tDistance += this.api.distanceInKmBetweenEarthCoordinates(dist1[0], dist1[1], dist2[0], dist2[1]); - - i++; } this.totalDistance = tDistance.toFixed(2);