rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
throttle_model.cpp File Reference

Functions

static float pressureRatioFlowCorrection (float pr)
 
static float flowCorrections (float pressureRatio, float p_up, float iat)
 
expected< floatgetThrottleInletPressure ()
 
float getThrottlePressureRatio (float map)
 

Variables

static const float pressureRatioCorrectionBins [] = { 0.53125, 0.546875, 0.5625, 0.578125, 0.59375, 0.609375, 0.625, 0.640625, 0.65625, 0.671875, 0.6875, 0.703125, 0.71875, 0.734375, 0.750, 0.765625, 0.78125, 0.796875, 0.8125, 0.828125, 0.84375, 0.859375, 0.875, 0.890625, 0.90625, 0.921875, 0.9375, 0.953125 }
 
static const float pressureRatioCorrectionValues [] = { 1, 0.9993, 0.998, 0.995, 0.991, 0.986, 0.979, 0.972, 0.963, 0.953, 0.942, 0.930, 0.916, 0.901, 0.884, 0.866, 0.845, 0.824, 0.800, 0.774, 0.745, 0.714, 0.679, 0.642, 0.600, 0.553, 0.449, 0.449 }
 

Function Documentation

◆ flowCorrections()

static float flowCorrections ( float  pressureRatio,
float  p_up,
float  iat 
)
static

Definition at line 28 of file throttle_model.cpp.

28 {
29 // PR correction
30 float prCorrectionFactor = pressureRatioFlowCorrection(pressureRatio);
31
32 // Inlet density correction
33 float tempCorrection = sqrt(C_K_OFFSET / (iat + C_K_OFFSET));
34 float pressureCorrection = p_up / STD_ATMOSPHERE;
35 float densityCorrection = tempCorrection * pressureCorrection;
36
37 return prCorrectionFactor * densityCorrection;
38}
static CCM_OPTIONAL FunctionalSensor iat(SensorType::Iat, MS2NT(10))
pressureRatio("Fuel: Injector pressure ratio", SensorCategory.SENSOR_INPUTS, FieldType.INT, 1188, 1.0, 0.0, 100.0, "")
static float pressureRatioFlowCorrection(float pr)

Referenced by ThrottleModelBase::partThrottleFlow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getThrottleInletPressure()

expected< float > getThrottleInletPressure ( )

Definition at line 121 of file throttle_model.cpp.

121 {
122 // Use TIP sensor
123 // or use Baro sensor if no TIP
124 // or use 101.325kPa (std atmosphere) if no Baro
127 SensorResult(STD_ATMOSPHERE);
128}
virtual bool hasSensor() const
Definition sensor.h:141
virtual SensorResult get() const =0
expected< float > SensorResult
Definition sensor.h:46
SensorType
Definition sensor_type.h:18
@ ThrottleInletPressure
@ BarometricPressure

Referenced by ThrottleModelBase::estimateThrottleFlow(), and getThrottlePressureRatio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getThrottlePressureRatio()

float getThrottlePressureRatio ( float  map)

Definition at line 130 of file throttle_model.cpp.

130 {
131 return map / getThrottleInletPressure().Value;
132}
expected< float > getThrottleInletPressure()

Referenced by readGppwmChannel(), and updatePressures().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pressureRatioFlowCorrection()

static float pressureRatioFlowCorrection ( float  pr)
static

Definition at line 11 of file throttle_model.cpp.

11 {
12 if (pr < 0.531) {
13 return 1.0;
14 }
15
16 if (pr > 0.95) {
17 return 0.449f;
18 }
19
20 // float x = pr;
21 // float x2 = x * x;
22 // float x3 = x2 * x;
23 // return -6.9786 * x3 + 11.597 * x2 - 6.7227 * x + 2.3509;
24
26}
static const float pressureRatioCorrectionBins[]
static const float pressureRatioCorrectionValues[]

Referenced by flowCorrections().

Here is the caller graph for this function:

Variable Documentation

◆ pressureRatioCorrectionBins

const float pressureRatioCorrectionBins[] = { 0.53125, 0.546875, 0.5625, 0.578125, 0.59375, 0.609375, 0.625, 0.640625, 0.65625, 0.671875, 0.6875, 0.703125, 0.71875, 0.734375, 0.750, 0.765625, 0.78125, 0.796875, 0.8125, 0.828125, 0.84375, 0.859375, 0.875, 0.890625, 0.90625, 0.921875, 0.9375, 0.953125 }
static

Definition at line 9 of file throttle_model.cpp.

9{ 0.53125, 0.546875, 0.5625, 0.578125, 0.59375, 0.609375, 0.625, 0.640625, 0.65625, 0.671875, 0.6875, 0.703125, 0.71875, 0.734375, 0.750, 0.765625, 0.78125, 0.796875, 0.8125, 0.828125, 0.84375, 0.859375, 0.875, 0.890625, 0.90625, 0.921875, 0.9375, 0.953125 };

Referenced by pressureRatioFlowCorrection().

◆ pressureRatioCorrectionValues

const float pressureRatioCorrectionValues[] = { 1, 0.9993, 0.998, 0.995, 0.991, 0.986, 0.979, 0.972, 0.963, 0.953, 0.942, 0.930, 0.916, 0.901, 0.884, 0.866, 0.845, 0.824, 0.800, 0.774, 0.745, 0.714, 0.679, 0.642, 0.600, 0.553, 0.449, 0.449 }
static

Definition at line 10 of file throttle_model.cpp.

10{ 1, 0.9993, 0.998, 0.995, 0.991, 0.986, 0.979, 0.972, 0.963, 0.953, 0.942, 0.930, 0.916, 0.901, 0.884, 0.866, 0.845, 0.824, 0.800, 0.774, 0.745, 0.714, 0.679, 0.642, 0.600, 0.553, 0.449, 0.449 };

Referenced by pressureRatioFlowCorrection().

Go to the source code of this file.