Live interval between two cars on different positions

Posts: 53
Hello,

I'm trying to make a widget that would compare two drivers, both picked by Driver Pickers, and I struggle with calculating a live interval between them. While it's simple to show it for cars that are next to each other in the standings, I guess I'll have to write a script if I want to compare P5 and P10?

I don't have any idea what kind of methods I need to call and how to approach it? Does anyone have any idea please?

And also one additional question, is it possible to compare sectors live during the qualifying? Between the car in focus and the fastest lap? Like in F1.

Thanks
Posts: 785
You can take the difference of the Gap of p5 and p10. The gap is the time difference to the leader so subtracting them will give you the gap between two arbitrary cars.

For sectors I believe we do store sector times but it will be a bit more complicated. Each result has a list of Laps and each lap has a list of Sectors. Check the github for details.
Posts: 53
Nick Thissen wrote:
You can take the difference of the Gap of p5 and p10. The gap is the time difference to the leader so subtracting them will give you the gap between two arbitrary cars.

Thank you. That is a good idea of how to do it. However, as I'm looking into that, is there any SDK available? Or something with methods and functions so I know what to call and how? It's one thing I actually miss as I have no idea how are these data called inside of iRacing.
Posts: 785
Few options:
  • Check the Themes SDK interfaces which you can all use.
  • Use the built-in Data Explorer tool (Tools - Data Explorer)
  • Use VS Code and you will get full intellisense / help popups.