Sprint (Point-to-Point) Timing Example for DovesLapTimer's SprintTimer
Demonstrates sprint-mode run timing — autocross / hillclimb style: a START line and a SEPARATE FINISH line, no laps — using a SYNTHETIC GPS course, no GPS hardware required. The timer is driven through three simulated runs down a 500 m straight (loop back on a parallel return leg between runs) so you can watch run times, split segments, best-run and optimal tracking light up on Serial.
Course layout (x = meters along the course):
0m ── START(50m) ── S2(150m) ── S3(300m) ── FINISH(450m) ── 500m |----------— timed run: 400m -----------—| return leg 40m north of the course, outside every crossing zone
Sprint semantics demonstrated:
- a start-line crossing begins a run; a finish-line crossing ends it
- crossing the start again MID-RUN cancels and restarts (botched course)
- finish crossings with no active run are ignored (the return loop)
- splits are optional: zero, one, or two lines are all legal
To adapt for a real course:
- Replace the line coordinates below with your own (Google Maps right-click -> copy lat,lng).
- Delete the synthetic-drive block in loop().
- Feed real GPS: lat, lng, altitude (m), speed (knots) into sprintTimer.loop(), and ms-since-midnight into sprintTimer.updateCurrentTime().
RAM note: each configured line owns an independent crossing buffer (~2.9 KB each on 32-bit targets). SprintTimer targets modern MCUs (nRF52840, ESP32, ...) — it does not fit small AVRs.