Page 1 of 1

Fuel Calculator and Array Calculations

PostPosted: Wed May 22, 2024 12:27 am
by Gwen49
Hello Everyone,

I am writing asking for a bit of help, because I am working on a fuel calculator tool for iRacing.
I managed to get the stat_end of the fuel level for each lap (you can find the screenshot attached!)

But I am unable, from my stat_end data, to get the fuel consumption of the lap.
If anyone could give a little help, it would be very much appreciated.

Thank you everyone !

PS : Here is the code I used

Fuel in tank after end of each lap :

stat_end('Fuel Level' [l], 1, range_change("Outings:Laps"))

Re: Fuel Calculator and Array Calculations

PostPosted: Mon Aug 05, 2024 5:07 am
by buzzard73
I've done a bunch fuel math previously and rather than copy paste all the calcs, I'll attach the maths file with all the calculations.I recommend you add each one to a numeric gauge and then you can decide what suits your needs.

Your fuel channel will be different in iRacing, so you'll need to update the formulas with the name of your channel. Some of it may need double checking as there was some experimental stuff in there that I never tidied up (was on my todo list - item 483,063 the one after 'fixing the leaky radiator valve' and 'caulking the door frane' :D )

FUEL.PNG
FUEL.PNG (27.38 KiB) Viewed 398 times