Today I think I got the stuff needed to turn a calculated grams of fuel into an injector time.

the simple approach is just:

time = grams /flow_rate + dead_time

...but then dead_time is a function of batery voltage and fuel proesure

and then dead time isn't really dead time its an imaginary intercept so short pulses endup wrong without a correction.

My first thought was copy motec! because they are usually right so no ned for me to reinvent the wheel, but as I got looking at what they've done it turns out they aren't right. They approach does a linear interpolation on the pressure axis with 1 bar pressure steps, but flow is a log function with pressure so that's not a very accurate system for pressure variation and eats up a lot of memory too....but injector dynamics has plug and play data for motec.......

hmmm they also have data for GM systems, lets see......much better! So I copied the GM system

There is a 1d flow vs differential pressure table 64 cells long so lots of resolution on the very non-linear pressure axis.

There is a 2d dead_time )offset) vs voltage vs differential pressure table to get the intercept right

Then there is a 1d "short pulse added" to make up the difference between the imaginary straight line and the actual injector curve. This is probably not exactly right as I'd expect voltage and differential pressure to effect the required additional time......but it's got to be pretty close.

I cut the size of the GM tables down a bit figuring anything over 15V or under 8V is not a car that should be running and I want most everything to work with o5e also whenever possible.

Now, for people who only have flow rate and maybe a dead time you can simply use all the same numbers in the table and set the added to 0 or replace the tables with simple constant inputs.

On to the hard part of actually calculating how much fuel is needed.