# Enhancing Real-Time Kinematic Relative Positioning for Unmanned Aerial Vehicles
## 4 Proposed Dual Kalman Filter Structure for RTK and Its Rationales
### Conventional Kalman Filter Based RTK Approach
\begin{split}\mathbf{D}_{N}=\left(\begin{array}{cccc}\mathbf{D}_{NG \text{PS}}&&&\\ &\mathbf{D}_{NG\text{GAL}}&&\\ &&\mathbf{D}_{N\text{BDS}}\end{array}\right)\!.\end{split}  \tag{19}\]  
For example, if the integer ambiguity state of a pivot satellite in the GPS is located at the first element of the single differenced integer vector, \(\mathbf{D}_{NG\text{PS}}\) is defined as below. \[ \begin{split}\mathbf{D}_{NG\text{PS}}=\left(\begin{array}{cccccc}-1& 1&0&\cdots&0\\ -1&0&1&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ -1&0&0&\cdots&1\end{array}\right)\!.\end{split}  \tag{20}\]  
Finally, the KF updates the state and corresponding covariance matrix based on the KF gain with received measurements \(\mathbf{y}_{k}\). To avoid numerical instability of the KF process, the Joseph form of the covariance update equation in [33] is used. \[ \begin{split}\hat{\mathbf{x}}_{ijk}^{+}=\hat{\mathbf{x}}_{ijk}^{-}+\mathbf{K} _{k}\Big{(}\mathbf{y}_{k}-\mathbf{H}\hat{\mathbf{x}}_{ijk}^{-}\Big{)}\end{split}  \tag{21}\]  
From Equation (21), the estimated states and covariance matrix are re-transformed to derive a float solution of double differenced integer ambiguities. \[ \begin{split}\hat{\mathbf{x}}_{ijk}^{+\prime}=\mathbf{D}_{k}\hat{\mathbf{x}} _{ijk}^{+}=\left[\hat{\mathbf{\eta}}_{ijk}^{+},\hat{\mathbf{\eta}}_{ijk}^{+}\mathbf{N}_{ ijk}^{+}\right]^{T}\\ \mathbf{P}_{k}^{+\prime}=\mathbf{D}_{s}\mathbf{P}_{k}^{+}\mathbf{D}_{s}^{T}=\left( \begin{array}{cc}\mathbf{Q}_{R(6\times 6)}&\mathbf{Q}_{\hat{N}R}\\ \mathbf{Q}_{\hat{N}}&\mathbf{Q}_{\hat{N}}\end{array}\right)\end{split}  \tag{22}\]  
where  
\[ \begin{split}\mathbf{D}_{s}=\left(\begin{array}{cc}\mathbf{I}_{6\times 6 }&\\ &\mathbf{D}_{N}\end{array}\right)\!.\end{split} \]  
In this equation, the covariance matrix associated with the float solution, \(\hat{\mathbf{N}}_{ijk}^{+}\), is denoted separately as \(\mathbf{Q}_{\hat{N}}\), while \(\mathbf{Q}_{R(6\times 6)}\) represents the covariance matrix for the updated relative position and velocity vector. Then, the LAMBDA algorithm [10] is applied to compute the so-called fixed integer solutions, \(\hat{\mathbf{N}}\), from the float solution and its covariance matrix. This fixed integer solution undergoes a validation process via a well-known ratio test. Employing the widely adopted criteria, if the ratio value exceeds the threshold of three, the final fixed relative position, \(\tilde{\mathbf{r}}_{ij}\), and velocity vector, \(\tilde{\mathbf{v}}_{ij}\), are calculated as follows:  
\[\left( \begin{array}{c}\tilde{\mathbf{r}}_{ij}\\ \tilde{\mathbf{v}}_{ij}\end{array} \right)=\left( \begin{array}{c}\hat{\mathbf{r}}_{ij,k}^{+}\\ \tilde{\mathbf{v}}_{ijk}^{+}\end{array} \right)-\mathbf{Q}_{R\tilde{N}}\mathbf{Q}_{\tilde{N} }^{-1}(\tilde{N}_{ijk}^{+}-\tilde{N}). \tag{23}\]  
when the ratio test was not passed, which means the ratio value did not exceed the threshold of 3, the float solution, \(\hat{\mathbf{r}}_{ij,k}^{+}\), was used instead of the fixed solution, \(\tilde{\mathbf{r}}_{ij}\).