## 2 EarM_EPnP
### Threshold Value of Central Angle
The origin of the world coordinate system is constantly changing according to the solution point set \(A^{\prime}\), and the origin of the world coordinate system can be obtained by calculating the centroid. [18]. The calculation formula of the centroid of the point set \(A^{\prime}\) is as follows:  
\[ \begin{bmatrix}X_{c}\\ Y_{c}\\ Z_{c}\end{bmatrix} =\frac{\sum\limits_{i=1}^{n}A^{\prime}{}_{i}}{n} \tag{9}\]Equation (9) describes the method of obtaining the centroid. Here, \(n\) represents the number of point sets, and \([X_{c},Y_{c},Z_{c}]^{T}\) is the position of the origin of the world coordinate system in the three-dimensional Earth coordinate system. At the same time, to make the solution point set \(A^{\prime}\) rotate relative to the camera coordinate system, this method uses \(\alpha,\beta,\gamma\), and \(t\) to construct the rotation translation matrix \(R_{t}\). Among them, \(\alpha,\beta,\gamma\) are the rotation angle on the X-axis, the rotation angle on the Y-axis, and the rotation angle on the Z-axis, and \(t\) is the Translation vector. The \(t\) is shown in Equation (10). \[t= \begin{bmatrix}t_{x}&t_{y}&t_{z}\end{bmatrix} ^{T} \tag{10}\]  
The \(t\) matrix, \(t_{x},t_{y},t_{z}\), represents the translation of the X-axis, Y-axis, and Z-axis, respectively. By combining the \(\alpha,\beta,\gamma\) and \(t\) matrices, the rotation translation matrix \(R_{t}\) can be obtained, as shown in Equation (11). \[R_{t}= \begin{bmatrix}\cos(\alpha)\cos(\gamma)-\cos(\beta)\sin(\alpha)\sin( \gamma)&-\cos(\beta)\cos(\gamma)\sin(\alpha)-\cos(\alpha)\sin(\gamma)&\sin( \alpha)\sin(\beta)&t_{x}\\ \cos(\gamma)\sin(\alpha)+\cos(\alpha)\cos(\beta)\sin(\gamma)&\cos(\alpha) \cos(\beta)\cos(\gamma)-\sin(\alpha)\sin(\gamma)&-\cos(\alpha)\sin(\beta)&t_{y }\\ \sin(\beta)\sin(\gamma)&\cos(\gamma)\sin(\beta)&\cos(\beta)&t_{z}\end{bmatrix}  \tag{11}\]  
By rotating the translation matrix \(R_{t}\) and \([X_{c},Y_{c},Z_{c}]^{T}\), the new point set \(X_{world_{x}}^{S}\) in the world coordinate system can be obtained from \(A^{\prime}\). The formula for calculating \(X_{world_{x}}^{S}\) is shown in Equation (12). \[X_{world_{x}}^{S}=R_{t}\times \begin{bmatrix}{A_{n}}^{\prime}-\begin{bmatrix}X_ {c}\\ Y_{c}\\ Z_{c}\end{bmatrix}\end{bmatrix}  \tag{12}\]  
Equation (13) bring each point in the solution point set \(A^{\prime}\) into the solution, and a new point set \(X_{world_{x}}^{S}\) can be obtained. Each element in the point set is a matrix \(3\times 1\) in size. The number of point sets is also \(n\). For subsequent calculations, this method normalized each element \(X_{world}^{S}\) in the point set \(X_{world_{x}}^{S}\), and the normalization processing method was consistent with the processing method of Equation (8). At this point, the coordinate \(X_{M,k}^{S}\) of the solution point set \(A^{\prime}\) in the world coordinate system \(R_{f}\) was obtained. The coordinates of the solution point set \(A^{\prime}\) in the world coordinate system \(X_{M,k}^{S}\), the coordinates of the solution point set \(A^{\prime}\) in the two-dimensional image coordinate system \(X_{M,k}^{S}\), and the camera's internal parameter matrix \(A\) were calculated again using the method in the paper [18]. The rotation matrix \(R_{f}\), the translation vector \(T_{f}\), and the position coordinates of the camera \(P_{f}\) are as shown in Equation (13). \[\Big{(}R_{f},T_{f},P_{f}\Big{)}=f_{EPnP}\Big{(}X_{M,k}^{S},X_{2,k}^{S},A\Big{)} \tag{13}\]  
To obtain the rotation matrix \(R_{f}\) and the translation vector \(T_{f}\), it is only required to define the initial position \(P_{0} \begin{bmatrix}0&0&0\end{bmatrix} \) of the camera. The relative position of the camera in the spherical model can be obtained using Equations (14) and (15). \[P_{s}=R_{S}\times P_{0}^{T}+T_{S} \tag{14}\]  
\[P_{f}=R_{f}\times P_{0}^{T}+T_{f} \tag{15}\]  
We identified the difference between the positions acquired by the two formulas above and then took the absolute value to obtain the positioning error.