rusefi/firmware/controllers/algo/airmass/airmass.h

25 lines
563 B
C
Raw Normal View History

#pragma once
2021-12-26 10:41:10 -08:00
#include "rusefi_types.h"
2020-07-28 11:44:09 -07:00
class ValueProvider3D;
struct AirmassResult {
2021-12-26 10:41:10 -08:00
mass_t CylinderAirmass = 0;
percent_t EngineLoadPercent = 100;
};
2020-07-23 01:12:38 -07:00
2021-05-14 04:17:22 -07:00
struct AirmassModelBase {
2024-09-24 23:21:39 -07:00
virtual AirmassResult getAirmass(float rpm, bool postState) = 0;
2021-05-14 04:17:22 -07:00
};
class AirmassVeModelBase : public AirmassModelBase {
2020-12-04 20:59:21 -08:00
public:
2021-05-14 04:17:22 -07:00
explicit AirmassVeModelBase(const ValueProvider3D& veTable);
2020-07-23 01:12:38 -07:00
// Retrieve the user-calibrated volumetric efficiency from the table
2024-09-24 23:21:39 -07:00
float getVe(float rpm, percent_t load, bool postState) const;
2020-07-23 01:12:38 -07:00
private:
const ValueProvider3D* const m_veTable;
};