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

28 lines
537 B
C
Raw Normal View History

#pragma once
2020-07-23 01:12:38 -07:00
#include "engine.h"
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
2020-12-04 20:59:21 -08:00
class AirmassModelBase {
public:
2020-07-23 01:12:38 -07:00
DECLARE_ENGINE_PTR;
2020-07-29 02:23:03 -07:00
explicit AirmassModelBase(const ValueProvider3D& veTable);
2020-07-23 01:12:38 -07:00
virtual AirmassResult getAirmass(int rpm) = 0;
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
};