rusefi-1/firmware/controllers/algo/fuel_math.h

42 lines
1.6 KiB
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
* @file fuel_math.h
*
* @date May 27, 2013
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
2019-10-07 22:49:42 -07:00
#pragma once
2015-07-10 06:01:56 -07:00
#include "engine.h"
#include "airmass.h"
2015-07-10 06:01:56 -07:00
2019-01-10 20:48:05 -08:00
void initFuelMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
2015-07-10 06:01:56 -07:00
/**
* @return total injection time into all cylinders, before CLT & IAT corrections
*/
2017-05-15 20:33:22 -07:00
floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-07-10 06:01:56 -07:00
/**
* @return baseFuel with CLT and IAT corrections
*/
2017-05-15 20:33:22 -07:00
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-07-10 06:01:56 -07:00
2017-05-15 20:33:22 -07:00
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
2020-07-20 23:11:48 -07:00
angle_t getInjectionOffset(float rpm, float load DECLARE_ENGINE_PARAMETER_SUFFIX);
float getIatFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
2017-05-15 20:33:22 -07:00
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_SUFFIX);
float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
float getFuelCutOffCorrection(efitick_t nowNt, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
2017-05-15 20:33:22 -07:00
angle_t getCltTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
floatms_t getCrankingFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
2020-06-18 05:54:02 -07:00
floatms_t getCrankingFuel3(floatms_t baseFuel, uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_SUFFIX);
2017-05-15 20:33:22 -07:00
floatms_t getInjectionDuration(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
2017-12-31 16:25:59 -08:00
2020-05-05 05:01:40 -07:00
float getStandardAirCharge(DECLARE_ENGINE_PARAMETER_SIGNATURE);
2017-12-31 16:25:59 -08:00
// convert injection duration (Ms/Nt) to fuel rate (L/h)
float getFuelRate(floatms_t totalInjDuration, efitick_t timePeriod DECLARE_ENGINE_PARAMETER_SUFFIX);