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
|
|
|
|
2021-05-14 04:17:22 -07:00
|
|
|
#include "rusefi_types.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
void initFuelMap();
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return baseFuel with CLT and IAT corrections
|
|
|
|
*/
|
2021-11-16 01:15:29 -08:00
|
|
|
float getRunningFuel(float baseFuel);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
float getBaroCorrection();
|
2024-09-25 00:04:00 -07:00
|
|
|
percent_t getFuelALSCorrection(float rpm);
|
2021-11-16 01:15:29 -08:00
|
|
|
int getNumberOfInjections(injection_mode_e mode);
|
|
|
|
angle_t getInjectionOffset(float rpm, float load);
|
|
|
|
float getIatFuelCorrection();
|
2020-10-23 17:25:47 -07:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
float getCltFuelCorrection();
|
|
|
|
angle_t getCltTimingCorrection();
|
|
|
|
float getCrankingFuel(float baseFuel);
|
|
|
|
float getCrankingFuel3(float baseFuel, uint32_t revolutionCounterSinceStart);
|
2024-09-24 23:21:39 -07:00
|
|
|
float getInjectionMass(float rpm);
|
2024-09-25 00:04:00 -07:00
|
|
|
percent_t getInjectorDutyCycle(float rpm);
|
|
|
|
percent_t getInjectorDutyCycleStage2(float rpm);
|
|
|
|
float getStage2InjectionFraction(float rpm, float fuelLoad);
|
2017-12-31 16:25:59 -08:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
float getStandardAirCharge();
|
2024-08-02 22:04:21 -07:00
|
|
|
float getCylinderFuelTrim(size_t cylinderNumber, float rpm, float fuelLoad);
|
2021-05-14 04:17:22 -07:00
|
|
|
|
|
|
|
struct AirmassModelBase;
|
2021-11-16 01:15:29 -08:00
|
|
|
AirmassModelBase* getAirmassModel(engine_load_mode_e mode);
|
2023-03-16 01:11:19 -07:00
|
|
|
|
|
|
|
float getMaxAirflowAtMap(float map);
|