I've read the AC Python documentation, but it looks like several interesting pieces of information are not available. For example, how do I get the type of session (practice, quali, race...) and the total number of laps / time remaining in the session?
Also, what's the commonly used way to obtain the gap between two cars? I'm thinking of two ways:
1) divide the lap into "microsectors" using the normalized spline position, then keep track of when each car passed each sector, then compute the difference between the two cars using the last microsector that was completed by the car behind;
2) compute the normalized spline position distance (plus laps difference, of course) and compute a time based on the cars's speed, similar to the "real time" app.
The first is cumbersome, the second is too much approssimate. Is there a better way?
Also, what's the commonly used way to obtain the gap between two cars? I'm thinking of two ways:
1) divide the lap into "microsectors" using the normalized spline position, then keep track of when each car passed each sector, then compute the difference between the two cars using the last microsector that was completed by the car behind;
2) compute the normalized spline position distance (plus laps difference, of course) and compute a time based on the cars's speed, similar to the "real time" app.
The first is cumbersome, the second is too much approssimate. Is there a better way?