As the title says I'm trying to calculate the relative time to the cars around me but I just can't figure it out. Everything I've tried gives me big fluctuations when one car hits a brake zone etc. mTimeBehindNext and mTimeBehindLeader in the VehicleScoringInfoV01 struct does it nicely but that only gives me time as long as we're on the same lap. Would love to know the equation behind it tho. Any math heads around here willing to help out?
Solved by reading the comment off mTimeIntoLap, it actually returns an estimation of your time in to lap instead of the exact time in to the lap. Thanks ISI.
If the fluctuations are your only problem, I would remember the last n values and calculate the mean between them. Or did I misunderstood something here?