Problem details
Hi my friends, i'm working on a project in vehicles field, and i want to make a system to estimate number of fuel litters consumed in each second or any time unit, using the OBD2 ELM327 and it's parameters like: mass air flow, speed, fuel trim percent...etc.
i tried many equations and i didn't find a good result, i also faild to get the fuel level from my car.
so i want to ask if any body have an idea how to calculate fuel consumption.
My first try
the first try i used this operation:
fuel_consumption(gals/second) = (((Mass_Air_Flow(g/s) / 14.7) / 454) / 6.701).
from this reference : Real-Time Fuel Consumption Monitoring
My second try
The second time i found this equation but in my vehicle some times return the short fuel trim with a negative value, (can i process it ?)

So i'm asking if there is any other way for my problem to get the instantaneous estimation of fuel consumption in litters/second
Speed it is the vehicle speed in km/h maf is the value of mass air flow sensor F1 and F2 is the values of long term, and short term fuel trim
Finally, thank you..
