PDA

View Full Version : PitStop time calculation



ZMitya
11-02-2018, 11:04 AM
Hi Gents,

I use rFactor 2 and I did measure how long would a pitstop take. It measured 18 secs in Barcelona with an F1 car.

Next day, I had a test race but it did not remember that value.

Is this result only an "in memory" value or can it be permanent somehow ?

Edit:

What is the lifecycle of that value ? Does it survive a "next session" change ?

Thanks,
Mitya

mr_belowski
11-02-2018, 11:34 AM
the value is stored against the track / car combination. It survives a session transition (practice -> qual -> race or whatever) but it's only stored in memory - it's cleared when you restart the app (or stop and start it). Only the most recent value is used (it's replaced if you do 2 practice stops).

Typically, i start a practice session and set my pitstop to be a reasonable approximation to what i'll do in the race (change all tyres & add 70 litres of fuel, for example). I run a few laps to get a decent baseline lap time then I request a pitstop and make the "time this stop" voice command. I complete the pitstop as if it were a racing stop, exit the pits normally and drive at race pace until the end of sector 1. The app then reports the time lost due to stopping. This value is held in memory (against the car + track combo) until the app is stopped.

Then, in the race, the same value is used to provide the pit exit position estimates. Note that this value is also used to provide opponent pit exit position estimates, which (obviously) might be inaccurate due to strategy differences.

If the app doesn't have time-loss data for the car / track combination (i.e. you don't do a baseline stop), the app will attempt to use the first opponent's pit time loss in the race. So if you pit first the app won't give estimates, but if you pit after at least 1 car in your class has completed his stop (note he must have set a valid best laptime and reached the end of sector1 after his stop) the app will use this

ZMitya
11-06-2018, 09:39 PM
Ok, thanks for the answer..

Do you plan to make it "permanent" ?
Or can it be overridden from the config file ?

Cheers,
Mitya

mr_belowski
11-07-2018, 08:10 AM
No plans to make it sticky. Will need to think about it - the stop time obviously depends on what you do when you're in the pits. I'm not sure that it's helpful to save and reuse the data

ZMitya
11-07-2018, 09:29 AM
No plans to make it sticky. Will need to think about it - the stop time obviously depends on what you do when you're in the pits. I'm not sure that it's helpful to save and reuse the data

We play F1 mods with rF2. When I prepare for a race (2 weeks), I usually practice pitstopping and measure the pitstop time at home. It is counted when I calculate the best pitstop strategy. So when I arrive to a race, the pitstop time is usually a known value, so theoretically it could be stored somewhere.

Obviously when you have some damage your pitstop time might be increased, but 98% of the pitstops, the pitstop time will be around what you practiced and measured previously.

So I think sometimes it could be useful when you could have a default pitstop time coming from the config and ideally you could overwrite it by the "in-game" measurement if you want.

If you guys have a "wish list" please put it to the bottom with low priority please :)

Thanks,
Mitya

mr_belowski
11-07-2018, 02:14 PM
Yeah, I can see some use for it. I'll have a think

mr_belowski
11-08-2018, 08:55 AM
I'm in the process of adding this. It's pretty simple - benchmarks recorded in practice (or qualifying) sessions will be saved to a json file in My Documents. Each time you record a new benchmark time it overwrites it for this car / track / game combination. So it should work the same way as before but with the times persisting between runs of the app. As soon as the app records a new benchmark time, it saves this json document. The file format is:



[
{
"game": "RACE_ROOM",
"carClassId": "DTM",
"trackName": "Silverstone Circuit",
"timeLoss": 19.68
},
{
"game": "RACE_ROOM",
"carClassId": "WTCC",
"trackName": "Silverstone Circuit",
"timeLoss": 23.12
}
....

]


This will be disabled by default (I think...), and can be enabled with the 'Save pitstop benchmark times to disk' option. At least, that's how it works now - I might tweak it a little :)

ZMitya
11-08-2018, 08:59 AM
I'm in the process of adding this. It's pretty simple - benchmarks recorded in practice (or qualifying) sessions will be saved to a json file in My Documents. Each time you record a new benchmark time it overwrites it for this car / track / game combination. So it should work the same way as before but with the times persisting between runs of the app. As soon as the app records a new benchmark time, it saves this json document. The file format is:


wow :)
Really appreciate your effort, it is a proper solution for this...

Great stuff!

Thanks,
Mitya

mr_belowski
11-08-2018, 09:29 AM
think it should be enabled, or disabled by default?

ZMitya
11-08-2018, 09:34 AM
think it should be enabled, or disabled by default?

If you asked me, I would say this is how it should work by default. The generated file is small, will not cause any issues even in long term.

mr_belowski
11-08-2018, 09:39 AM
The issue here is that time loss can vary, even for the same car / track / game combo. If the benchmark is recorded during a refuelling stop but a few days later you race the same combo but only need tyres this time, it'll use the old and inaccurate benchmark.

I can't decide whether this is an edge case or not :)

ZMitya
11-08-2018, 09:43 AM
The issue here is that time loss can vary, even for the same car / track / game combo. If the benchmark is recorded during a refuelling stop but a few days later you race the same combo but only need tyres this time, it'll use the old and inaccurate benchmark.

I can't decide whether this is an edge case or not :)

Thats true. But how would an only "in-memory" value help out here ? :)
otherwise it is really up to you I think. Everybody can accept if it is turned off by default. :)

The good thing for turning it off by default is that the "fingerprint" is smaller of CC and also don't need disk IO during the race...

mr_belowski
11-08-2018, 09:46 AM
in-memory only means that any benchmark you collected from a previous race event will have long since disappeared, so the app will have no data (rather than stale data)

[edit]

i think it's probably a nice feature to enable by default. The file is small and the overhead is trivial - it's updated after a pitstop but only when you explicitly ask for a benchmark (so never writes the file during a race). The file is read when the app starts up so there's no IO overhead here. I'll enable it by default and when I get GitHub hate-mail (like this one https://github.com/mrbelowski/CrewChiefV4/issues/362), maybe I'll disable it

mr_belowski
11-08-2018, 11:50 AM
that's in today's release. Give me a yell if it all explodes (it worked correctly for me...)

ZMitya
11-08-2018, 12:19 PM
that's in today's release. Give me a yell if it all explodes (it worked correctly for me...)

Great news, thanks..
Will test in the evening :)

ZMitya
11-08-2018, 10:24 PM
that's in today's release. Give me a yell if it all explodes (it worked correctly for me...)

it seems to be working for me as well ! :)

Really thanks for this, appreciate it.