rusEFI
The most advanced open source ECU
|
This file is part of rusEfi - see http://rusefi.com
rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file engine_math.cpp.
Functions | |
floatms_t | getEngineCycleDuration (int rpm) |
floatms_t | getCrankshaftRevolutionTimeMs (int rpm) |
float | getFuelingLoad () |
float | getIgnitionLoad () |
void | setSingleCoilDwell () |
static size_t | getFiringOrderLength () |
static const uint8_t * | getFiringOrderTable () |
size_t | getFiringOrderCylinderId (size_t index) |
size_t | getNextFiringCylinderId (size_t prevCylinderId) |
ignition_mode_e | getCurrentIgnitionMode () |
void | prepareOutputSignals () |
angle_t | getPerCylinderFiringOrderOffset (uint8_t cylinderIndex, uint8_t cylinderNumber) |
void | setTimingRpmBin (float from, float to) |
void | setAlgorithm (engine_load_mode_e algo) |
void | setFlatInjectorLag (float value) |
BlendResult | calculateBlend (blend_table_s &cfg, float rpm, float load) |
Variables | |
bool | verboseMode |
static const uint8_t | order_1 [] = {1} |
static const uint8_t | order_1_2 [] = {1, 2} |
static const uint8_t | order_1_2_3 [] = {1, 2, 3} |
static const uint8_t | order_1_3_2 [] = {1, 3, 2} |
static const uint8_t | order_1_THEN_3_THEN_4_THEN2 [] = { 1, 3, 4, 2 } |
static const uint8_t | order_1_THEN_2_THEN_4_THEN3 [] = { 1, 2, 4, 3 } |
static const uint8_t | order_1_THEN_3_THEN_2_THEN4 [] = { 1, 3, 2, 4 } |
static const uint8_t | order_1_THEN_4_THEN_3_THEN2 [] = { 1, 4, 3, 2 } |
static const uint8_t | order_1_2_4_5_3 [] = {1, 2, 4, 5, 3} |
static const uint8_t | order_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4 [] = { 1, 5, 3, 6, 2, 4 } |
static const uint8_t | order_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6 [] = { 1, 4, 2, 5, 3, 6 } |
static const uint8_t | order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6 [] = { 1, 2, 3, 4, 5, 6 } |
static const uint8_t | order_1_6_3_2_5_4 [] = {1, 6, 3, 2, 5, 4} |
static const uint8_t | order_1_4_3_6_2_5 [] = {1, 4, 3, 6, 2, 5} |
static const uint8_t | order_1_6_2_4_3_5 [] = {1, 6, 2, 4, 3, 5} |
static const uint8_t | order_1_6_5_4_3_2 [] = {1, 6, 5, 4, 3, 2} |
static const uint8_t | order_1_4_5_2_3_6 [] = {1, 4, 5, 2, 3, 6} |
static const uint8_t | order_1_8_4_3_6_5_7_2 [] = { 1, 8, 4, 3, 6, 5, 7, 2 } |
static const uint8_t | order_1_8_7_2_6_5_4_3 [] = { 1, 8, 7, 2, 6, 5, 4, 3 } |
static const uint8_t | order_1_5_4_2_6_3_7_8 [] = { 1, 5, 4, 2, 6, 3, 7, 8 } |
static const uint8_t | order_1_2_7_8_4_5_6_3 [] = { 1, 2, 7, 8, 4, 5, 6, 3 } |
static const uint8_t | order_1_3_7_2_6_5_4_8 [] = { 1, 3, 7, 2, 6, 5, 4, 8 } |
static const uint8_t | order_1_2_3_4_5_6_7_8 [] = { 1, 2, 3, 4, 5, 6, 7, 8 } |
static const uint8_t | order_1_5_4_8_6_3_7_2 [] = { 1, 5, 4, 8, 6, 3, 7, 2 } |
static const uint8_t | order_1_8_7_3_6_5_4_2 [] = { 1, 8, 7, 3, 6, 5, 4, 2 } |
static const uint8_t | order_1_5_4_8_3_7_2_6 [] = { 1, 5, 4, 8, 3, 7, 2, 6 } |
static const uint8_t | order_1_8_6_2_7_3_4_5 [] = { 1, 8, 6, 2, 7, 3, 4, 5 } |
static const uint8_t | order_1_2_3_4_5_6_7_8_9 [] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } |
static const uint8_t | order_1_10_9_4_3_6_5_8_7_2 [] = {1, 10, 9, 4, 3, 6, 5, 8, 7, 2} |
static const uint8_t | order_1_6_5_10_2_7_3_8_4_9 [] = {1, 6, 5, 10, 2, 7, 3, 8, 4, 9} |
static const uint8_t | order_1_7_5_11_3_9_6_12_2_8_4_10 [] = {1, 7, 5, 11, 3, 9, 6, 12, 2, 8, 4, 10} |
static const uint8_t | order_1_7_4_10_2_8_6_12_3_9_5_11 [] = {1, 7, 4, 10, 2, 8, 6, 12, 3, 9, 5, 11} |
static const uint8_t | order_1_12_5_8_3_10_6_7_2_11_4_9 [] = {1, 12, 5, 8, 3, 10, 6, 7, 2, 11, 4, 9} |
static const uint8_t | order_1_2_3_4_5_6_7_8_9_10_11_12 [] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} |
static const uint8_t | order_1_14_9_4_7_12_15_6_13_8_3_16_11_2_5_10 [] = {1, 14, 9, 4, 7, 12, 15, 6, 13, 8, 3, 16, 11, 2, 5, 10} |
BlendResult calculateBlend | ( | blend_table_s & | cfg, |
float | rpm, | ||
float | load | ||
) |
Definition at line 456 of file engine_math.cpp.
Referenced by BoostController::getOpenLoop(), getRunningAdvance(), BoostController::getSetpoint(), and AirmassVeModelBase::getVe().
floatms_t getCrankshaftRevolutionTimeMs | ( | int | rpm | ) |
Definition at line 40 of file engine_math.cpp.
Referenced by getCoilDutyCycle(), getEngineCycleDuration(), and InjectionEvent::onTriggerTooth().
ignition_mode_e getCurrentIgnitionMode | ( | ) |
Definition at line 387 of file engine_math.cpp.
Referenced by getCoilDutyCycle(), prepareCylinderIgnitionSchedule(), prepareIgnitionSchedule(), and startDwellByTurningSparkPinHigh().
floatms_t getEngineCycleDuration | ( | int | rpm | ) |
Definition at line 33 of file engine_math.cpp.
Referenced by getBaseFuelMass(), getInjectorDutyCycle(), getInjectorDutyCycleStage2(), and IFuelComputer::getTChargeCoefficient().
size_t getFiringOrderCylinderId | ( | size_t | index | ) |
index | from zero to cylindersCount - 1 |
Definition at line 337 of file engine_math.cpp.
Referenced by prepareCylinderIgnitionSchedule(), and InjectionEvent::update().
|
static |
Definition at line 165 of file engine_math.cpp.
Referenced by getFiringOrderCylinderId(), and getNextFiringCylinderId().
|
static |
Definition at line 236 of file engine_math.cpp.
Referenced by getFiringOrderCylinderId(), and getNextFiringCylinderId().
float getFuelingLoad | ( | ) |
Definition at line 47 of file engine_math.cpp.
Referenced by fuelClosedLoopCorrection(), IdleController::getClosedLoop(), VvtController::getSetpoint(), handleGetDataRequest(), EngineState::periodicFastCallback(), and readGppwmChannel().
float getIgnitionLoad | ( | ) |
Definition at line 51 of file engine_math.cpp.
Referenced by KnockController::getMaximumRetard(), EngineState::periodicFastCallback(), and readGppwmChannel().
size_t getNextFiringCylinderId | ( | size_t | prevCylinderId | ) |
prevCylinderId | from one to cylindersCount |
Definition at line 368 of file engine_math.cpp.
Referenced by HIP9011::handleChannel(), and HIP9011::readValueAndHandleChannel().
angle_t getPerCylinderFiringOrderOffset | ( | uint8_t | cylinderIndex, |
uint8_t | cylinderNumber | ||
) |
Gets phase offset for a particular cylinder's ID and number For example on 4 cylinder engine with firing order 1-3-4-2, this returns 0-180-360-540 for index 0-1-2-3 Cylinder number is used for per-cylinder adjustment, if you have an odd-fire engine (v-twin, V10, some v6, etc)
Definition at line 426 of file engine_math.cpp.
Referenced by InjectionEvent::computeInjectionAngle(), and prepareCylinderIgnitionSchedule().
void prepareOutputSignals | ( | ) |
This heavy method is only invoked in case of a configuration change or initialization.
Definition at line 409 of file engine_math.cpp.
Referenced by commonInitEngineController(), setIgnitionMode(), and Engine::updateTriggerWaveform().
void setAlgorithm | ( | engine_load_mode_e | algo | ) |
this method sets algorithm and ignition table scale
Definition at line 448 of file engine_math.cpp.
Referenced by set201xHyundai(), setAlgorithmInt(), setBoardDefaultConfiguration(), setBoardOverrides(), setDodgeNeonNGCEngineConfiguration(), setFordEscortGt(), setFrankensoConfiguration(), setTestVVTEngineConfiguration(), and setVwAba().
void setFlatInjectorLag | ( | float | value | ) |
Definition at line 452 of file engine_math.cpp.
Referenced by fuelBenchMode().
void setSingleCoilDwell | ( | ) |
see also setConstantDwell
Definition at line 58 of file engine_math.cpp.
Referenced by setFordAspireEngineConfiguration(), and setFordEscortGt().
void setTimingRpmBin | ( | float | from, |
float | to | ||
) |
Definition at line 441 of file engine_math.cpp.
Referenced by setDefaultIgnition().
|
static |
Definition at line 111 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 153 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 159 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 163 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 113 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 115 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 143 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 150 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 160 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 125 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 141 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 116 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 142 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 132 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 135 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 140 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 146 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 144 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 133 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 131 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 154 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 134 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 158 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 157 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 138 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 147 of file engine_math.cpp.
|
static |
Definition at line 139 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 145 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 130 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 120 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 121 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 119 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 129 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 122 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
static |
Definition at line 128 of file engine_math.cpp.
Referenced by getFiringOrderTable().
|
extern |
Referenced by prepareOutputSignals().