| Algorithm 1: Operational process of the switching algorithm | |
| 1: | Initialize the system vehicle speed, attitude and position |
| 2: | for System loop |
| 3: | The system collects relevant experimental data through the data port |
| 4: | Update the system attitude quaternion |
| 5: | if The system is located in the ground environment |
| 6: | The system updates the current position and speed by GNSS |
| 7: | if The system detects the switching flag signal |
| 8: | The system shields the GNSS satellite signal |
| 9: | end if |
| 10: | else The system is located in underground garage environment |
| 11: | The system updates the current position by gyroscope and vehicle speed |
| 12: | if The system is started in underground garage |
| The magnetometer initializes heading of the gyroscope | |
| 13: | end if |
| 14: | end if |
| 15: | end for |