View Single Post
Old 04-27-2008, 01:40 AM   #6 (permalink)
Coyote X
nut
 
Coyote X's Avatar
 
Join Date: Dec 2007
Location: Southen West Virginia
Posts: 654

Metro XFi - '93 Geo Metro XFi Convertible
90 day: 62.17 mpg (US)

DR650SE - '07 Suzuki DR650SE
90 day: 55.26 mpg (US)
Thanks: 0
Thanked 37 Times in 26 Posts
Send a message via MSN to Coyote X
Also another way to calculate it would be for the 3/4 to 1 second interrupt time to just set a variable like

{
calculate = 1;
}

then on the next injector close operation it could have this on the end of the function

if (calculate == 1){
mileage= (vsscount * vsscorr) / (period * injcorr) // the counts * the corr
// factors for each of them to get them to miles and gallons. time isn't really
//important. just distance and gallons so calibration could be just drive 1 mile
//using highway markers and use that for calculating the corr factor.

period = 0;
calculate = 0;
vss = 0; // clear everything for the next round of calculations in one second.
}


the gallons corr factor could be a routine to just count total injector open time continuously for a full tank of gas. Then figure out how much is squirted per unit time by that fill up information.
__________________


  Reply With Quote