# In-Motion Coarse Alignment Method Based on Position Loci and Optimal-REQUEST for SINS
## 4 Attitude Determination Using the Optimal-REQUEST Algorithm
### Stochastic Models  
To deduce the error models of the proposed OP-PL algorithm accurately, we assume that the reference vector \(\mathbf{r}_{k+1}\) is error-free and that the measurement vector \(\mathbf{b}_{k+1}\) is corrupted by the noisy vector \(\delta\mathbf{b}_{k+1}\).  
\[\mathbf{b}_{k+1}=\mathrm{A}_{k+1}\mathbf{r}_{k+1}+\delta\mathbf{b}_{k+1} \tag{36}\]  
Define the following noise matrix:  
\[\mathrm{V}_{k+1}=\begin{bmatrix}\mathrm{S}_{b}-\sigma_{b}\mathrm{I}_{3}& \mathrm{z}_{b}\\ \mathrm{z}_{b}^{\mathrm{T}}&\sigma_{b}\end{bmatrix} \tag{37}\]  
where the parameters in Equation (37) are defined as:  
\[\mathrm{B}_{b}\triangleq\sum_{i=1}^{n}a_{i}\delta\mathbf{b}_{k+1}(\mathbf{r }_{k+1})^{\mathrm{T}},\,\mathrm{S}_{b}\triangleq\mathrm{B}_{b}+\mathrm{B}_{b }^{\mathrm{T}} \tag{38}\]  
\[\mathrm{z}_{b}\triangleq\sum_{i=1}^{n}a_{i}\delta\mathbf{b}_{k+1}\times \mathbf{r}_{k+1},\,\sigma_{b}\triangleq tr(\mathrm{B}_{b}) \tag{39}\]  
It is worth noting that \(\mathrm{V}_{k+1}\) is made up of \(\delta\mathbf{b}_{k+1}\) and \(\mathbf{r}_{k+1}\), and \(\delta\mathbf{b}_{k+1}\) is random. Thus, we conclude that \(\mathrm{V}_{k+1}\) is also random. The linear relation of \(\mathrm{V}_{k+1}\) in \(\delta\mathbf{b}_{k+1}\) is used to deduce a stochastic model for \(\mathrm{V}_{k+1}\) and \(\delta\mathbf{b}_{k+1}\). The relationship between \(\delta\mathrm{K}_{k+1}\) and \(\mathrm{V}_{k+1}\) is given by:  
\[\delta\mathrm{K}_{k+1}=\delta\mathrm{K}_{k+1}^{o}+\mathrm{V}_{k+1} \tag{40}\]  
where \(\delta\mathrm{K}_{k+1}^{o}\) denotes the error-free matrix.  
The mean and the covariance of \(\delta\mathbf{b}_{k}\) are constructed as follows:  
\[E[\delta\mathbf{b}_{k}]=0 \tag{41}\]  
\[E\Big{[}\delta\mathbf{b}_{k}\delta\mathbf{b}_{k+i}^{\mathrm{T}}\Big{]}=\mu_{ k}(\mathrm{I}_{3}-\mathrm{b}_{k}\mathrm{b}_{k+i}^{\mathrm{T}})\delta_{k,k+i} \tag{42}\]  
where \(\delta_{k,k+i}\) represents the Kronecker delta function and \(\mu_{k}\) represents the variance of the component of \(\delta\mathbf{b}_{k}\). It is obvious that \(\delta\mathbf{b}_{k}\) is white noise with zero-mean. Thus, \(\mathrm{V}_{k}\) also has the characteristics of zero-mean white noise, namely,  
\[E\Big{[}\mathrm{V}_{k}\mathrm{V}_{k+i}^{\mathrm{T}}\Big{]}=0 \tag{43}\]  
where \(i\
eq 0\). To further derive the uncertainty of the matrix, we introduce a special form of uncertainty, namely \(\mathrm{P}_{xx}\). The proof of \(\mathrm{P}_{xx}\) is shown in Appendix A.  
The \(\mathrm{P}\)-matrix of \(\mathrm{V}_{k}\) is given by:  
\[\Re_{k}=E\Big{[}\mathrm{V}_{k}\mathrm{V}_{k}^{\mathrm{T}}\Big{]}=\begin{bmatrix} \Re_{11}&\Re_{12}\\ \Re_{21}&\Re_{22}\end{bmatrix} \tag{44}\]The calculation formulae of each element in the matrix are shown below and the detailed derivation process is shown in [23].  
\[\Re_{11}=\frac{\mu_{k}}{n_{k}}\sum_{i=1}^{n_{k}}\Big{[}3-(r_{i}^{\rm T}b_{i})^{2} \Big{]}\text{I}_{3}+(b_{i}^{\rm T}r_{i})(b_{i}r_{i}^{\rm T}+r_{i}b_{i}^{\rm T})+(r _{i}\times)(b_{i}b_{i}^{\rm T})(r_{i}\times)^{\rm T} \tag{45}\]  
\[\Re_{12}=0 \tag{46}\]  
\[\Re_{21}=0^{\rm T} \tag{47}\]  
\[\Re_{22}=\frac{2\mu_{k}}{n_{k}} \tag{48}\]  
where \(\mu_{k}\) is the variance for all the \(n_{k}\) simultaneous observations calculated at time \(t_{k}\).