rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions
AlphaNAirmass Class Reference

#include <alphan_airmass.h>

Inheritance diagram for AlphaNAirmass:
Inheritance graph
[legend]
Collaboration diagram for AlphaNAirmass:
Collaboration graph
[legend]

Public Member Functions

 AlphaNAirmass (const ValueProvider3D &veTable)
 
AirmassResult getAirmass (float rpm, bool postState) override
 
- Public Member Functions inherited from AirmassVeModelBase
 AirmassVeModelBase (const ValueProvider3D &veTable)
 
float getVe (float rpm, percent_t load, bool postState) const
 

Additional Inherited Members

- Static Public Member Functions inherited from SpeedDensityBase
static mass_t getAirmassImpl (float ve, float manifoldPressure, float temperature)
 
- Protected Member Functions inherited from SpeedDensityBase
 SpeedDensityBase (const ValueProvider3D &veTable)
 

Detailed Description

Definition at line 5 of file alphan_airmass.h.

Constructor & Destructor Documentation

◆ AlphaNAirmass()

AlphaNAirmass::AlphaNAirmass ( const ValueProvider3D veTable)
inlineexplicit

Definition at line 7 of file alphan_airmass.h.

Member Function Documentation

◆ getAirmass()

AirmassResult AlphaNAirmass::getAirmass ( float  rpm,
bool  postState 
)
overridevirtual

Implements AirmassModelBase.

Definition at line 6 of file alphan_airmass.cpp.

6 {
8
9 if (!tps.Valid) {
10 // We are fully reliant on TPS - if the TPS fails, stop the engine.
11 return {};
12 }
13
14 // In this case, VE directly describes the cylinder filling relative to the ideal
15 float ve = getVe(rpm, tps.Value, postState);
16
17 // optionally use real IAT instead of fixed air temperature
18 constexpr float standardIat = STD_IAT; // std atmosphere temperature
20 ? Sensor::get(SensorType::Iat).value_or(standardIat)
21 : standardIat;
22
23 float iatK = iat + 273/* todo reuse C_K_OFFSET which would require adjusting unit tests*/;
24
25 // TODO: should this be barometric pressure and/or temperature compensated?
26 mass_t airmass = getAirmassImpl(
27 ve,
28 STD_ATMOSPHERE,
29 iatK
30 );
31
32 return {
33 airmass,
34 tps.Value
35 };
36}
float getVe(float rpm, percent_t load, bool postState) const
Definition airmass.cpp:17
virtual SensorResult get() const =0
static mass_t getAirmassImpl(float ve, float manifoldPressure, float temperature)
static constexpr engine_configuration_s * engineConfiguration
static CCM_OPTIONAL FunctionalSensor iat(SensorType::Iat, MS2NT(10))
float mass_t
Here is the call graph for this function:

The documentation for this class was generated from the following files: