2020-06-06 04:25:19 -07:00
|
|
|
#pragma once
|
|
|
|
|
2020-07-23 01:12:38 -07:00
|
|
|
#include "engine.h"
|
|
|
|
|
2020-07-28 11:44:09 -07:00
|
|
|
class ValueProvider3D;
|
|
|
|
|
2020-06-06 04:25:19 -07:00
|
|
|
struct AirmassResult {
|
|
|
|
float CylinderAirmass = 0;
|
|
|
|
float EngineLoadPercent = 100;
|
|
|
|
};
|
2020-07-23 01:12:38 -07:00
|
|
|
|
|
|
|
struct AirmassModelBase {
|
|
|
|
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;
|
|
|
|
};
|