I am working on a spreadsheet to determine the kinematics of a vehicle steering column that uses three shafts connected by two universal joints. The mechanism can lie anywhere in 3D space.
An important part of the problem is to calculate the angle between the two planes defined by each consecutive pair of shafts and the joint between them, i.e. plane $1$ is defined by the upper and intermediate shafts, and plane $2$ is defined by the intermediate and lower shafts.
The problem I have is that the two equations I have tried both return the same answer when the second plane is flipped by changing the direction of the lower shaft so that it is mirrored in plane $1$. This is just an example to show that the same answer is given for multiple configurations of the mechanism. In reality I will be given only one configuration, but the ratio of output to input rotation is dependent on knowing the exact direction (and angular disposition) of the shafts.
To clarify, here are the two plane normals:
Plane $1$: $u = [0, 32000, 0]$;
Plane $2$: $v = [-10944, -30070, -20209.1904]$
The first equation I tried was:
$\operatorname{atan2} (x, y)$
Where:
$x=u\cdot v$
$y=||u\times v||$
Note the order of the arguments is $x$ then $y$ as I'm working in Excel.
This gives $142.61^\circ$.
The next equation I tried (from: https://math.stackexchange.com/a/1782769/539130) was:
$2\cdot \operatorname{atan2}(x, y)$
Where:
$x=||\,||v||u+||u||v\,||$
$y=||\,||v||u−||u||v\,||$
This too gives $142.61^\circ$
Then I changed the lower shaft direction so that the normal of plane $2$ was changed to plane $2'$:
Plane $2'$: $v = [10944, -30070, 20209.1904]$
Both equations continue to give $142.61^\circ$.
Could you advise on a method that can distinguish between these two configurations so that I can be assured of the correct (i.e. desired) angle?
The calculation of the plane normals is consistent, using the order of the shafts from top to bottom and with the right-hand rule. Could I perhaps use some similar knowledge to ensure consistent calculation of the angle between the normals?
Thanks, Simon.
