fome-fw/firmware/controllers/algo/airmass/airmass.h

27 lines
572 B
C
Raw Normal View History

#pragma once
2020-07-28 11:44:09 -07:00
class ValueProvider3D;
struct AirmassResult {
float CylinderAirmass = 0;
float EngineLoadPercent = 100;
};
2020-07-23 01:12:38 -07:00
2021-05-14 04:17:22 -07:00
struct AirmassModelBase {
virtual AirmassResult getAirmass(int rpm) = 0;
2021-05-14 04:17:22 -07:00
};
class AirmassVeModelBase : public AirmassModelBase, public EnginePtr {
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
protected:
// Retrieve the user-calibrated volumetric efficiency from the table
float getVe(int rpm, percent_t load) const;
private:
const ValueProvider3D* const m_veTable;
float getVeLoadAxis(float passedLoad) const;
2020-07-23 01:12:38 -07:00
};