Thanks Capp777. I think @userM’s vehicle is a BMW and if it supports [0C] I would be willing to bet it would support [0D] (or Vehicle speed – in kph). If it does not – seems we would be faced with TWO unknowns – Gear Ratio & Speed. So other than ‘math is fun’, were sunk.
But MY ‘OLD’ 2004 F150 5.4l Has GEAR at PID # 11B3, Formula: A/2. If I am correct about @userM’s being a BMW, my bet is that it has both VSS, _AND_ GEAR somewhere if it could just be found.
But working out cleaver new PID’s & Displays is COOL & FUN – Like the one I created that “ALTERNATES” between Volts display & Temperature display for Cylinder Head Temp on my vehicle – using the CHT_V volts sensor. The concept can be used for ANY gauge.
I found PID for a constant counter. Ie: PIDs on MY vehicle for “Acceleration UP Counter” (# 1617) and “Deceleration Counter” (# 1618) that run as continuous counters depending on whether the engine is under “positive” or “negative” Torque.
I created a ‘Virtual PID’ named ‘TRQacc 1617’ out of the UP Counter (MODE/PID 221617) with formula ((A*256+B)&8)/8. This Virtual PID just masks off bit3 of the constant UP counter and creates a ZERO or ONE out of it – which gives me alternating Zero/One at the desired rate – about every few (56) seconds.
Then I changed the Short Name of CHT_V (PID 1685) to “CHT_V/ºF” and used the Formula:
(val{TRQacc 1617})*((65535(A*256+B)/13107)+((val{TRQacc 1617})*1)+1)*((65535(A*256+B))/94.875)
Both halves of the Formula are multiplied by the Value of ‘TRQacc 1617’, then added together and displayed on a ‘Digital Gauge with Units specified as ‘Volts/Deg F’. Since ‘TRQacc 1617 can never be anything other than ZERO or ONE, either the left half or right half of the formula is multiplied by ZERO when the OTHER half is multiplied by ONE. Thus, adding them together results in simply displaying either Volts – or Deg F alternately.
What’s really COOL is, since letting off the accelerator stops the ‘Acceleration UP Counter’ (and starts the Deceleration counter), you can STOP the display’s alternation at any time by simply letting off the gas!!!
I have the standard CHT (PID 1624) – which is ‘Normalized’ CHT displayed right next to it, and the gauge based on voltage/Degrees will swing above and below the normalized Cylinder Head Temp when under load or coasting for a distance.
————
54371019
