# An Improved RAIM Availability Assessment Method Based on the Characteristic Slope
## Appendix B Distributions of Test Statistic for LSR Algorithm  
The pseudorange residual vector, recorded as \(\omega\), is defined by combining (10) and (11) as follows:  
\[ \begin{array}{ll}\mathbf{\omega}&=\mathbf{Z}-\hat{\mathbf{Z}}=\mathbf{Z}-\mathbf{H}\hat{\mathbf{X}} \\ &=\big{[}\mathbf{I}-\mathbf{H}\big{(}\mathbf{H}^{T}\mathbf{P}\mathbf{H}\big{)}^{-1}\mathbf{H}^{T}\mathbf{P }\big{]}\,\varepsilon\\ \text{Set }\mathbf{S}=\mathbf{P}^{-1}-\mathbf{H}\big{(}\mathbf{H}^{T}\mathbf{P}\mathbf{H}\big{)}^{-1}\mathbf{H} ^{T},\\ &\mathbf{\omega}=\mathbf{\mathrm{SP}}\varepsilon=S_{1}\frac{\varepsilon_{1}}{\sigma_{1 }^{2}}+S_{2}\frac{\varepsilon_{2}}{\sigma_{2}^{2}}+\cdots+S_{K}\frac{ \varepsilon_{K}}{\sigma_{K}^{2}}\end{array}  \tag{12}\]  
where \(S_{i}\) is the \(i\)-th column of \(\mathbf{S}\). The weighted sum of squares for \(\omega\), recorded as \(SSE\), can be calculated with (10)  
\[SSE=\mathbf{\omega}^{T}\mathbf{\mathrm{P}}\mathbf{\omega} \tag{13}\]  
The test statistic \(T\)s for faulty satellite detection in the LSR algorithm is \(SSE\):  
\[T\text{s}=\mathbf{\omega}^{T}\mathbf{\mathrm{P}}\mathbf{\omega} \tag{14}\]  
Under the nominal mode:  
\[T\text{s}\sim\chi^{2}(K-4) \tag{15}\]  
where \(\chi^{2}(v)\) represents a standard \(\chi^{2}\) distribution with the freedom degree of \(v\). Under the single-satellite fault mode:  
\[T\text{s}\sim\chi^{2}(K-4,\lambda) \tag{16}\]  
where \(\chi^{2}(v,\lambda)\) represents non-central \(\chi^{2}\) distribution with the freedom degree of \(v\) and the decentralized parameter of \(\lambda\). \(\lambda\) can be considered as the difference between the mean values of test statistics for nominal and single-satellite fault modes, calculated as follows. With the assumption that the single faulty satellite is \(VS_{m}\) and the measurement bias for \(VS_{m}\) is \(\xi_{b}\), \(\omega\) can be rewritten as follows:  
\[\omega=\omega_{no}+S_{m}\frac{\xi_{b}}{\sigma_{m}^{2}} \tag{17}\]  
In (17), \(\omega_{no}\) represents the pseudorange residual vector with no faulty satellite:  
\[\omega_{no}=\text{S}_{1}\frac{\varepsilon_{1}}{\sigma_{1}^{2}}+\cdots+S_{m-1} \frac{\varepsilon_{m-1}}{\sigma_{m-1}^{2}}+S_{m}\frac{\xi_{m}}{\sigma_{m}^{2}} +S_{m+1}\frac{\varepsilon_{m+1}}{\sigma_{m+1}^{2}}+\cdots+S_{K}\frac{ \varepsilon_{K}}{\sigma_{K}^{2}} \tag{18}\]where \(\xi_{m}\) and \(\xi_{b}\) are respectively the measurement noise and bias for \(VS_{m}\), i.e., \(\varepsilon_{m}=\xi_{m}+\xi_{b}\). Therefore, the mean value of \(Ts\) under the single satellite faulty mode is:  
\[ \begin{array}{rl}\mathrm{E}[\mathrm{Ts}]&=E\big{[}\mathbf{\omega}^{T}P\mathbf{\omega} \big{]}=E\Big{[}\Big{(}\mathbf{\omega}_{no}+\mathbf{S}_{m}\frac{\xi_{b}}{\sigma_{m}^{ 2}}\Big{)}^{T}\mathbf{P}\Big{(}\mathbf{\omega}_{no}+\mathbf{S}_{m}\frac{\xi_{b}}{\sigma_{m} ^{2}}\Big{)}\Big{]}\\ &=E\Big{[}\mathbf{\omega}_{no}^{T}\mathbf{P}\mathbf{\omega}_{no}+\mathbf{\omega}_{no}^{T}\mathbf{P} \Big{(}\mathbf{S}_{m}\frac{\xi_{b}}{\sigma_{m}^{2}}\Big{)}+\Big{(}\mathbf{S}_{m}\frac{ \xi_{b}}{\sigma_{m}^{2}}\Big{)}^{T}\mathbf{P}\mathbf{\omega}_{no}+\Big{(}\mathbf{S}_{m} \frac{\xi_{b}}{\sigma_{m}^{2}}\Big{)}^{T}\mathbf{P}\Big{(}\mathbf{S}_{m}\frac{\xi_{b} }{\sigma_{m}^{2}}\xi_{b}\Big{)}\Big{]}\end{array}  \tag{10}\]  
In (10), \(E\big{[}\mathbf{\omega}_{no}^{T}\mathbf{P}\mathbf{\omega}_{no}\big{]}\) is the mean value of \(Ts\) under the nominal mode and \(E\Big{[}\mathbf{\omega}_{no}^{T}\mathbf{P}\Big{(}\mathbf{S}_{m}\frac{\xi_{b}}{\sigma_{m}^ {2}}\Big{)}\Big{]}=E\Big{[}\Big{(}\mathbf{S}_{m}\frac{\xi_{b}}{\sigma_{m}^{2}} \Big{)}^{T}\mathbf{P}\mathbf{\omega}_{no}\Big{]}=0\). Therefore:  
\[\lambda=E\Bigg{[}\bigg{(}\frac{\xi_{b}}{\sigma_{m}^{2}}\bigg{)}^{2}\mathbf{S}_{m}^ {T}\mathbf{PS}_{m}\Bigg{]} \tag{11}\]  
\(\mathbf{S}_{m}^{T}\mathbf{PS}_{m}\) is the \(m\)-th diagonal element for \(\mathbf{S}^{T}\mathbf{PS}\). Because \(\mathbf{S}^{T}\mathbf{PS}=\mathbf{S}\):  
\[\mathbf{S}_{m}^{T}\mathbf{PS}_{m}=s_{mm} \tag{12}\]  
where \(s_{mm}\) is the diagonal element in the \(m\)-th row of \(S\).