## 2 Algorithm
### Kalman Filter  
The ambiguities between the epochs have close ties, so that the parameter estimation is usually carried out by using EKF in DD carrier phase positioning. Once the ambiguities are fixed correctly, the high-precision coordinate vector can be obtained. Although the LSE (least square estimation) is widely applied in the outdoor DGPS [29], we only use DPL for static initialization to obtain the outline coordinates. Here, the DD carrier phase positioning is taken as an example.  
It can be considered that the coordinates remain the same because the rover station is a state of low dynamic or static in indoor positioning. The transition matrix is \(I\) and the covariance matrix of the system process noise is \(O\), but the measurement noise exists. The observation and the state model are as follows:  
\[\begin{array}{l}X_{k}=\Phi_{k-1}X_{k-1}+\omega_{k-1}\\ Z_{k}=\mathrm{H}_{k}X_{k}+v_{k}\end{array} \tag{10}\]  
where \(k\) is the current epoch; \(X\) represents the state vector, including the coordinate vector of the rover station and the ambiguities, that is, \([\mathbf{r}\ \
abla\Delta N_{\mathbf{q}\cdot\mathbf{q}}]^{\intercal}\); \(q\) depends on the number of DD observations. If the number of satellites is five, the corresponding \(q\) equals four; \(\Phi\) is the transition matrix \(I\); \(\omega\) is the dynamic process noise of the system; \(\mathbf{Z}\) is a measurement vector after linearization; H is a design matrix \([I_{r}\ \gamma]\); and \(v\) indicates the measurement noise. If the dynamic process noise and the measurement  
Figure 2: The process of fixing ambiguity by LAMBDA ([PERSON], 1995).  
noise of the system are Gaussian white noise, then the parameters have the following statistical characteristics:  
\[\begin{array}{l}E(\omega_{k})=0,\qquad Cov(\omega_{k},\omega_{k})=Q_{k}\\ E(v_{k})=0,\qquad Cov(v_{k},v_{k})=R_{k}\\ Cov(\omega_{k},v_{k})=0\end{array} \tag{11}\]  
After the initial coordinate is obtained, the corresponding initial state parameter \(\mathbf{X_{0}}\) and its variance covariance matrix \(P_{0}\) can be given. The basic formula of EKF follows:  
\[\begin{array}{l}K_{k}=P_{k,k-1}H_{k}^{T}\left(H_{k}P_{k,k-1}H_{k}^{T}+R_{k} \right)^{-1}\\ P_{k,k-1}=\Phi_{k-1}P_{k-1}\Phi_{k-1}^{T}+Q_{k-1},P_{k}=(I-K_{k}H_{k})P_{k,k-1 }\\ X_{kk-1}=\Phi_{k-1}X_{k-1},X_{k}=X_{k,k-1}+K_{k}V_{k}\\ V_{k}=Z_{k}-H_{k}X_{k,k-1}\end{array} \tag{12}\]  
where \(\mathbf{K_{k}}\) is the Kalman gain matrix, and \(\mathbf{V_{k}}\) is the residual between the observations and predictions; \(\mathbf{X_{k,k-1}}\) is the predictive value, and \(\mathbf{P_{k,k-1}}\) is the predictive variance matrix.  
When positioning, the iterative EKF is usually used to weaken the linearization error. The threshold of iteration is judged according to the residuals of the observations or the number of iterations is given directly. In order to avoid the problem of divergence caused by the imprecise noise of a given motion model during the Kalman filtering, the weight can be dynamically adjusted according to the residual matrix to achieve the robust Kalman filter [30].  
As long as the pseudolites do not lose the lock, the positioning precision at the centimeter level in the dynamic measurement can be obtained. The cycle slips (CS) can be detected by LLI (loss of lock indicator) in the input measurement data. In order to avoid the wrong CS fix, if the CSs are frequent, or the signal is interrupted, the initial coordinate value can be searched again through the above algorithm, and the search space can be established on the basis of the interrupt value. For the sake of convenience, the improved algorithm is named DAFV-LAMBDA.