## 4 Methodology
### The 7-Parameter Transformation
Rotation of the axes can be done according to coordinate frame rotation (CFR) convention, which implies a fixed position vector while the coordinate system rotates (Figure 5a) and according to position vector transformation (PVT) convention, which implies a fixed coordinate system while the position vector rotates (Figure 5b) [42]. In Figure 5, angle \(\alpha_{z}\) represents the rotation angle around \(Z\)-axis, and angle \(\theta\) represents the angle between the positive direction of the X-axis and the position vector in the input coordinate system. Based on these conventions, rotations can be observed in two ways: rotation of the output coordinate system around the input coordinate system, which corresponds to CFR convention, and rotation of the output coordinate system around the input coordinate system, which corresponds to PVT convention. In the exchange of transformation parameters, mandatory metadata is the rotation convention so the appropriate rotation matrix can be used in the process of coordinate transformation. In Equation (30), an abridged version of the rotation matrix is given. The complete rotation matrix can be obtained by multiplications of simple rotation matrices around three coordinate axes [8]. By rotating the output coordinate system around the input one (where the \(Z\)-axis is fixed), from Figure 5a, the following can be expressed:  
\[X_{i} =r\cdot\cos\theta \tag{34}\] \[Y_{i} =r\cdot\sin\theta\] \[X_{o} =r\cdot\cos(\theta-\alpha_{z})\] \[Y_{o} =r\cdot\sin(\theta-\alpha_{z})\] \[Z_{o} =Z_{i}\]  
Terms for the output coordinate system can be written out by addition formulas for sine and cosine of angle differences:  
\[X_{o} =r\cdot\cos\theta\cdot\cos\alpha_{z}+r\cdot\sin\theta\cdot\sin \alpha_{z} \tag{35}\] \[Y_{o} =r\cdot\sin\theta\cdot\cos\alpha_{z}-r\cdot\cos\theta\cdot\sin \alpha_{z}\] \[Z_{o} =Z_{i}\]  
Figure 5: Rotation conventions around \(Z\)-axis (according to [42]): (**a**) CFR, (**b**) PVT. By including the first two terms in Equation (34) in (35), the relationship between two coordinate systems can be obtained (where \(Z_{i}=Z_{o}\) because the Z-axis is fixed):  
\[ \begin{split} X_{o}&=X_{i}\cdot\cos\alpha_{z}+Y_{i} \cdot\sin\alpha_{z}\\ Y_{o}&=Y_{i}\cdot\cos\alpha_{z}-X_{i}\cdot\sin \alpha_{z}\\ Z_{o}&=Z_{i}\end{split}  \tag{36}\]  
or, in matrix form,  
\[ \begin{bmatrix}X_{o}\\ Y_{o}\\ Z_{o}\end{bmatrix} = \begin{bmatrix}\cos\alpha_{z}&\sin\alpha_{z}&0\\ -\sin\alpha_{z}&\cos\alpha_{z}&0\\ 0&0&1\end{bmatrix} \cdot \begin{bmatrix}X_{i}\\ Y_{i}\\ Z_{i}\end{bmatrix} \rightarrow\mathbf{X}_{o}=\mathbf{R}_{z}\mathbf{X}_{i} \tag{37}\]  
where \(\mathbf{R}_{z}\) represents the rotation matrix around the Z-axis. Other two rotation matrices (around the X and Y axes) can be obtained in the same way:  
\[ \begin{split}\mathbf{R}_{x}&=\begin{bmatrix}1&0&0\\ 0&\cos\alpha_{x}&\sin\alpha_{x}\\ 0&-\sin\alpha_{x}&\cos\alpha_{x}\end{bmatrix}\\ \mathbf{R}_{y}&=\begin{bmatrix}\cos\alpha_{y}&0&-\sin\alpha_{y}\\ 0&1&0\\ \sin\alpha_{y}&0&\cos\alpha_{y}\end{bmatrix}\end{split}  \tag{38}\]  
The complete rotation matrix is a result of a multiplication of three rotation matrices from Equations (37) and (38). In the case when rotation angles are larger, the order of multiplication is very important, whereas for small angles, the order importance is not substantial. In practice, the system is assumed to rotate around the X, Y, and Z axes, respectively. In that case, the complete rotation matrix for the CFR convention is [8]  
\[ \begin{split}\mathbf{R}_{CFR}^{ZYX}=\begin{bmatrix}\cos\alpha_{y} \cos\alpha_{z}&\sin\alpha_{x}\sin\alpha_{y}\cos\alpha_{z}+\cos\alpha_{x}\sin \alpha_{z}&-\cos\alpha_{x}\sin\alpha_{y}\cos\alpha_{z}+\sin\alpha_{x}\sin \alpha_{z}\\ -\cos\alpha_{y}\sin\alpha_{z}&-\sin\alpha_{x}\sin\alpha_{y}\sin\alpha_{z}+ \cos\alpha_{x}\cos\alpha_{z}&\cos\alpha_{x}\sin\alpha_{y}\sin\alpha_{z}+ \sin\alpha_{x}\cos\alpha_{z}\\ \sin\alpha_{y}&-\sin\alpha_{x}\cos\alpha_{y}&\cos\alpha_{x}\cos\alpha_{y} \end{bmatrix}\end{split}