# Enhancing Real-Time Kinematic Relative Positioning for Unmanned Aerial Vehicles
## 4 Proposed Dual Kalman Filter Structure for RTK and Its Rationales
### Dual Kalman Filter Structure  
Once the float integer solutions converge in the KF, the integer solutions tend to continuously pass a ratio test with an escalating ratio value, as shown in Figure 9, except in some cases. One such case is the addition of satellites to the KF, which often causes a ratio test to fail. This subsection discusses the causes of the ratio test failure owing to the newly added satellite and the remedies used in this paper by a dual KF structure. 2.1 Analysis of the Effect of a Newly Risen Satellite on the KF and Integer Ambiguity Resolution in LAMBDA  
During KF-based RTK operations, satellites may rise or fall. When the satellite falls, the corresponding integer ambiguity state is removed in KF, which usually does not cause a problem if several satellites still remain in view. However, a problematic case occurs when the KF includes additional integer ambiguity (AIA) states to incorporate a newly risen satellite or reintroduce satellites previously excluded due to cycle slips. In this case, a so-called ratio test value, \(r\) in Equation (24), could drastically drop below three. \[r=\frac{F(N^{\prime})}{F(N)}=\frac{(\hat{N}-\hat{N}^{\prime})^{T}\mathbf{Q}_{ \tilde{N}}^{-1}(\hat{N}-\hat{N}^{\prime})}{(\hat{N}-\hat{N})^{T}\mathbf{Q}_{\tilde {N}}^{-1}(\hat{N}-\hat{N})} \tag{24}\]  
where \(\hat{N}\) and \(\hat{N}^{\prime}\) are the best and second-best integer vector solutions resulting from LAMBDA. The reason for the low \(r\) is that the AIA states are introduced with a roughly predicted initial value with a large covariance whereas the current integer ambiguity (CIA) states that have been estimated in KF have accurate means with a very small state covariance. The large covariance gap, typically more than several thousand times, between the AIA and CIA states results in a KF gain, \(K\), that places small weights on KF innovations associated with the AIA states. However, the KF gain associated with the CIA states was only slightly affected by the additional satellites. In particular, this characteristic of \(K\) prevents the AIA states from being effectively updated by KF innovations, and the updated AIA state float solution would have a similar bias to the roughly estimated initial AIA value. This bias subsequently induces an integer bias in vectors of the best and second-best solutions in LAMBDA. Figure 9: A Kalman filter-based RTK ratio test result with a trend of increasing ratio values. This KF gain characteristic is best observed by numerical inspections rather than algebraic derivations. A typical KF gain characteristic before and after the inclusion of the AIA state is shown in Figure 10. As shown in Figure 10, the KF gain magnitudes have similar values in two consecutive epochs. The index of the AIA state is 42, and its KF gain magnitude is more than 10 times smaller than most of the gain magnitudes of the other integer states. The integer states with indices 4-6 also have very small gain magnitudes, but these are not of concern as they are already very small before the AIA state is included. Here, it is interesting to note that the resolved integers for the CIA are usually correct even when \(r\) is less than three, and the resolved integer is incorrect for the AIA, whose characteristics are used to develop the proposed dual KF structure. To see these characteristics more clearly, let us first consider the following cost function used in LAMBDA:  
\[F(\mathbf{z}) = (\tilde{\mathbf{z}}-\mathbf{z})^{T}\mathbf{D}^{-1}(\tilde{\mathbf{z}}-\mathbf{z}) \tag{25}\] \[= \frac{(\tilde{\mathbf{z}}_{1}-z_{1})^{2}}{d_{1}}+\frac{(\tilde{\mathbf{z }}_{2}-z_{2})^{2}}{d_{2}}+\cdots+\frac{(\tilde{\mathbf{z}}_{n}-z_{n})^{2}}{d_{n}}\]  
where  
\[\tilde{\mathbf{z}} = \mathbf{Z}^{T}\tilde{\mathbf{N}} \tag{26}\] \[\mathbf{Q}_{z} = \mathbf{Z}^{T}\mathbf{Q}_{N}\mathbf{Z}=\mathbf{L}^{T}\mathbf{D}\mathbf{L}. \tag{27}\]  
In the above equations, \(\mathbf{Z}\) is a \(\mathbf{Z}\) transformation matrix that decorrelates the original integer ambiguity of \(\mathbf{N}\).