add option to temperature compensate alpha-n
This commit is contained in:
parent
1f4d9227bd
commit
2f37d788ff
|
@ -13,11 +13,17 @@ AirmassResult AlphaNAirmass::getAirmass(int rpm, bool postState) {
|
|||
// In this case, VE directly describes the cylinder filling relative to the ideal
|
||||
float ve = getVe(rpm, tps.Value, postState);
|
||||
|
||||
// optionally use real IAT instead of fixed air temperature
|
||||
constexpr float standardIat = 273.0f + 20.0f; // std atmosphere temperature
|
||||
float iat = engineConfiguration->alphaNUseIat
|
||||
? Sensor::get(SensorType::Iat).value_or(standardIat)
|
||||
: standardIat;
|
||||
|
||||
// TODO: should this be barometric pressure and/or temperature compensated?
|
||||
mass_t airmass = getAirmassImpl(
|
||||
ve,
|
||||
101.325f, // std atmosphere pressure
|
||||
273.0f + 20.0f // std atmosphere pressure
|
||||
iat
|
||||
);
|
||||
|
||||
return {
|
||||
|
|
|
@ -886,6 +886,7 @@ custom maf_sensor_type_e 1 bits, S08, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@
|
|||
bit enableSoftwareKnock
|
||||
bit verboseVVTDecoding;Verbose info in console below engineSnifferRpmThreshold\nenable vvt_details
|
||||
bit invertCamVVTSignal;get invertCamVVTSignal
|
||||
bit alphaNUseIat;In Alpha-N mode, compensate for air temperature.
|
||||
bit knockBankCyl1,"Channel 2","Channel 1"
|
||||
bit knockBankCyl2,"Channel 2","Channel 1"
|
||||
bit knockBankCyl3,"Channel 2","Channel 1"
|
||||
|
|
|
@ -2285,6 +2285,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
|
|||
field = "Enabled", isInjectionEnabled
|
||||
field = "Mode", injectionMode, {isInjectionEnabled == 1}
|
||||
field = "#Batch injection with individual wiring"
|
||||
field = "Alpha-N uses IAT density correction", alphaNUseIat, { fuelAlgorithm == @@engine_load_mode_e_LM_ALPHA_N@@ }
|
||||
field = "Override VE table load axis", veOverrideMode, { isInjectionEnabled }
|
||||
field = "Override AFR table load axis", afrOverrideMode, { isInjectionEnabled }
|
||||
field = "Injection phase control mode", injectionTimingMode, { isInjectionEnabled }
|
||||
|
|
Loading…
Reference in New Issue