what does motor off mean. (key off, spark off, zero RPM, what? , ECU oFF?)
where is that switch, connected to what.? (sorry lazy to read 20 chapters)
I guess first at , just foot off gas pedal coasting...coasting in gear?.
this is easy. (I just finished my gauge, home made)
mpg is range / flow. or distance/fuel rate per hour. miles/GPH
there are 2 ECU's made,
Type A (uses MAF PIDS to reverse calc. fuel flows) (my car, my gauge)
Type B: (ECU B, tells direct actual fuel flow (newer cars) see PID 01-5E ?
note carefull,y this is Division and dividing by zero , is illegal.. dig it?
What your scan tool does, is not known, ask the designer.... but these are facts here.
take the example of type A, MAF, my maf reads some flow, when ECU is in CUT fuel.
(ISC +idle bleed and TV fly plate leakage) known as, pumping losses.....
MPG.
Less in gear coasting ,than out of gear. some cars, try it. (ISC actions)
so I get a lie. see? why? fast speed, but shows flow that is not real. as a divisor.
In cut fuel the mAF reads but ecu does not inject. so i get a small error.
Example B: real flow. (maf is ignored here)
this ecu shows ( example) 45mph /div, by zero flow.
in my software, I trap the zero flow, and change it to .0000001 so there is never a divide by zero
and shows an insane high Mpg. (if fact the MPG is UNKNOWN and huge)
in truth cut fuel MPG is not measurable at all. see why?
It's all in a nonlinear zone.
Did you know the ECU feeds fuel to the CAT, just to keep it hot , coasting?
It's like 200 mpg fuel rates.
when you kill spark , there str no injections, at all. this is a hard fast ECU rule. zero RPM. zero flow.
Fire safety regs.
and if you do that, there is no MAF reading , nor is there a PID 01 5E , fuel rate.
BTW2, if the crank spins (in gear coast'g) and the rpm is over 300 , the ecu inject or a rolling start.
and if the ECU is on, and VSS is clicking, that is say 45mph / divided by 0) div by zero is illegal.
all computers trap div. by zero. as ERROR. (mine throws, INF)
in math. it's Infinity. if i did this , i'd send 9999 mpg to the display , for the indication of INFINITY. and do.
MPG.
my gauges are here, x3 see my infinity trap. is free code. all Blue tooth.
ECU Engine Simulator
OR
tell me how do you average Infinity to real data....
and why would you..
I send that data to the byte bucket.
btw3, the first scanguage sold had the divide by zero error.
and they fix that LONG ago.
ask you self how the did that.
there are only 3 ways.
blank the display,
force zero MPG, nah that scare the kids.
do this.
if flow =0 (or ERROR,or INF) set flow to .00000001.
it really don't matter is its in a none linear range, (study how injectors really work)
like computing MPG based on Gas tank evaporation.
silly.
GOOGLE DIVIDE BY ZERO ERRORS.