Added GammeE skeleton.

This commit is contained in:
daedalusz 2013-02-05 14:05:03 +11:00
parent 43a216c4f4
commit 022e66b618
1 changed files with 14 additions and 2 deletions

16
utils.h
View File

@ -11,9 +11,9 @@ These are some utility functions and variables used through the main code
*/
int AIRDEN(int MAP, int temp)
{
return (1.2929 * 273.13/(temp+273.13) * MAP/101.325);
return (1.2929 * 273.13/(temp+273.13) * MAP/101.325);
}
/*
This functino retuns a pulsewidth time (in tenths of a ms) given the following:
REQ_FUEL
@ -26,3 +26,15 @@ int PW(int REQ_FUEL, int VE, int MAP, int GammaE, int injOpen)
{
return REQ_FUEL * (VE/100) * (MAP/100) * (GammaE/100) + injOpen;
}
/* Determine the Gamma Enrichment number. Forumla borrowed from MS2 manual... may be skipped/simplified for arduino!
WARMUP: Warmup Correction
O2_CLOSED: Feedback from Closed Loop Operation
AIRTEMP: Air Temp correction <-- Skip?
BARO: Barometric Correction <-- Skip?
*/
int GammaE( int WARMUP, int O2_CLOSED, int AIRTEMP, int BARO)
{
return = (WARMUP/100) * (O2_CLOSED/100) * (AIRTEMP/100) * (BARO/100)
}