View Full Version : Wrong fuel consumption calculation

03-14-2018, 06:42 PM
From last update (or one before that?) fuel consumption: "How's my fuel?" question, gives wrong data about first three laps. It gives about twice as much fuel than needed and it gets lower every lap, till it gets correct number in about lap 4.
I tried with "Strict fuel" option, without it as well as with different "safe" fuel offsets.

03-14-2018, 07:12 PM
The app needs 3 laps to calculate correct fuel, so before you have done 3 laps they will be off.

03-14-2018, 07:52 PM
I see, makes sense.

03-16-2018, 11:15 PM
Hi @Sparten,
I found some new interesting facts, which makes me think there is a glitch at the end:
When I leave pits and start doing laps, zero lap (1st from pits) fuel consumption is started to be calculated, but you won't get any report as this is lap 0. When you cross the start/finish line, lap 1 starts (actually already 2nd) and fuel consumption is still added to lap 0 fuel consumption, so you get twice as consumption estimation as you should have. Each lap it gradually decreases, till you reach the calculation window, which is I think 3? laps, first "double" lap is discarded and you get finally proper fuel consumption. This is easily reproducible, everyone can check.
Also what supports this fact is that when you ask in that lap 1 "How much fuel for N laps", you get that wrong double consumption. However when you ask at the same lap, same place "How much fuel for N minutes" you get totally proper result right away.

Let's say you have 1L / lap (lap = 1 minute) consumption.
You do 0 lap (1st if we start counting from 1) from pits, your car consumes 1L.
You enter 1st lap (2nd, as 1st was from pits) so you got already 1L of fuel consumed and asking for 10 laps seems do math like: (1L from 0 lap + 1L from 1st lap) * 10 laps = 20 liters instead of 10L
But asking for time: You drove for 2 minutes, 2L consumed: How much fuel for 10 minutes => (2L / 2 minutes = 1L / minute) * 10 minutes = 10L => proper result.

I hope I explained at least somehow clearly. Asking for N lap of fuel needs to either ignore lap 0 consumption or need to treat lap 1 as already 2nd lap.

03-19-2018, 08:44 AM
I think i know whats going on here, been looking at the code and fuel calculations gets reset every time you enter the pits, and the number of laps needed to get a clean result varies depending on track length, so on a short track like brands indy you would need to do 5 laps to get a result and on nords only 1 lap is needed. i'll see if i can do something about it being reset when leaving the pits.

03-19-2018, 09:03 AM
You are amazing guys, thank you!

04-12-2018, 04:26 PM
Hi @Sparten, after a month of racing and monitoring this issue in different conditions and tracks, I think there is really not an issue with accuracy of fuel consumption.
After 1 lap, if you ask for fuel for N laps, you get really crazy result, mostly double amount of fuel needed. But try to ask after 1 lap for fuel for certain amount of time. You will get like 99% accurate result already.
Issue seems in formula to calculate fuel consumption per lap, but fuel consumption per minute (time based question) is ok (probably this is directly obtained from API).