# 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  
In this section, our aim is to accurately determine the relative rotations between the camera, accelerometer and magnetometer to improve the accuracies of downtilt and azimuth estimation for a remote target. We use a checkerboard to capture the data we need for calibration. The board is placed in several orientations, and for each placement, we measure the downtilt and azimuth angles and capture multi-view data in the same manner used for capturing data from an antenna. This checkerboard pose measurement step replaces the careful checkerboard setup required in [37; 50]. Multiple groups of data are captured to provide sufficient constraints for the calibration. Suppose that we have a group of calibration data that consists of \(Q\) checkerboard placements with measured downtilt and azimuth angles of \(\left(t_{i},\ a_{i}\right),i=1,2,\ldots,Q\), and that multi-view data have been captured from \(Q_{i}\) viewpoints for the \(i\)-th checkerboard placement. Then, we can model the calibration using a graph model similar to that presented for the antenna pose estimation problem, as shown in Figure 4.  
Unlike in the case of the antenna pose estimation problem, because of the maturity of camera calibration techniques (e.g., [53]), the relative pose between the camera and the checkerboard is considered to be known, and the downtilt and azimuth angles of the checkerboard are regarded as the ground truth. Thus, we can transform the graph model into the following optimization problem:  
\[ \begin{split}&\underset{\mathcal{C}^{R},\mathcal{M}^{R}}{argmin} \sum_{i=1}^{Q}\frac{1}{Q_{i}}\sum_{j=1}^{Q_{i}}\delta_{R}\left({}_{E}^{B}R_{i ^{\prime}},{}_{C}^{B}R_{i}^{j}R_{E}^{l}R_{i}^{j}\right)\\ &\ s.t.\ \ h_{a}\left({}_{E}^{B}R_{i}\right)=a_{i},\ \ h_{t}\left({}_{E}^{B}R_{i}\right)=t_{i},\end{split}  \tag{3}\]  
Figure 3: Overview of the proposed method. Antenna images captured from multiple viewpoints are used to estimate the antenna pose in the camera frames based on the 3D antenna model. By correlating the IMU orientations in the Earth frame with the camera orientations, the antenna pose in the Earth frame is computed by averaging the poses estimated from all viewpoints. The camera-IMU calibration provides important information on the relative sensor rotations for improving the IMU orientation estimation and the visual-inertial correlation. where \(\delta_{R}\) is a distance function or metric for rotations, which we will explain in detail later, and \( \begin{smallmatrix}l\\ E\end{smallmatrix} R_{i}^{j}\) is the IMU orientation in \(EF\) as calculated from \(\mathcal{S}_{i}^{j}\), which is the \(j\)-th frame of sensor data in the \(i\)-th group of calibration data, with existing methods like [52], after the accelerometer and magnetometer measurements have been aligned via \( \begin{smallmatrix}\mathbb{G}\\ M\end{smallmatrix} R\). The symbol of \(B\) represents the coordinate frame of the checkerboard. The functions of \(h_{t}\) and \(h_{a}\) are defined for calculating the downtilt and azimuth angles of the checkerboard. In astronomy, for a vector \(\mathbf{V}\) in \(EF\), its tilt and azimuth angles are defined as follows:  
\[ \begin{cases}t=arcsin\left(\mathbf{V}(2)\right)\\ a=arctan\left(\frac{\mathbf{V}(0)}{\mathbf{V}(1)}\right),\end{cases} \]  
where \(t\) is the tilt angle, \(a\) is the azimuth angle and \(\mathbf{V}\left(i\right)\) is the \(i\)-th component of \(\mathbf{V}\). For a checkerboard, we can use its edge directions, its surface normal direction or a combination thereof to describe its tilt and azimuth angles, and since most antennas are pointing downwards, we prefer to use the term downtilt instead of tilt, which are opposite from each other. To be specific, suppose that we choose a direction \(v\) on the checkerboard to define the downtilt angle and that the rotation of the checkerboard relative to \(EF\) is \(\frac{E}{B}R\); then, the downtilt angle of the checkerboard in \(EF\) is defined by \(\frac{E}{B}R\cdot\mathbf{v}\).