sw7 detect laps from coordinates #9

Merged
schaermicha1 merged 2 commits from sw7_lap_detection into master 2026-05-08 15:45:25 +02:00
Owner

How the algorithm works:

  • Get list of coordinates from the JSON.
  • For each coordinate (we call this the start/finish point)
    • Calculate the distance chronologically from each coordinate to the start/finish point.
      • At the same time, keep track of the distance traveled on the current lap.
    • If the distance is close enough, register that the start/finish area was entered and increase the number of laps completed.
      • For the radius, we take the minimum distance from two following coordinates

The procedure is done for every coordinate, as we don't know what coordinate is a possible "hotspot" beforehand. We take the max laps counted, as it indicates that the starting point used for that run must be on the lap itself.

How the algorithm works: - Get list of coordinates from the JSON. - For each coordinate (we call this the start/finish point) - Calculate the distance chronologically from each coordinate to the start/finish point. - At the same time, keep track of the distance traveled on the current lap. - If the distance is close enough, register that the start/finish area was entered and increase the number of laps completed. - For the radius, we take the minimum distance from two following coordinates The procedure is done for every coordinate, as we don't know what coordinate is a possible "hotspot" beforehand. We take the max laps counted, as it indicates that the starting point used for that run must be on the lap itself.
schaermicha1 added 1 commit 2026-04-11 15:55:31 +02:00
schaermicha1 requested review from schmidmarco 2026-04-11 15:55:31 +02:00
schaermicha1 added 1 commit 2026-04-11 23:10:39 +02:00
schaermicha1 merged commit eb6a242257 into master 2026-05-08 15:45:25 +02:00
schaermicha1 deleted branch sw7_lap_detection 2026-05-08 15:45:25 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: schaermicha1/PPE2#9
No description provided.