# An Indoor DFEC Ranging Method for Homologous Base Station Based on GPS L1 and BeiDou B1 Signals
## 2 DFEC Ranging Principle
### Proposed Method  
In the previous section, we briefly introduced the principle of the indoor homogeneous base station system used. In this section, we will introduce the DFEC ranging process in detail. Normally, a receiver outputs a carrier phase as an observable, which is an integrated value of the number of whole cycles and the fraction of a cycle of a beat wave that arises between the received and receiver-generated carrier waves. If the carrier phase of the k-th frequency signal is expressed as \(\phi_{k}\) (whose unit is cycles), it is modeled as  
\[\phi_{k}=\lambda^{-1}\|\textbf{r}_{t}^{k}-\textbf{r}_{u}\|+\lambda^{-1}c( \delta t-\delta T)-N^{k}+\varepsilon_{\phi}^{k} \tag{1}\]  
where \(\lambda\) is the wavelength of the k-th frequency signal, \(\textbf{r}_{t}^{k}\) is the position of the pseudolite antenna k (which is known), \(\textbf{r}_{u}\) is the receiver position to be determined, c is the speed of light, \(\delta t\) is the clock bias of the receiver, \(\delta T\) is the clock bias of the homogeneous transmitting base station, \(N^{k}\) is the integer ambiguity (which is an integer value that consists of the number of wave fronts existing between the homogeneous transmitting base station and receiver antenna and an integrated value of cycles of the beat wave mentioned above), and \(\varepsilon_{\phi}^{k}\) is the observation error of the carrier phase. This kind of equation modeling the observable by using the geometric relation between the receiver and the homogeneous transmitting base station is called \"observation equation\". Since the signals transmitted from the antenna are synchronized, combining the carrier phase observation measurement Equation (1), we can get the observation equations of the GPS L1 and BeiDou B1 signals from the same antenna as:  
\[\left\{ \begin{array}{l}\phi_{L_{1}}={\lambda_{L_{1}}}^{-1}\|\textbf{r}_{t}^{ 1}-\textbf{r}_{u}\|+{\lambda_{L_{1}}}^{-1}c(\delta t-\delta T)-N_{L_{1}}+ \varepsilon_{\phi_{L_{1}}}\\ \phi_{B_{1}}={\lambda_{B_{1}}}^{-1}\|\textbf{r}_{t}^{2}-\textbf{r}_{u}\|+{ \lambda_{B_{1}}}^{-1}c(\delta t-\delta T)-N_{B_{1}}+\varepsilon_{\phi_{L_{1}}} \end{array} \right. \tag{2}\]  
where \(\phi_{L_{1}}\) is the carrier phase of the GPS L1 signal, \(\phi_{B_{1}}\) is the carrier phase of the BeiDou B1 signal, the unit of the carrier phase observation equation above is the cycle. \(\lambda_{L_{1}}\) is the wavelength of the GPS L1 signal, \(\lambda_{B_{1}}\) is the wavelength of the BeiDou B1 signal, \(N_{L_{1}}\) is the integer ambiguity of the GPS L1 signal, \(N_{B_{1}}\) is the integer ambiguity of the BeiDou B1 signal, \(\varepsilon_{\phi_{L_{1}}}\) and \(\varepsilon_{\phi_{L_{1}}}\) are the noise errors of the two frequency signals. Figure 2: Transmission base station working principle. The system of equations is converted to the distance equation program. Multiply both sides of the equation by the corresponding wavelengths as  
\[\left\{ \begin{array}{l}\lambda_{L_{1}}\phi_{L_{1}}=\|\mathbf{r}_{t}^{1}-\mathbf{ r}_{u}\|+c(\delta t-\delta T)-\lambda_{L_{1}}N_{L_{1}}+\lambda_{L_{1}}\varepsilon_{ \phi_{L_{1}}}\\ \lambda_{B_{1}}\phi_{B_{1}}=\|\mathbf{r}_{t}^{2}-\mathbf{r}_{u}\|+c(\delta t- \delta T)-\lambda_{B_{1}}N_{B_{1}}+\lambda_{B_{1}}\varepsilon_{\phi_{L_{1}}} \end{array} \right. \tag{3}\]  
Let \(\Phi_{m}=\lambda_{m}\phi_{m}\), then the above equation can be expressed as  
\[\left\{ \begin{array}{l}\Phi_{L_{1}}=\|\mathbf{r}_{t}^{1}-\mathbf{r}_{u}\|+c (\delta t-\delta T)-\lambda_{L_{1}}N_{L_{1}}+\xi_{\phi_{L_{1}}}\\ \Phi_{B_{1}}=\|\mathbf{r}_{t}^{2}-\mathbf{r}_{u}\|+c(\delta t-\delta T)- \lambda_{B_{1}}N_{B_{1}}+\xi_{\phi_{L_{1}}}\end{array} \right. \tag{4}\]  
where \(\xi_{\phi_{L_{1}}}=\lambda_{L_{1}}\varepsilon_{\phi_{L_{1}}}\), \(\xi_{\phi_{B_{1}}}=\lambda_{B_{1}}\varepsilon_{\phi_{L_{1}}}\). As above, we obtain the distance equations based on the carrier of the two frequency signals.