Move fuel density to a header file so it can be accessed by other components. (#3474)
This commit is contained in:
parent
5e4abadd48
commit
675460fafb
|
@ -36,3 +36,4 @@ private:
|
|||
};
|
||||
|
||||
float getLoadOverride(float defaultLoad, afr_override_e overrideMode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
constexpr float fuelDensity = 0.72; // g/cc
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "injector_model.h"
|
||||
#include "fuel_computer.h"
|
||||
|
||||
void InjectorModelBase::prepare() {
|
||||
m_massFlowRate = getInjectorMassFlowRate();
|
||||
|
@ -11,8 +12,7 @@ void InjectorModelBase::prepare() {
|
|||
}
|
||||
|
||||
constexpr float convertToGramsPerSecond(float ccPerMinute) {
|
||||
float ccPerSecond = ccPerMinute / 60;
|
||||
return ccPerSecond * 0.72f; // 0.72g/cc fuel density
|
||||
return ccPerMinute * (fuelDensity / 60.f);
|
||||
}
|
||||
|
||||
expected<float> InjectorModel::getAbsoluteRailPressure() const {
|
||||
|
|
Loading…
Reference in New Issue