本文整理汇总了C++中fuel_Map3D_t类的典型用法代码示例。如果您正苦于以下问题:C++ fuel_Map3D_t类的具体用法?C++ fuel_Map3D_t怎么用?C++ fuel_Map3D_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了fuel_Map3D_t类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: chRegSetThreadName
chRegSetThreadName("lcd");
while (true) {
if (engineConfiguration->bc.useLcdScreen) {
#if EFI_HD44780_LCD
updateHD44780lcd(engine);
#endif
}
chThdSleepMilliseconds(engineConfiguration->bc.lcdThreadPeriod);
}
}
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
extern WallFuel wallFuel;
extern fuel_Map3D_t veMap;
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_S) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
int rpm = getRpmE(engine);
#else
int rpm = 0;
#endif
float tps = getTPS(PASS_ENGINE_PARAMETER_F);
float coolant = getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
float intake = getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F);
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
float baseFuelMs = getBaseFuel(rpm PASS_ENGINE_PARAMETER);
开发者ID:owenanthonyj,项目名称:rusefi,代码行数:30,代码来源:status_loop.cpp
示例2: periodicFastCallback
void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
int rpm = ENGINE(rpmCalculator.rpmValue);
sparkDwell = getSparkDwell(rpm PASS_ENGINE_PARAMETER);
dwellAngle = sparkDwell / getOneDegreeTimeMs(rpm);
iatFuelCorrection = getIatCorrection(iat PASS_ENGINE_PARAMETER);
cltFuelCorrection = getCltCorrection(clt PASS_ENGINE_PARAMETER);
engineNoiseHipLevel = interpolate2d(rpm, engineConfiguration->knockNoiseRpmBins,
engineConfiguration->knockNoise, ENGINE_NOISE_CURVE_SIZE);
baroCorrection = getBaroCorrection(PASS_ENGINE_PARAMETER_F);
injectionOffset = getinjectionOffset(rpm PASS_ENGINE_PARAMETER);
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
timingAdvance = getAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER);
if (engineConfiguration->algorithm == LM_SPEED_DENSITY) {
float coolantC = ENGINE(engineState.clt);
float intakeC = ENGINE(engineState.iat);
float tps = getTPS(PASS_ENGINE_PARAMETER_F);
tChargeK = convertCelsiusToKelvin(getTCharge(rpm, tps, coolantC, intakeC));
float map = getMap();
/**
* *0.01 because of https://sourceforge.net/p/rusefi/tickets/153/
*/
currentVE = baroCorrection * veMap.getValue(map, rpm) * 0.01;
targerAFR = afrMap.getValue(map, rpm);
} else {
baseTableFuel = getBaseTableFuel(engineConfiguration, rpm, engineLoad);
}
}
开发者ID:ioerror88,项目名称:rusefi,代码行数:35,代码来源:engine.cpp
示例3: setDefaultVETable
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_F) {
setRpmTableBin(config->veRpmBins, FUEL_RPM_COUNT);
veMap.setAll(80);
// setRpmTableBin(engineConfiguration->ve2RpmBins, FUEL_RPM_COUNT);
// setTableBin2(engineConfiguration->ve2LoadBins, FUEL_LOAD_COUNT, 10, 300, 1);
// ve2Map.setAll(0.81);
setRpmTableBin(config->afrRpmBins, FUEL_RPM_COUNT);
afrMap.setAll(14.7);
setRpmTableBin(engineConfiguration->baroCorrRpmBins, BARO_CORR_SIZE);
setTableBin2(engineConfiguration->baroCorrPressureBins, BARO_CORR_SIZE, 75, 105, 1);
memcpy(engineConfiguration->baroCorrTable, default_baro_corr, sizeof(default_baro_corr));
}
开发者ID:jon-weisz,项目名称:rusefi,代码行数:15,代码来源:speed_density.cpp
示例4: initSpeedDensity
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
veMap.init(config->veTable, config->veLoadBins, config->veRpmBins);
// ve2Map.init(engineConfiguration->ve2Table, engineConfiguration->ve2LoadBins, engineConfiguration->ve2RpmBins);
afrMap.init(config->afrTable, config->afrLoadBins, config->afrRpmBins);
baroCorrMap.init(engineConfiguration->baroCorrTable, engineConfiguration->baroCorrPressureBins, engineConfiguration->baroCorrRpmBins);
initMaf2Map();
}
开发者ID:rusefi,项目名称:rusefi,代码行数:7,代码来源:speed_density.cpp
示例5: getBaseTableFuel
/**
* @return Fuel injection duration injection as specified in the fuel map, in milliseconds
*/
floatms_t getBaseTableFuel(engine_configuration_s *engineConfiguration, int rpm, float engineLoad) {
if (cisnan(engineLoad)) {
warning(OBD_PCM_Processor_Fault, "NaN engine load");
return NAN;
}
return fuelMap.getValue(engineLoad, rpm);
}
开发者ID:owenanthonyj,项目名称:rusefi,代码行数:10,代码来源:fuel_math.cpp
示例6: getRealMafFuel
/**
* @return total duration of fuel injection per engine cycle, in milliseconds
*/
float getRealMafFuel(float airSpeed, int rpm DECLARE_ENGINE_PARAMETER_S) {
if (rpm == 0)
return 0;
// duration of engine cycle, in hours
float engineCycleDurationHr = 1.0 / 60 / rpm;
float airMassKg = airSpeed * engineCycleDurationHr;
/**
* todo: pre-calculate gramm/second injector flow to save one multiplication
* open question if that's needed since that's just a multiplication
*/
float injectorFlowRate = cc_minute_to_gramm_second(engineConfiguration->injector.flow);
float afr = afrMap.getValue(airSpeed, rpm);
float fuelMassGramm = airMassKg / afr * 1000;
return 1000 * fuelMassGramm / injectorFlowRate;
}
开发者ID:owenanthonyj,项目名称:rusefi,代码行数:22,代码来源:fuel_math.cpp
示例7: getinjectionOffset
float getinjectionOffset(int rpm DECLARE_ENGINE_PARAMETER_S) {
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
return fuelPhaseMap.getValue(engineLoad, rpm);
}
开发者ID:owenanthonyj,项目名称:rusefi,代码行数:4,代码来源:fuel_math.cpp
示例8: prepareFuelMap
/**
* @brief Initialize fuel map data structure
* @note this method has nothing to do with fuel map VALUES - it's job
* is to prepare the fuel map data structure for 3d interpolation
*/
void prepareFuelMap(DECLARE_ENGINE_PARAMETER_F) {
fuelMap.init(config->fuelTable, config->fuelLoadBins, config->fuelRpmBins);
fuelPhaseMap.init(config->injectionPhase, config->injPhaseLoadBins, config->injPhaseRpmBins);
}
开发者ID:owenanthonyj,项目名称:rusefi,代码行数:9,代码来源:fuel_math.cpp
示例9: periodicFastCallback
void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
efitick_t nowNt = getTimeNowNt();
if (ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE)) {
crankingTime = nowNt;
timeSinceCranking = 0.0f;
} else {
timeSinceCranking = nowNt - crankingTime;
}
updateAuxValves(PASS_ENGINE_PARAMETER_SIGNATURE);
int rpm = ENGINE(rpmCalculator).getRpm(PASS_ENGINE_PARAMETER_SIGNATURE);
sparkDwell = getSparkDwell(rpm PASS_ENGINE_PARAMETER_SUFFIX);
dwellAngle = sparkDwell / getOneDegreeTimeMs(rpm);
if (hasAfrSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
engine->sensors.currentAfr = getAfr(PASS_ENGINE_PARAMETER_SIGNATURE);
}
// todo: move this into slow callback, no reason for IAT corr to be here
iatFuelCorrection = getIatFuelCorrection(engine->sensors.iat PASS_ENGINE_PARAMETER_SUFFIX);
// todo: move this into slow callback, no reason for CLT corr to be here
if (boardConfiguration->useWarmupPidAfr && engine->sensors.clt < engineConfiguration->warmupAfrThreshold) {
if (rpm < 200) {
cltFuelCorrection = 1;
warmupAfrPid.reset();
} else {
cltFuelCorrection = warmupAfrPid.getValue(warmupTargetAfr, engine->sensors.currentAfr, 1);
}
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
if (engineConfiguration->debugMode == DBG_WARMUP_ENRICH) {
tsOutputChannels.debugFloatField1 = warmupTargetAfr;
warmupAfrPid.postState(&tsOutputChannels);
}
#endif
} else {
cltFuelCorrection = getCltFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
}
// update fuel consumption states
fuelConsumption.update(nowNt PASS_ENGINE_PARAMETER_SUFFIX);
// Fuel cut-off isn't just 0 or 1, it can be tapered
fuelCutoffCorrection = getFuelCutOffCorrection(nowNt, rpm PASS_ENGINE_PARAMETER_SUFFIX);
// post-cranking fuel enrichment.
// for compatibility reasons, apply only if the factor is greater than zero (0.01 margin used)
if (engineConfiguration->postCrankingFactor > 0.01f) {
// convert to microsecs and then to seconds
float timeSinceCrankingInSecs = NT2US(timeSinceCranking) / 1000000.0f;
// use interpolation for correction taper
postCrankingFuelCorrection = interpolateClamped(0.0f, engineConfiguration->postCrankingFactor,
engineConfiguration->postCrankingDurationSec, 1.0f, timeSinceCrankingInSecs);
} else {
postCrankingFuelCorrection = 1.0f;
}
cltTimingCorrection = getCltTimingCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
engineNoiseHipLevel = interpolate2d("knock", rpm, engineConfiguration->knockNoiseRpmBins,
engineConfiguration->knockNoise, ENGINE_NOISE_CURVE_SIZE);
baroCorrection = getBaroCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
injectionOffset = getinjectionOffset(rpm PASS_ENGINE_PARAMETER_SUFFIX);
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE);
timingAdvance = getAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER_SUFFIX);
if (engineConfiguration->fuelAlgorithm == LM_SPEED_DENSITY) {
float coolantC = ENGINE(sensors.clt);
float intakeC = ENGINE(sensors.iat);
float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE);
tChargeK = convertCelsiusToKelvin(getTCharge(rpm, tps, coolantC, intakeC PASS_ENGINE_PARAMETER_SUFFIX));
float map = getMap();
/**
* *0.01 because of https://sourceforge.net/p/rusefi/tickets/153/
*/
float rawVe = veMap.getValue(rpm, map);
// get VE from the separate table for Idle
if (CONFIG(useSeparateVeForIdle)) {
float idleVe = interpolate2d("idleVe", rpm, config->idleVeBins, config->idleVe, IDLE_VE_CURVE_SIZE);
// interpolate between idle table and normal (running) table using TPS threshold
rawVe = interpolateClamped(0.0f, idleVe, boardConfiguration->idlePidDeactivationTpsThreshold, rawVe, tps);
}
currentVE = baroCorrection * rawVe * 0.01;
targetAFR = afrMap.getValue(rpm, map);
} else {
baseTableFuel = getBaseTableFuel(rpm, engineLoad);
}
}
开发者ID:yongfeicao,项目名称:rusefi,代码行数:90,代码来源:engine.cpp
注:本文中的fuel_Map3D_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论