## 4 Simulation Analysis
### Algorithm Comparison  
In this section, we focus on the comparison of the INS+LEO2-satellite alternate switching algorithm between the same orbit and the adjacent orbit. We compare the INS+LEO2-satellite, the INS+MEO2-satellite and the INS+ inclined geo synchronous orbit (IGSO) 2-satellite switching algorithm. We also use the standard INS+LEO2-satellite as a reference and simulate them together. For ease of representation, we abbreviate the algorithm based on the same orbit as SO, and the algorithm based on adjacent orbits as AO.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Error Index** & **Algorithm** & **Mean** & **Std** \\ \hline Longitude (\({}^{\circ}\)) & INS+LEO2 5 s/Adjacent orbits surface & \(-0.6539\times 10^{-5}\) & \(5.6238\times 10^{-5}\) \\ \hline  & INS+LEO2 10 s/Adjacent orbits surface & \(-0.8937\times 10^{-5}\) & \(7.9074\times 10^{-5}\) \\ \hline  & INS+LEO2 30 s/Adjacent orbits surface & \(2.8691\times 10^{-5}\) & \(13.7119\times 10^{-5}\) \\ \hline  & INS+LEO2 60 s/Adjacent orbits surface & \(5.1428\times 10^{-5}\) & \(19.7866\times 10^{-5}\) \\ \hline Latitude (\({}^{\circ}\)) & INS+LEO2 5 s/Adjacent orbits surface & \(-0.0539\times 10^{-4}\) & \(4.4523\times 10^{-5}\) \\ \hline  & INS+LEO2 10 s/Adjacent orbits surface & \(-0.1351\times 10^{-4}\) & \(6.0644\times 10^{-5}\) \\ \hline  & INS+LEO2 30 s/Adjacent orbits surface & \(-0.8194\times 10^{-4}\) & \(10.3322\times 10^{-5}\) \\ \hline  & INS+LEO2 60 s/Adjacent orbits surface & \(-1.8018\times 10^{-4}\) & \(14.9197\times 10^{-5}\) \\ \hline Altitude (m) & INS+LEO2 5 s/Adjacent orbits surface & \(-0.0543\) & \(0.5229\) \\ \hline  & INS+LEO2 10 s/Adjacent orbits surface & \(0.4595\) & \(1.8593\) \\ \hline  & INS+LEO2 30 s/Adjacent orbits surface & \(0.8353\) & \(2.7946\) \\ \hline  & INS+LEO2 60 s/Adjacent orbits surface & \(0.8935\) & \(3.9934\) \\ \hline \hline \end{tabular}
\end{table}
Table 5: The trajectory error statistics.  
3.1 Comparison of INS+LEO2-Satellite Alternate Switching Ranging Algorithm Navigation and Positioning in the Same Orbit and Adjacent Orbits  
We simulate and compare the INS+LEO2 alternate switching ranging algorithm in the same orbit and adjacent orbits, with the simulation results shown in Figure 6.  
Figure 6: Navigation and positioning comparison curve of the INS+LEO2-satellite alternate switching ranging algorithm in the same orbit and adjacent orbits.  
Figure 6 shows that the position, velocity, attitude and final trajectory performance of the switching algorithm based on adjacent orbits are generally better than the switching algorithm based on the same orbits. To quantitatively analyze the algorithms' pros and cons under the same orbit and adjacent orbits, we calculated the percentage of improvement of the adjacent orbit's algorithm relative to the same orbit's algorithm in terms of mean and standard deviation. The calculation formula is:  
\[\text{Imp}=\frac{|Value_{i\_AO}|-|Value_{i\_SO}|}{|Value_{i\_SO}|}\times 100 \%\quad(Value=Mean,Std;i=Longitude,Latitude,Altitude) \tag{38}\]  
For example, when the switching time is 5 s, \(Value=Mean\), and \(i\) = \(Longitude\), according to formula (38) we can obtained \(\text{Imp}=\frac{\left\lfloor-1.1203*10^{-5}\right\rfloor-\left\lfloor-0.65 39*10^{-5}\right\rfloor}{\left\lfloor-1.1203*10^{-5}\right\rfloor}\times 100 \%=41.63\%\), other calculation scenarios can be deduced by analogy. The complete calculation results are shown in Figure 7.  
Figure 7 shows that in terms of the longitude, latitude and altitude error, the mean improvement of the algorithm based on adjacent orbits is very obvious compared to the same orbits, and the standard deviation is more concentrated than the same orbits. These results show that the switching algorithm based on adjacent orbits is more robust and reliable, and is more suitable for real-time navigation and positioning requirements in challenging environments.