2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file fuel_math.h
|
|
|
|
*
|
|
|
|
* @date May 27, 2013
|
2015-12-31 13:02:30 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2016
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FUEL_MAP_H_
|
|
|
|
#define FUEL_MAP_H_
|
|
|
|
|
|
|
|
#include "engine.h"
|
|
|
|
|
|
|
|
void prepareFuelMap(DECLARE_ENGINE_PARAMETER_F);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return total injection time into all cylinders, before CLT & IAT corrections
|
|
|
|
*/
|
|
|
|
floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return baseFuel with CLT and IAT corrections
|
|
|
|
*/
|
|
|
|
floatms_t getRunningFuel(floatms_t baseFuel, int rpm DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
|
|
|
|
floatms_t getRealMafFuel(float airMass, int rpm DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
|
|
|
|
floatms_t getBaseTableFuel(engine_configuration_s *engineConfiguration, int rpm, float engineLoad);
|
|
|
|
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_F);
|
2016-07-23 18:04:30 -07:00
|
|
|
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_S);
|
2016-08-28 14:02:14 -07:00
|
|
|
angle_t getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S);
|
2015-07-10 06:01:56 -07:00
|
|
|
float getIatCorrection(float iat DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
float getCltCorrection(float clt DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
floatms_t getCrankingFuel(DECLARE_ENGINE_PARAMETER_F);
|
|
|
|
floatms_t getCrankingFuel3(float coolantTemperature, uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_S);
|
2016-08-26 15:02:39 -07:00
|
|
|
floatms_t getInjectionDuration(int rpm DECLARE_ENGINE_PARAMETER_S);
|
2015-07-10 06:01:56 -07:00
|
|
|
percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_S);
|
|
|
|
|
|
|
|
#endif /* FUEL_MAP_H_ */
|