From 022e66b61861d86ff9a2647cecd0e85aa5089591 Mon Sep 17 00:00:00 2001 From: daedalusz Date: Tue, 5 Feb 2013 14:05:03 +1100 Subject: [PATCH] Added GammeE skeleton. --- utils.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/utils.h b/utils.h index f5c6a5c..e44b0c3 100644 --- a/utils.h +++ b/utils.h @@ -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) + }