[race - only] Lapped car logic (shows different color)
[other session - no race] Cars on lap, cars with invalidated lap, cars improving their lap
Pit stop algorithm
pitStopTotalTime = pitStopTime + (pitLaneTime % EstimatedLapTime)
trackTime = currentLapTime - pitStopTotalTime
if (trackTime < 0)
{
trackTime += EstimatedLapTime;
}
trackNormalizedPos = trackTime / EstimatedLapTime
trackPosIndex = trackNormalizedPos * trackMappedPoints;
PointF pos = trackMappedPoints[trackPosIndex] <-- Where the car should end on track
int laps = pitStopTotalTime / BestTimeMs <-- Number of laps needed to fix the car
Feature
Pit stop algorithm