Calculate hand position from upper-and lower arm's orientation I've got two unit quaternions in world space representing the lower- and upper arms orientation.
The lengths of upper- and lower arm are known.
How can i calculate the hand-position relative to the shoulder from these known values?
EDIT: I've got a Myo-armband on my upper arm which gives the following quaternions when my arm lays flat on the table and is pointing up (in order w,x,y,z)
$${arm}_{flat\ on\ table}=\begin{pmatrix}
        0.985656 \\
        0.017465 \\
        -0.049743 \\
        -0.160278 \\
        \end{pmatrix} \ \ \  
{arm}_{pointing\ up}=\begin{pmatrix}
        0.708068 \\
        -0.035339 \\
        -0.703430 \\
        -0.051269 \\
        \end{pmatrix} 
$$
 A: If you can figure out the unit vectors $V_u, V_l$ that represent your upper arm direction, and lower arm direction, and if $l_u, l_l$ are the lengths, then the vector offset of your hand from the shoulder is just $l_uV_u + l_lV_l$. But the question is, what are those two vectors? I can see two posibilities.


*

*There is a "Standard Vector" $n$ that is rotated by the quaternion to provide the direction of the arm. A quaternion is essentially a vector + a scalar (in fact, the terms "scalar" and "vector" were first coined to describe the real and non-real parts of quaternions), so $n$ is also a quaternion with 0 real part. So if $p_u$ is the orientation quaternion for the upper arm, then $V_u = p_unp_u^{-1}$, and similarly for $V_l$. Since the quaternion for having your arm horizontal has scalar part nearly 1, I have to assume that $n$ points in a horizontal direction. I don't know how your Myo determines its heading, though, so I can't say which horizontal direction it would be. Apparently it is close to the direction you laid out your arm, though.

*Or the orientation quaternion could directly represent the vector. If this is the case, I have no idea what the real portion represents, though. The orientation quaternions do satisfy $|p| = 1$, but that still leaves plenty of freedom left to choose different scalar components.


I have done a little searching to see I could find an answer, without success. Rreally it depends on what Thalmic decided to use. It ought to be spelled out in their documentation somewhere. Given that the whole point of this technology is to determine where the arm is directed, they should have provided the information to make use of it.
However, I have dealt with a company in the past who was so caught up in their instrumentation that it never occurred to them to specify exactly what the numbers returned meant, even after I asked very specifically. Possibly Thalmic has yet to figure out that cool measurements are useless without proper documentation.
