View Single Post
Old 09-29-2013, 05:00 PM   #109 (permalink)
AndrzejM
Master EcoModder
 
AndrzejM's Avatar
 
Join Date: Oct 2011
Location: Poland
Posts: 840

Berta - '97 BMW 318 tds Compact
90 day: 62.03 mpg (US)

Charlie - '07 Citroen C4 Grand Picasso Exclusive
90 day: 37.58 mpg (US)

Corsa - '05 Opel Corsa C
90 day: 53.22 mpg (US)

Mruczek - '03 Audi A2
90 day: 60.61 mpg (US)
Thanks: 185
Thanked 167 Times in 117 Posts
Quote:
Originally Posted by t vago View Post
You got coastdown testing to work? That would be cool!
Code:
//Coast down time
unsigned long coasttime(void){
int t1;
int t2;
int v1= instantvehiclespeed();
int ctime;
if (v1>parms[CoastSpeedMax]) {
	t1=0;
	t2=0;
	}
if (v1 == parms[CoastSpeedMax]) {t1 = tank.time();}
if (v1 == parms[CoastSpeedMin]) {t2 = tank.time();}
ctime = t2 - t1;
return ctime;
}
//Coast down distance
unsigned long coastdistance(void){
int d1;
int d2;
int cdistance;
int v2 = instantvehiclespeed();
if (v2>parms[CoastSpeedMax]) {
	d1=0;
	d2=0;
	}
if (v2 == parms[CoastSpeedMax]) {d1 = tank.distance();}
if (v2 == parms[CoastSpeedMin]) {d2 = tank.distance();}
cdistance = d2 - d1;
return cdistance;
}
This is my code, and it works , but with "canadian" version. So I think it should be rewritten for your version.
__________________


Quote:
Gerhard Plattner: "The best attitude is to consider fuel saving a kind of sport. Everybody who has enough money for a strong car, can drive fast and hit the pedal. But saving fuel requires concentration, self-control and cleverness. It's a challenge with the nice effect of saving you money that you can use for other more important things."
  Reply With Quote