View Single Post
Old 04-09-2008, 09:17 AM   #2 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Quote:
Originally Posted by cfg83 View Post
...
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
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote