|
DovesLapTimer 4.0.0
GPS-based lap timing Arduino library — go-karts to race cars
|
#include <DovesLapTimer.h>Functions | |
| void | displaySectorInfo () |
| void | generateSyntheticFix (unsigned long step, double &lat, double &lng) |
| DovesLapTimer | lapTimer (crossingThresholdMeters, &Serial) |
| void | loop () |
| void | setup () |
Variables | |
| const double | crossingThresholdMeters = 7.0 |
| const unsigned int | LAPS_TO_RUN = 3 |
| const double | sector2PointALat = 28.41310 |
| const double | sector2PointALng = -81.37860 |
| const double | sector2PointBLat = 28.41310 |
| const double | sector2PointBLng = -81.37880 |
| const double | sector3PointALat = 28.41345 |
| const double | sector3PointALng = -81.37925 |
| const double | sector3PointBLat = 28.41365 |
| const double | sector3PointBLng = -81.37925 |
| const float | SIM_ALT_METERS = 50.0f |
| const unsigned long | SIM_MS_PER_STEP = 200 |
| const float | SIM_SPEED_KNOTS = 48.0f |
| unsigned long | simTimeMs = 3600000UL |
| const double | startFinishPointALat = 28.41255 |
| const double | startFinishPointALng = -81.37920 |
| const double | startFinishPointBLat = 28.41275 |
| const double | startFinishPointBLng = -81.37920 |
| unsigned long | stepCount = 0 |
| const unsigned int | STEPS_PER_LAP = 80 |
| const double | TRACK_EAST_LNG = -81.37870 |
| const double | TRACK_NORTH_LAT = 28.41355 |
| const double | TRACK_SOUTH_LAT = 28.41265 |
| const double | TRACK_WEST_LNG = -81.37970 |
| void displaySectorInfo | ( | ) |
| void generateSyntheticFix | ( | unsigned long | step, |
| double & | lat, | ||
| double & | lng | ||
| ) |
| DovesLapTimer lapTimer | ( | crossingThresholdMeters | , |
| & | Serial | ||
| ) |
| void loop | ( | ) |
| void setup | ( | ) |
| const double crossingThresholdMeters = 7.0 |
| const unsigned int LAPS_TO_RUN = 3 |
| const double sector2PointALat = 28.41310 |
| const double sector2PointALng = -81.37860 |
| const double sector2PointBLat = 28.41310 |
| const double sector2PointBLng = -81.37880 |
| const double sector3PointALat = 28.41345 |
| const double sector3PointALng = -81.37925 |
| const double sector3PointBLat = 28.41365 |
| const double sector3PointBLng = -81.37925 |
| const float SIM_ALT_METERS = 50.0f |
| const unsigned long SIM_MS_PER_STEP = 200 |
| const float SIM_SPEED_KNOTS = 48.0f |
| unsigned long simTimeMs = 3600000UL |
| const double startFinishPointALat = 28.41255 |
| const double startFinishPointALng = -81.37920 |
| const double startFinishPointBLat = 28.41275 |
| const double startFinishPointBLng = -81.37920 |
| unsigned long stepCount = 0 |
| const unsigned int STEPS_PER_LAP = 80 |
| const double TRACK_EAST_LNG = -81.37870 |
| const double TRACK_NORTH_LAT = 28.41355 |
| const double TRACK_SOUTH_LAT = 28.41265 |
Sector Timing Example for DovesLapTimer
This example demonstrates 3-sector split timing using a SYNTHETIC GPS track — no GPS hardware required. The library is driven through three simulated laps around a 100m × 100m square loop so you can see sector times, best times, and optimal-lap calculation light up on Serial.
Sector layout:
To adapt for a real track:
| const double TRACK_WEST_LNG = -81.37970 |