The roll, pitch and yaw of an object relative to another is complex to compute. We use 3D complex number to compute them which makes the computation easier and more intuitive.
Roll, pitch and yaw are angles of orientation of an object in space and the conversion of these angles among different reference frames is not easy, as this example illustrates:
We will use 3D complex number to compute the roll, pitch and yaw of a telephon relative to a car. We label the car as object a and the telephon as object b. Their reference frames are labeled as frame A and B and these frames are orientated with respect to the ground whose frame is labeled as frame G. The base vectors of the frame A are ax, ay and az, that of the frame Bare bx, by and bz and that of the frame G are gx, gy and gz. The vectors ax, ay and az and bx, by and bz are expressedwith gx, gy and gz in equations (1) and (2) with Maand Mb being the matrices of transformation.
The roll, pitch and yaw of the object b relative to the object a define the orientation of the frame B in the frame A. This orientation is defined by the angles of rotation q, j and y, see Figure 1. For computing these angles we express the vectors bx, by and bz with the vectors ax, ay and az in (3), (4) and (5). In (10), (11) and (12) the coefficients in the parentheses are dot products between ax, ay and az and bx, by and bz. The equations (10) , (11) and (12) are written in matrix form in (13) from which we extract the matrix of transformation Mba shown in (14), see (3), (4) and (5).
From the 5 underscored coefficients in (14) we derive the angles q, j and y using (15), (16) and (17), knowing that is always positive because j is between -p/2 and p/2, see Figure 1. Roll, pitch and yaw of an object are the rotation angles of the object around the x, y and z axis respectively, see Figure 1 and the page https://en.wikipedia.org/wiki/Flight_dynamics_(fixed-wing_aircraft).
So, the conversion formula between roll, pitch and yaw and the angles q, j and y is equation (18).
The main advancement given by our method using 3D complex number is to have related the roll, pitch and yaw of an object to the 3D complex number that represent the x axis of the object. This mathematical discovery makes the conversion of roll, pitch and yaw between arbitrary frames easier and more intuitive.
The angles of rotation q, j and y are computed with the 5 underscored coefficients of the matrix Mba in (14) saving thus the computation time for the 4 other coefficients which are not needed. This will make the computation faster and the motion of moving images on screen smoother. So, our method using 3D complex number would be beneficial to applications such as video games or street view of digital map etc.
For more detail of this study please read the complete paper here:
«Determination of the relative roll, pitch and yaw between arbitrary objects using 3D complex number»
https://www.academia.edu/92242546/Determination_of_the_relative_roll_pitch_and_yaw_between_arbitrary_objects_using_3D_complex_number Kuan Peng