rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
fuel_computer.h
Go to the documentation of this file.
1/**
2 * @file fuel_computer.h
3 */
4
5#pragma once
6
8
9#include "rusefi_types.h"
11
13 virtual mass_t getCycleFuel(mass_t airmass, float rpm, float load) = 0;
14 temperature_t getTCharge(float rpm, float tps);
15 float getLoadOverride(float defaultLoad, load_override_e overrideMode) const;
16private:
17 float getTChargeCoefficient(float rpm, float tps);
18};
19
20// This contains the math of the fuel model, but doesn't actually read any configuration
22public:
23 mass_t getCycleFuel(mass_t airmass, float rpm, float load) override;
24
25 virtual float getStoichiometricRatio() const = 0;
26 virtual float getTargetLambda(float rpm, float load) const = 0;
27 virtual float getTargetLambdaLoadAxis(float defaultLoad) const = 0;
28};
29
30// This class is a usable implementation of a fuel model that reads real configuration
31class FuelComputer final : public FuelComputerBase {
32public:
33 float getStoichiometricRatio() const override;
34 float getTargetLambda(float rpm, float load) const override;
35 float getTargetLambdaLoadAxis(float defaultLoad) const override;
36};
37
38float getLoadOverride(float defaultLoad, load_override_e overrideMode);
39constexpr float fuelDensity = 0.72; // g/cc
virtual float getTargetLambda(float rpm, float load) const =0
mass_t getCycleFuel(mass_t airmass, float rpm, float load) override
virtual float getStoichiometricRatio() const =0
virtual float getTargetLambdaLoadAxis(float defaultLoad) const =0
float getTargetLambdaLoadAxis(float defaultLoad) const override
float getTargetLambda(float rpm, float load) const override
float getStoichiometricRatio() const override
constexpr float fuelDensity
float getLoadOverride(float defaultLoad, load_override_e overrideMode)
load_override_e
temperature_t getTCharge(float rpm, float tps)
float getLoadOverride(float defaultLoad, load_override_e overrideMode) const
virtual mass_t getCycleFuel(mass_t airmass, float rpm, float load)=0
float getTChargeCoefficient(float rpm, float tps)