Is it possible to use number or a function to calculate MPH

My EMU Black is sending correct KMH (via VSS) in the gearbox over CAN to my ADU (I know its good as gps.speed is almost the same as ecu.speed). I am comfortable with functions but (n) calculations seem to not allow custom multipliers. IE (ecu.speed * 621 + 500) / 1000 which I believe would give me a rounded MPH figure.

Has anyone got a working example of how to calculate mph from ecu.speed using using the ‘number’ method in the ADU?

I wonder if this will work?

Calculations are made using integer numbers. If you divide 1 by speed, the result of this operation is 0 for every speed higher than 1 km/h.

Here is a working formula, it gives 62,13 mph for 100,0 km/h.

If you just want to display speed in mph on the screen, you don’t need to create this conversion. In the Text control, if you choose Unit mph, the conversion will be performed automatically.

If you need the speed in mph for later analysis, you can do this conversion in the Data Master without using extra numbers or operations from the ADU memory pool.

2 Likes