## 2 Materials and Methods
### Weight Setting in Phase Pattern Fitting Process
As the phase pattern of low-cost antennas are typically large in magnitude and asymmetrical in distribution, the more scattered the positions of involved PCCs are, the more likely a larger triple-differenced PCC is formed. Therefore, it is reasonable to give more weight to the PCC measurements that are formed by more scattered satellite directions. In this contribution, we measured the degree of scatter with the area of the aforementioned spherical quadrilateral. The area of a spherical quadrilateral can be regarded as the sum of the areas of two spherical triangles. Among the aforementioned four points that lay on the unit antenna hemisphere, we first found out two points (denoted as A and B) that met the following criteria--the other two points (denoted as C and D) were distributed on either side of the great circle that passed through the two points A and B. This could be done by utilizing the geometric relations between the plane, which was determined by two points (A, B) and O (ARP), and the other two points (C, D). Then we could calculate the areas of the two spherical triangles, \(\alpha ABC\) and \(\alpha ABD\). According to the spherical trigonometry, the area of the spherical triangle \(\alpha ABC\) can be calculated by  
\[S_{\Delta ABC}=(A+B+C-2\pi)\times R^{2} \tag{14}\]  
where \(A\), \(B\), and \(C\) denote spherical angles, and \(R=1\) denotes the radius of the antenna unit hemisphere. According to the spherical law of cosines, three spherical angles can be calculated by  
\[ \begin{array}{l}A=\arccos\left(\frac{\cos(a)-\cos(b)\cos(c)}{\sin(b)\sin(c) }\right)\\ B=\arccos\left(\frac{\cos(b)-\cos(a)\cos(c)}{\sin(a)\sin(c)}\right)\\ C=\arccos\left(\frac{\cos(c)-\cos(a)\cos(b)}{\sin(a)\sin(b)}\right)\end{array}  \tag{15}\]  
where \(a\), \(b\), and \(c\) denote three sides of \(\alpha ABC\). They are essentially three angular distances, and they can be calculated with the inner product of corresponding unit LOS vectors; see Equation (8). Figure 3: Illustration of the spherical quadrilateral ACBD enclosed by four terminal points of satellite unit LOS vectors. The solid and dashed satellite icons stand for the satellite positions at epochs \(t\) and \(t-T_{diff}\), respectively. The area of \({}_{\Delta}ABD\) can then be derived in the same way. Then we can obtain the area of the spherical quadrilateral ACBD, expressed as  
\[S_{quad}=S_{\Delta ABC}+S_{\Delta ABD} \tag{16}\]  
Once the calculations for \(S_{quad}\) with respect to all triple-differenced PCC measurements are performed, the weighting matrix can be set to  
\[W=diag\Big{(}\Big{[}\sqrt{S_{quad}^{1}}\ \sqrt{S_{quad}^{2}}\ \dots\ \sqrt{S_{quad}^{k}}\ \dots\Big{]}\Big{)} \tag{17}\]  
where \(k\) denotes the indexes of triple-differenced PCC measurements. It should be noted that for a concave spherical quadrilateral, there can be two ways to select the points A and B, i.e., the common points of two spherical triangles. In that case, we choose the way that maximizes \(S_{quad}\). Moreover, in the proposed weight setting method, the factors like elevation and signal to noise ratio (SNR) were not considered, despite the fact that they are usually incorporated to form weightings in GNSS applications. Generally, the lower the elevation is, the lower SNR is, and the larger the measurement error included in the carrier-phase observations. It is also the low-elevation regions where multipath errors are more significant. To reduce these problems, we can set an elevation mask angle to reject the observations at low elevations. Consequently, the final fitted phase pattern would only cover the regions above the elevation mask angle.