no comment

This commit is contained in:
rusefi 2019-01-28 00:00:19 -05:00
parent 6607b833f7
commit 5c40815758
2 changed files with 7 additions and 6 deletions

View File

@ -82,14 +82,15 @@ float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_EN
/**
* @return air mass in grams
*/
static float getCycleAirMass(float VE, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX) {
static float getCycleAirMass(float volumetricEfficiency, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX) {
// todo: pre-calculate cylinder displacement to save one division
float cylinderDisplacement = CONFIG(specs.displacement);
return (cylinderDisplacement * VE * MAP) / (GAS_R * tempK);
return (cylinderDisplacement * volumetricEfficiency * MAP) / (GAS_R * tempK);
}
float getCylinderAirMass(float VE, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX) {
return getCycleAirMass(VE, MAP, tempK PASS_ENGINE_PARAMETER_SUFFIX) / CONFIG(specs.cylindersCount);
float getCylinderAirMass(float volumetricEfficiency, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX) {
return getCycleAirMass(volumetricEfficiency, MAP, tempK PASS_ENGINE_PARAMETER_SUFFIX)
/ CONFIG(specs.cylindersCount);
}
/**

View File

@ -12,8 +12,8 @@
#define gramm_second_to_cc_minute(gs) ((gs) / 0.0119997981)
#define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981)
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_SUFFIX);
float getCylinderAirMass(float VE, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX);
float getTCharge(int rpm, float tps, float coolantTemperature, float airTemperature DECLARE_ENGINE_PARAMETER_SUFFIX);
float getCylinderAirMass(float volumetricEfficiency, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX);
float sdMath(float airMass, float AFR DECLARE_ENGINE_PARAMETER_SUFFIX);
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_SIGNATURE);