Hi! I would like make an application for get GAP time. For this task, I think know the position pilot car in the track. Rfactor/Rfactor2 set X/Y/Z world position but I would get % lap traveled. Is there any way to get this information? Thanks!
I dont know wat exactly you mean..rfactor already has gap/difference parameters.. but probably you could use the dist variable, you can easily get the % of a given lap..
I think those values can be found in the plugin? Code: struct VehicleScoringInfoV01 { // .... // Dash Indicators double mTimeBehindNext; // time behind vehicle in next higher place long mLapsBehindNext; // laps behind vehicle in next higher place double mTimeBehindLeader; // time behind leader long mLapsBehindLeader; // laps behind leader double mLapStartET; // time this lap was started };
But this is the GAP between my car and Next or Leader car, no GAP time between my actual lap time and my best lap time. For this task, I need the actual position in meters or % of a given lap. Sorry if I explain it wrong...
You have to "cache" to current absolute top lap time(s) taken from best lap values and then calculate it accordingly ... if I get you right this time !?!?
Yes Frank. In other sims, like iRacing, SDK send you a % of a given lap. From this variable, I set two hastables: one with the best lap time and another with the current time. The GAP is, for the same % of a given lap, the diference between two times. For this reason, I'm looking for the % or something similar to use the same code. Thanks!
... I don't know much about iRacing regarding its SDK, but you have to do the calculation with the values available by the plugin. As far as I know there is no direct %-value giving you this gap you are looking for ...