|
DovesLapTimer 4.3.0
GPS-based lap timing Arduino library — go-karts to race cars
|
#include <SprintTimer.h>
Collaboration diagram for SprintTimer:Public Member Functions | |
| bool | areSectorLinesConfigured () const |
| True when at least one split line is configured (note: NOT the circuit timer's both-or-nothing rule — a single split is legal). | |
| void | forceCatmullRomInterpolation () |
| void | forceLinearInterpolation () |
| float | getBestLapDistance () const |
| int | getBestLapNumber () const |
| unsigned long | getBestLapTime () const |
| float | getBestRunDistance () const |
| int | getBestRunNumber () const |
| 1-based run number that set the best time (0 = none yet). | |
| unsigned long | getBestRunTime () const |
| int | getBestSector1LapNumber () const |
| unsigned long | getBestSector1Time () const |
| int | getBestSector2LapNumber () const |
| unsigned long | getBestSector2Time () const |
| int | getBestSector3LapNumber () const |
| unsigned long | getBestSector3Time () const |
| int | getCancelledRunCount () const |
| Runs cancelled by re-crossing the start line mid-run. | |
| bool | getCrossing () const |
| True while inside any configured line's crossing zone. | |
| float | getCurrentLapDistance () const |
| unsigned long | getCurrentLapSector1Time () const |
| unsigned long | getCurrentLapSector2Time () const |
| unsigned long | getCurrentLapSector3Time () const |
| unsigned long | getCurrentLapTime () const |
| float | getCurrentRunDistance () const |
| unsigned long | getCurrentRunTime () const |
| Elapsed ms of the run in progress, 0 while WAITING. | |
| int | getCurrentSector () const |
| Current segment (1..N) while a run is active, 0 while WAITING. | |
| float | getCurrentSpeedKmh () const |
| float | getCurrentSpeedMph () const |
| int | getDirection () const |
| int | getLaps () const |
| float | getLastLapDistance () const |
| unsigned long | getLastLapTime () const |
| float | getLastRunDistance () const |
| unsigned long | getLastRunTime () const |
| unsigned long | getOptimalLapTime () const |
| Sum of best segment times (theoretical best run). 0 unless at least one split is configured and every segment has a best recorded. | |
| float | getPaceDifference () const |
| Pace delta vs the best run in ms per meter (see DovesLapTimer::getPaceDifference). 0 while WAITING. | |
| bool | getRaceStarted () const |
| True once any run has ever started this session. | |
| unsigned int | getRejectedCrossingCount () const |
| Total zone exits whose interpolation was rejected, all lines. | |
| int | getRuns () const |
| Completed run count this session. | |
| float | getTotalDistanceTraveled () const |
| bool | isDirectionResolved () const |
| bool | isFinishLineConfigured () const |
| bool | isRunActive () const |
| True while a run is in progress (between start and finish). | |
| bool | isStartLineConfigured () const |
| int | loop (double currentLat, double currentLng, float currentAltitudeMeters, float currentSpeedKnots) |
| Feed a GPS fix. Call updateCurrentTime() first, then this, on every fix — identical contract to DovesLapTimer::loop(). | |
| void | reset () |
| Reset all run/timing state to zero. Configured lines are kept. | |
| void | setFinishLine (double pointALat, double pointALng, double pointBLat, double pointBLng) |
| Sets the FINISH line (a run completes when it is crossed while a run is active). | |
| void | setSector2Line (double pointALat, double pointALng, double pointBLat, double pointBLng) |
| Sets the optional sector 2 split line (closes segment 1). | |
| void | setSector3Line (double pointALat, double pointALng, double pointBLat, double pointBLng) |
| Sets the optional sector 3 split line (closes the segment after sector 2's, or segment 1 if sector 2 is not configured). | |
| void | setStartLine (double pointALat, double pointALng, double pointBLat, double pointBLng) |
| Sets the START line (a run begins when it is crossed). | |
| SprintTimer (double crossingThresholdMeters=7, Stream *debugSerial=NULL) | |
| void | updateCurrentTime (unsigned long currentTimeMilliseconds) |
| Updates the current GPS time since midnight (milliseconds). | |
| SprintTimer::SprintTimer | ( | double | crossingThresholdMeters = 7, |
| Stream * | debugSerial = NULL |
||
| ) |
| bool SprintTimer::areSectorLinesConfigured | ( | ) | const |
True when at least one split line is configured (note: NOT the circuit timer's both-or-nothing rule — a single split is legal).
| void SprintTimer::forceCatmullRomInterpolation | ( | ) |
| void SprintTimer::forceLinearInterpolation | ( | ) |
|
inline |
|
inline |
|
inline |
| float SprintTimer::getBestRunDistance | ( | ) | const |
| int SprintTimer::getBestRunNumber | ( | ) | const |
1-based run number that set the best time (0 = none yet).
| unsigned long SprintTimer::getBestRunTime | ( | ) | const |
| int SprintTimer::getBestSector1LapNumber | ( | ) | const |
| unsigned long SprintTimer::getBestSector1Time | ( | ) | const |
| int SprintTimer::getBestSector2LapNumber | ( | ) | const |
| unsigned long SprintTimer::getBestSector2Time | ( | ) | const |
| int SprintTimer::getBestSector3LapNumber | ( | ) | const |
| unsigned long SprintTimer::getBestSector3Time | ( | ) | const |
| int SprintTimer::getCancelledRunCount | ( | ) | const |
Runs cancelled by re-crossing the start line mid-run.
| bool SprintTimer::getCrossing | ( | ) | const |
True while inside any configured line's crossing zone.
|
inline |
| unsigned long SprintTimer::getCurrentLapSector1Time | ( | ) | const |
| unsigned long SprintTimer::getCurrentLapSector2Time | ( | ) | const |
| unsigned long SprintTimer::getCurrentLapSector3Time | ( | ) | const |
|
inline |
| float SprintTimer::getCurrentRunDistance | ( | ) | const |
| unsigned long SprintTimer::getCurrentRunTime | ( | ) | const |
Elapsed ms of the run in progress, 0 while WAITING.
| int SprintTimer::getCurrentSector | ( | ) | const |
Current segment (1..N) while a run is active, 0 while WAITING.
| float SprintTimer::getCurrentSpeedKmh | ( | ) | const |
| float SprintTimer::getCurrentSpeedMph | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
| float SprintTimer::getLastRunDistance | ( | ) | const |
| unsigned long SprintTimer::getLastRunTime | ( | ) | const |
| unsigned long SprintTimer::getOptimalLapTime | ( | ) | const |
Sum of best segment times (theoretical best run). 0 unless at least one split is configured and every segment has a best recorded.
| float SprintTimer::getPaceDifference | ( | ) | const |
Pace delta vs the best run in ms per meter (see DovesLapTimer::getPaceDifference). 0 while WAITING.
| bool SprintTimer::getRaceStarted | ( | ) | const |
True once any run has ever started this session.
| unsigned int SprintTimer::getRejectedCrossingCount | ( | ) | const |
Total zone exits whose interpolation was rejected, all lines.
| int SprintTimer::getRuns | ( | ) | const |
Completed run count this session.
| float SprintTimer::getTotalDistanceTraveled | ( | ) | const |
|
inline |
| bool SprintTimer::isFinishLineConfigured | ( | ) | const |
| bool SprintTimer::isRunActive | ( | ) | const |
True while a run is in progress (between start and finish).
| bool SprintTimer::isStartLineConfigured | ( | ) | const |
| int SprintTimer::loop | ( | double | currentLat, |
| double | currentLng, | ||
| float | currentAltitudeMeters, | ||
| float | currentSpeedKnots | ||
| ) |
Feed a GPS fix. Call updateCurrentTime() first, then this, on every fix — identical contract to DovesLapTimer::loop().
| currentLat | Latitude in decimal degrees. |
| currentLng | Longitude in decimal degrees. |
| currentAltitudeMeters | Altitude in meters. |
| currentSpeedKnots | Speed in knots. |
| void SprintTimer::reset | ( | ) |
Reset all run/timing state to zero. Configured lines are kept.
| void SprintTimer::setFinishLine | ( | double | pointALat, |
| double | pointALng, | ||
| double | pointBLat, | ||
| double | pointBLng | ||
| ) |
Sets the FINISH line (a run completes when it is crossed while a run is active).
| void SprintTimer::setSector2Line | ( | double | pointALat, |
| double | pointALng, | ||
| double | pointBLat, | ||
| double | pointBLng | ||
| ) |
Sets the optional sector 2 split line (closes segment 1).
| void SprintTimer::setSector3Line | ( | double | pointALat, |
| double | pointALng, | ||
| double | pointBLat, | ||
| double | pointBLng | ||
| ) |
Sets the optional sector 3 split line (closes the segment after sector 2's, or segment 1 if sector 2 is not configured).
| void SprintTimer::setStartLine | ( | double | pointALat, |
| double | pointALng, | ||
| double | pointBLat, | ||
| double | pointBLng | ||
| ) |
Sets the START line (a run begins when it is crossed).
| void SprintTimer::updateCurrentTime | ( | unsigned long | currentTimeMilliseconds | ) |
Updates the current GPS time since midnight (milliseconds).