# Opportunistic In-Flight INS Alignment Using LEO Satellites and a Rotatory IMU Platform
## 3 LEO/INS Alignment Architecture
### Observability Analysis and IMU Rotation Simulation  
The importance of observability analysis was a clear fact because of its direct effect on the state estimation, and in the second layer it could have influence on the error correction and final results of the navigation system. In the time-variant systems, the observability rank could be measured by the Grammian matrix using the piece-wise constant system (PWCS) method. However, in the systems that have short interval variations, the PWCS method proved that by calculating the stripped observability matrix (SOM), the rank of observability could be defined [35]. For the discussed system included (\(F\), \(H\)), the observability matrix in the interval \((t_{i},t_{i+1})\) was calculated as Equation (28) [36]. \[Q_{i}=\left[(H)^{T},\,(HF(t_{i}))^{T},\,\Big{(}HF^{2}(t_{i})\Big{)}^{T}, \ldots,\,\Big{(}HF^{n-1}(t_{i})\Big{)}^{T}\right]^{T}, \tag{28}\]  
From the PWCS method, the SOM matrix will be obtained as Equation (29). \[SOM=\left[ \begin{array}{cccc}Q_{1}^{T}&Q_{2}^{T}&\cdots&Q_{i}^{T}\end{array}  \right]^{T}, \tag{29}\]  
The rank of the SOM matrix will determine the rank of observability in the error models. Before making our SOM matrix, the rotation algorithm should be determined, and each i-axis rotation showed one time interval. The rotation algorithm is shown in Figure 3, and Table 1 defines each step. Each rotation step was specialized with codenumber 1. Each step of the Figure 3 can be considered as an interval in the SOM matrix. The rank of observability was calculated before the rotation with the Grammian matrix in a non-rotational IMU platform. The rank of observability for the error model was shown as \(\left[ \begin{array}{cccc}H&HF&\cdots&HF^{n-1}\end{array} \right]^{T}=10\). However, the result of the SOM matrix after the rotation showed the observability rank of 14, which means that from the 15-state system, 14 states could be observed that demonstrated a great enhancement in comparison with the works done in [15] due to the minimum rotation steps. The presented rotation sequence was based on the optimized dual-axis rotational IMU motion for strapdown INS (SINS) (refer to [37]). As illustrated above, the IMU was rotated around its \(z\) and \(y\) axes. For each rotation, there was a transform matrix, which changed the biases in the body frame. The output of the accelerometer and the gyroscope after performing the mentioned rotations were modeled as Equations (30) and (31), where \(\varepsilon^{b}\) and \(\varepsilon^{q}\) were defined as IMU bias vectors in the body frame and the new IMU frame after the rotation, respectively. As a result of that, \(C_{q}^{b}\) was the transform matrix from the IMU frame to the body frame. \[\varepsilon^{b}=C_{q}^{b}\;\varepsilon^{q}, \tag{30}\]  
\[C_{q}^{b}=\left[ \begin{array}{cc}cos(\psi)&sin(\psi)&0\\ -sin(\psi)&cos(\psi)&0\\ 0&0&1\end{array} \right]\left[ \begin{array}{ccc}cos(\theta)&0&-sin(\theta) \\ 0&1&0\\ sin(\theta)&0&cos(\theta)\end{array} \right]=\left[ \begin{array}{ccc}cos(\psi) cos(\theta)&sin(\psi)&-cos(\psi)sin(\theta)\\ -sin(\psi)cos(\theta)&cos(\psi)&-sin(\psi)sin(\theta)\\ sin(\theta)&0&cos(\theta)\end{array} \right], \tag{31}\]  
The IMU biases were obtained by Equations (32) and (33). \[b_{g}^{b}=\left[ \begin{array}{c}b_{gx}^{q}cos(\psi)cos(\theta)+b_{gx}^{q}sin (\psi)-b_{gz}^{q}cos(\psi)sin(\theta)\\ -b_{gx}^{q}sin(\psi)cos(\theta)+b_{gy}^{q}cos(\psi)-b_{gz}^{q}sin(\psi)sin( \theta)\\ b_{gx}^{q}sin(\theta)+b_{gz}^{q}cos(\theta)\end{array} \right], \tag{32}\]  
\[b_{a}^{b}=\left[ \begin{array}{c}b_{ax}^{q}cos(\psi)cos(\theta)+b_{ay}^{q}sin (\psi)-b_{az}^{q}cos(\psi)sin(\theta)\\ -b_{ax}^{q}sin(\psi)cos(\theta)+b_{ay}^{q}cos(\psi)-b_{az}^{q}sin(\psi)sin( \theta)\\ b_{ax}^{q}sin(\theta)+b_{dz}^{q}cos(\theta)\end{array} \right], \tag{33}\]