08-16-2021, 03:44 PM
trying to devise a guage that shows real time fuel economy (MPG). located this formula and established that it used two PID's that are available and working VSS and MAF.
1. Divide the MAF by 14.7 to get grams of gas per second
2. Divide result by 454 to get Lbs gas per second
3. Divide result by 6.701 Gals gas per second
4. Multiply result by 3600 to get gallons per hour
The math expression for GPH is: MAF * 0.0805
. The final math expression
for MPG will be:
VSS * 7.718/MAF
the equation works in "MathPapa" when fed actual readings from OAP. The guage will show up in OAP but only reads '0'.
Not sure how to troubleshoot my syntax. Formula=(getPidValue(5)*7.718)/getPidValue(7)
just to be clear it is [ObdGauge_9] and I have changed the gauge count to 10.
[ObdGauge_9]
MinValue=0
MaxValue=100
Formula=(getPidValue(5)*7.718)/getPidValue(7)
Label=MPG
what am I missing?
1. Divide the MAF by 14.7 to get grams of gas per second
2. Divide result by 454 to get Lbs gas per second
3. Divide result by 6.701 Gals gas per second
4. Multiply result by 3600 to get gallons per hour
The math expression for GPH is: MAF * 0.0805
. The final math expression
for MPG will be:
VSS * 7.718/MAF
the equation works in "MathPapa" when fed actual readings from OAP. The guage will show up in OAP but only reads '0'.
Not sure how to troubleshoot my syntax. Formula=(getPidValue(5)*7.718)/getPidValue(7)
just to be clear it is [ObdGauge_9] and I have changed the gauge count to 10.
[ObdGauge_9]
MinValue=0
MaxValue=100
Formula=(getPidValue(5)*7.718)/getPidValue(7)
Label=MPG
what am I missing?