Quote: Originally Posted by
Erorus 
PHP Code:
Function GetMPG(tIDC As Variant, tSpeed As Variant) As Variant
''tIDC is injector duty cycle.
''tSpeed is vehicle speed in MPH. To convert from what the OBD returns, value=OBDData * 0.621371192
''tVFF is volume fuel flow.
If IsNull(tIDC) Or IsNull(tSpeed) Then
GetMPG = Null
Exit Function
End If
Dim tMPG As String
Dim tVFF As String
'' Do VFF (gallons/minute)
tVFF = tIDC * 250 * 0.000264172051
'' Do Speed in miles/min
tSpeed = tSpeed/60
'' Calculate MPG
tMPG = (tSpeed / tVFF) * tLTFuelTrim
GetMPG = FormatNumber(tMPG, 1, True, False, False)
End Function
This is with 250cc/min injectors. Would something like this work?