I have been measuring the change in orientation of a 3D shape (a 3-space sensor) with different starting positions for a controlled end position.
I am using Euler angles, (P)itch, (R)oll and (Y)aw. My measure of orientation change Is: Orientation change OC = |dP| + |dR| + |dY|
The 3 starting positions differ only in sensor roll in degrees:
1). 0
2). 45
3). 90
With each starting position the sensor is tared then elevated to 30 degrees along the roll axis.
The problem is that for 1). & 3). as expected I get OC = 30, representing only pitch and only yaw error of 30 degrees respectively. However for 2). OC is significantly >30 being a sum of non-zero pitch, roll and yaw.
Is this as expected? Assuming it is, is there a better measure of OC which is not sensitive to starting position?
See here: https://stackoverflow.com/a/59013791/4833760
The answer was to use a quaternion distance, this was the dot product of the initial and final quaternions which my sensor supplied as unit quaternions where x2 + y2 + z2 + w2 = 1
The dot product was given by: dot = xi.xf + yi.yf + zi.zf + wi.wf
Furthermore I used the relative angle theta (radians) between these quaternions given by: Theta = 2cos-1(dot)
The sensors gave greatly improved results using theta, which only improved more when they had a gradient descent calibration applied.