Quote:
Originally Posted by cfg83
...
3 - Define an algorithm that uses the data I am collecting to display real time MPG (Help Me Please !!!!!!).
CarloSW2
|
I've been chewing on that one a little too since my elm323 showed up. Here's all I've got so far:
PID 07 -> xx Long term fuel trim Bank 1 % x*(100.0/128)-100
PID 0b -> xx Intake Manifold Pressure kPaA x
PID 0c -> xx xx Engine RPM RPM x*0.25
PID 0d -> xx Vehicle Speed km/h x
PID 0f -> xx Intake Air Temperature C X-40
lastScanTime=now (milliseconds)
onScanEvent{
time=now-lastScanTime
lastScanTime=now
distance=speed(pid0d) * time
"airMoles"=some PV=NRT thing,
http://en.wikipedia.org/wiki/Ideal_gas_law
* V=rpm(pid0c)*displacement*volumetric efficiency, P=pid0b, T=Pid0f
oxygen=airMoles* 20% ?
stiochfuel=oxygen/14.7
fuel=stoichfuel*fuelTrim(pid07)
litersPer100KM= fuel converted to liters/distance converted to km
MilesPerGallon= distance converted to miles/fuel converted to gallons
}
ref:
http://prj.perquin.com/obdii/
ref:
http://en.wikipedia.org/wiki/Ideal_gas_law