# In-Motion Coarse Alignment Method Based on Position Loci and Optimal-REQUEST for SINS
## 5 Simulation
This made it difficult to calculate the pitch and roll angles correctly. To overcome the drawbacks of the REQUEST algorithm, the proposed algorithm uses a cost function to adjust the fading memory value adaptively. From Figure 7, we can see that, the value is selected as one at the beginning of the filter. Thus, more parts of the new measurements can be used during the update stage to speed up convergence. With increase in alignment time, a relatively low weight is assigned to the new measurement to ensure that the alignment process is steady. To further verify the superiority of the proposed OP-PL algorithm, we chose a third algorithm for comparison. Based on the obtained simulation results, we chose \(\rho=0.001\) as the fading memory factor in the REQUEST algorithm. Figures 8-10 show the calculation results of the REQUEST, QUEST and the proposed OP-PL algorithm, which are represented by the yellow, green and brown curves, respectively. To better compare the errors among the three algorithms, we list the mean values and root mean square errors of the angle error values in Table 3, and present a box plot which is shown in Figure 11.  
In Figures 8 and 9, the performance of the REQUEST algorithm can be seen to be still poor compared with the QUEST and the proposed OP-PL algorithm. The reason for this situation is that the REQUEST is a suboptimal algorithm, and it is hard to find an appropriate value to keep the algorithm stable. Figure 11 confirms the poor performance of REQUEST, where the three angle errors were obviously larger than for the other two algorithms. The MEANs and RMSEs of the pitch and roll angles, which were calculated by the REQUEST algorithm, were also the worst among the three algorithms. Figure 7: The curve of optimal \(\rho^{*}\). Figure 8: Curves of pitch angle errors. Figure 10: Curves of yaw angle errors. Figure 9: Curves of roll angle errors. Moreover, the OP-PL algorithm retains the merits of the REQUEST algorithm, as it is a time-varying recursive attitude quaternion estimator which preserves the quaternion unit-norm property. Compared with the QUEST algorithm, the OP-PL algorithm has an enhanced ability to reduce the impact of the measurement noise contained in the measurement vectors. From Figures 8-10, we can see that, although the convergence speed of the OP-PL algorithm was the same as that of the QUEST algorithm, the proposed algorithm had higher accuracy and the accuracy of the three angles were all improved. Moreover, as can be seen from Figure 11, although the outliers of the yaw angle calculated by OP-PL were similar to that calculated by the QUEST algorithm, the proposed algorithm was relatively stable, based on the calculation results from the three angles. The main cause of the outliers in the yaw angle was unstable performance from 0 to 50 s. After the algorithm became stable, the advantages of the proposed algorithm were still evident. The pitch angle, roll angle and yaw angle calculated by the OP-PL algorithm were reduced by approximately 51.95%, 53.80% and 63.03%, respectively, compared with the QUEST algorithm. Therefore, the above analyses confirm that the OP-PL algorithm had better alignment accuracy than the comparison algorithms.