# Estimation of Antenna Pose in the Earth Frame Using Camera and IMU Data from Mobile Phones
## 4 Relative Poses between the Camera and IMU Sensors
For convenience, we denote the above process by the function \(h_{t}\left(\frac{E}{B}R\right)\), where we omit any reference to a predefined \(\mathbf{v}\). We can formally define the azimuth angle of the checkerboard in a similar manner and encode the process as \(h_{t}\left(\frac{E}{B}R\right)\). An illustration is presented in Figure 5.  
In Equation (3), the introduction of \( \begin{smallmatrix}\mathbb{G}\\ M\end{smallmatrix} R\), i.e., the relative rotation between the accelerometer and magnetometer, is a key element that differentiates our method from previous camera-IMU calibration methods. We have explained our motivations for this in Section 1, and further evidence supporting our approach is provided by the contrasting behaviors of the downtilt and azimuth error curves with and without the additional DoFs, as shown in Figure 6, which illustrates that it is difficult to find a balance such that both the downtilt and azimuth errors can be kept simultaneously low when \( \begin{smallmatrix}\mathbb{G}\\ M\end{smallmatrix} R\) is ignored. To complete our definition of Equation (3), we design \(\delta_{R}\) to be a rotation metric defined in terms of the downtilt and azimuth angles, such that, for two orientations \(R_{1}\) and \(R_{2}\), we have:  
\[ \begin{split}\delta_{R}\left(R_{1},R_{2}\right)&= \delta_{R}^{\prime}\bigg{(}\Big{(}h_{t}\big{(}R_{1}\big{)},h_{a}\big{(}R_{1} \big{)}\Big{)},\Big{(}h_{t}\big{(}R_{2}\big{)},h_{a}\big{(}R_{2}\big{)}\Big{)} \bigg{)}\\ &=\big{(}1-w\big{)}\delta_{t}\Big{(}h_{t}\big{(}R_{1}\big{)},h_{t }\big{(}R_{2}\big{)}^{2}+w\delta_{a}\Big{(}h_{a}\big{(}R_{1}\big{)},h_{a} \big{(}R_{2}\big{)}\Big{)}^{2};0<w<0.5,\end{split}  \tag{4}\]  
Figure 4: The camera-IMU calibration problem represented as a graph model. where \(\delta_{R}^{\prime}\) is a rotation distance function defined in terms of the downtilt and azimuth angles, \(\delta_{t}\) and \(\delta_{a}\) are two special functions for calculating the minimal differences in the downtilt and azimuth angles based on their periodicity and \(w\) is a weighting parameter that will be explained later. A simple choice for \(\delta_{t}\) and \(\delta_{a}\) is the Euclidean distance after the transformation of the angles into the same phase. Note that our metric is defined based on the downtilt and azimuth angles and thus has only two DoFs, meaning that it is an incomplete representation of a rotation. Although it would be easy to add another DoF to the definition, we choose not to do so to decrease the number of measurements needed during data capture. We include the weight parameter \(w\) in the final expansion in Equation (4) to reduce the effect of the azimuth-related error on the overall cost. As is known from [52], the downtilt reading of an IMU relies solely on the accelerometer output, whereas the heading (azimuth) measurement predominantly depends on the magnetometer output. However, the precision of the accelerometer in a mobile phone is typically much higher than that of the magnetometer, and the magnetic environment is highly unstable compared to the gravitational environment in practice. Hence, the scales of the errors on the two components of \(\delta_{R}\) are likely to be unbalanced, which may lead to non-optimal solutions for the overall calibration; by restricting \(w\) to a value less than 0.5, we can re-balance the two types of errors. Although we cannot determine \(w\) analytically, we can show that the calibration accuracy is insensitive to \(w\) when the value of \(w\) is sufficiently low, as seen from the experimental results presented in Figure 6. Empirically, we recommend keeping this value in the range of \([0.1,0.3]\). Figure 5: Illustration of the definitions of the (checkerboard) downtilt and azimuth angles in the Earth frame where the \(\mathrm{X},\mathrm{Y}\) and \(\mathrm{Z}\) point towards east, north and zenith. The direction normal to the front surface of the checkerboard is used to define both its (down)tilt and azimuth angles in this example.