comment headers, notes
This commit is contained in:
parent
7940b84778
commit
28d27c4990
|
@ -1,3 +1,11 @@
|
|||
/**
|
||||
* @file speed_density_base.cpp
|
||||
*
|
||||
* Base for speed density (ie, ideal gas law) math shared by multiple fueling modes.
|
||||
*
|
||||
* @date July 22, 2020
|
||||
* @author Matthew Kennedy, (C) 2020
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "speed_density_base.h"
|
||||
|
@ -5,13 +13,16 @@
|
|||
EXTERN_ENGINE;
|
||||
|
||||
/**
|
||||
* is J/g*K
|
||||
* aka
|
||||
* Derived via:
|
||||
* (8.31 J K mol^-1) <- ideal gas constant R
|
||||
* /
|
||||
* (28.97g mol^-1) <- molar mass of air
|
||||
* = 0.28705 J*K/g
|
||||
*/
|
||||
#define GAS_R 0.28705
|
||||
#define AIR_R 0.28705f
|
||||
|
||||
float idealGasLaw(float volume, float pressure, float temperature) {
|
||||
return volume * pressure / (GAS_R * temperature);
|
||||
return volume * pressure / (AIR_R * temperature);
|
||||
}
|
||||
|
||||
float SpeedDensityBase::getAirmassImpl(float ve, float manifoldPressure, float temperature DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/**
|
||||
* @file speed_density_base.h
|
||||
*
|
||||
* Base for speed density (ie, ideal gas law) math shared by multiple fueling modes.
|
||||
*
|
||||
* @date July 22, 2020
|
||||
* @author Matthew Kennedy, (C) 2020
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "engine.h"
|
||||
|
|
Loading…
Reference in New Issue