Converting a velocity vector into MPH?

I have a velocity vector on X, Y and Z axes. The values are represented as M/S (meters per second).

What algorithm should I use to convert this vector into a general MPH (miles per hour) value that takes into account all axes of the vector?

This may (or may not) be a very simple question. But I am far from being a genius at math! So apologies.

Thanks very much.

-

1 Answer

Multiply each coordinate by 2.23693629. In general, to convert units of a vector, you just convert units of each coordinate. This works because scalar multiplication by positive constants preserves direction, and because lengths of vectors and scalar multiplication are related by $\|c v\|=|c|\|v\|$. Scalar multiplication in this case just means multiplying each coordinate by the conversion factor.

-
I forgot to mention that I was already aware of the 2.2369 constant for M/S to MPH conversion. The thing I'm most interested in is how I can convert the XYZ velocity vector into a scalar MPH value. I have tried just using addition but this is proving to be incorrect. –  Nathan Nov 6 '10 at 19:21
@Nathan: I expected that you would know the conversion factor, which is not the point of my answer. I thought you wanted the converted vector, but apparently you just wanted the length of the converted vector. Do you know how to find the length of a vector? You could either multiply by 2.2369, then find the length, or find the length (in m/s), then multiply by 2.2369. –  Jonas Meyer Nov 6 '10 at 19:34
At the moment I am doing, psuedo: (Abs(vx) + Abs(vy) + Abs(vz)) * 2.2369. But this is proving to provide incorrect. –  Nathan Nov 6 '10 at 19:38
For a vector with only an $x$ component, you just take the absolute value to get the length. For a vector with only $x$ and $y$ components, then using the Pythagorean theorem you can see that the length of the vector is the the square root of the sum of the squares of the components. With a slightly more elaborate picture you can apply the Pythagorean theorem again to get the same result in general, so you should have $2.2369\sqrt{v_x^2+v_y^2+v_z^2}$. –  Jonas Meyer Nov 6 '10 at 19:51
@Nathan: You don't need the Abs() around the squares, as the square of a real number is necessarily non-negative. –  Rahul Nov 6 '10 at 20:37