Skip to content

Commit affacf0

Browse files
Updated activity recording migration
1 parent 70d4664 commit affacf0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/controllers/activities/recordings/getActivityRecordingFromArray.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export default function getActivityRecordingFromArray(sessions: RecordingV1Sessi
1919
return {
2020
id: session.id,
2121

22+
// Significant changes were not calculated prior to RideTrackerApp-0.9.3.
23+
2224
coordinates: session.locations.filter((location, index, array) => {
2325
if(index === 0 || index === array.length - 1)
2426
return true;
@@ -105,7 +107,7 @@ export default function getActivityRecordingFromArray(sessions: RecordingV1Sessi
105107
if(index === 0 || index === array.length - 1)
106108
return true;
107109

108-
if(Math.abs(location.coords.speed - speed) < 1)
110+
if(Math.abs(location.coords.speed - speed) < (1 / 3.6))
109111
return false;
110112

111113
speed = location.coords.speed;

0 commit comments

Comments
 (0)