42 lines
1.6 KiB
C
42 lines
1.6 KiB
C
/**
|
|
* @file fuel_math.h
|
|
*
|
|
* @date May 27, 2013
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "engine.h"
|
|
#include "airmass.h"
|
|
|
|
void initFuelMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
/**
|
|
* @return total injection time into all cylinders, before CLT & IAT corrections
|
|
*/
|
|
floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
|
|
/**
|
|
* @return baseFuel with CLT and IAT corrections
|
|
*/
|
|
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
|
|
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
angle_t getInjectionOffset(float rpm, float load DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
float getIatFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
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);
|
|
angle_t getCltTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
floatms_t getCrankingFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
floatms_t getCrankingFuel3(floatms_t baseFuel, uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
floatms_t getInjectionDuration(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|
|
|
float getStandardAirCharge(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
// convert injection duration (Ms/Nt) to fuel rate (L/h)
|
|
float getFuelRate(floatms_t totalInjDuration, efitick_t timePeriod DECLARE_ENGINE_PARAMETER_SUFFIX);
|