09.11.2011, 20:24
floatabs is not needed, as squared numbers will always be positive. Also I do not recommend to use the floatpower function for this, as it is way slower than just doing: ST[0] * ST[0]
So my choice would be simply
floatsqroot(ST[0] * ST[0] + ST[1] * ST[1] + ST[2] * ST[2]) * FACTOR
Where FACTOR is 200 or 180 or whatever, im not sure what factor is correct for getting kmh/mph
So my choice would be simply
floatsqroot(ST[0] * ST[0] + ST[1] * ST[1] + ST[2] * ST[2]) * FACTOR
Where FACTOR is 200 or 180 or whatever, im not sure what factor is correct for getting kmh/mph