format sampling, lambda

This commit is contained in:
Matthew Kennedy
2026-04-10 13:36:18 -07:00
parent ca50ee30f0
commit 8a5dd603e0
3 changed files with 36 additions and 35 deletions

View File

@@ -16,8 +16,8 @@ static float GetPhiLsu49(float pumpCurrent)
return 1 / 0.5f;
}
// This estimation is accurate within 0.5% from 0.8 to 1.0, and 0.01% from 1 to 1.2 lambda when compared to the lookup table in the Bosch datasheet
// This error is less than half of the claimed accuracy of the sensor itself
// This estimation is accurate within 0.5% from 0.8 to 1.0, and 0.01% from 1 to 1.2 lambda when compared to the
// lookup table in the Bosch datasheet This error is less than half of the claimed accuracy of the sensor itself
float gain = pumpCurrent < 0 ? -0.28299f : -0.44817f;
return gain * pumpCurrent + 0.99559f;
@@ -37,8 +37,8 @@ static float GetPhiLsu42(float pumpCurrent)
return 1 / 0.7f;
}
// This estimation is accurate within 0.5% from 0.8 to 1.0, and 0.01% from 1 to 1.2 lambda when compared to the lookup table in the Bosch datasheet
// This error is less than half of the claimed accuracy of the sensor itself
// This estimation is accurate within 0.5% from 0.8 to 1.0, and 0.01% from 1 to 1.2 lambda when compared to the
// lookup table in the Bosch datasheet This error is less than half of the claimed accuracy of the sensor itself
float gain = pumpCurrent < 0 ? -0.23505f : -0.41441f;
return gain * pumpCurrent + 0.99153f;
@@ -71,14 +71,13 @@ static float GetPhiLsuAdv(float pumpCurrent)
}
}
static float GetPhi(float pumpCurrent) {
switch (GetSensorType()) {
case SensorType::LSU49:
return GetPhiLsu49(pumpCurrent);
case SensorType::LSU42:
return GetPhiLsu42(pumpCurrent);
case SensorType::LSUADV:
return GetPhiLsuAdv(pumpCurrent);
static float GetPhi(float pumpCurrent)
{
switch (GetSensorType())
{
case SensorType::LSU49: return GetPhiLsu49(pumpCurrent);
case SensorType::LSU42: return GetPhiLsu42(pumpCurrent);
case SensorType::LSUADV: return GetPhiLsuAdv(pumpCurrent);
}
return 1;