# Impacts of GPS Spoofing on Path Planning of Unmanned Surface Ships
## 4 Experiments
### GPS Spoofing Simulation
When the distance between the obstacles and OS is greater than this distance \(\rho_{0}\), the repulsion force is 0. \(\theta_{0}\) is the angle between the line from the position of OS (x) to the goal (\(x_{g}\)) and the x-axis, \(\theta_{1}\) is the angle between the line from the position of OS to the first obstacle (\(x_{o_{1}}\)) and the x-axis, \(\theta_{2}\) is the angle between  
Figure 12:1 The simulation of path planning of APF. Figure 12:2 Comparison of path planning simulation before and after GPS spoofing attack based on APF. the line from the position of OS to the second obstacle (\(x_{o_{2}}\)) and the x-axis. First of all, we calculate the values of \(\theta_{0}\), \(\theta_{1}\), and \(\theta_{2}\) according to the following formulas. Figure 12:3  
Figure 12:4  
Figure 12:5  
We assume that \(F_{att_{x}}\) and \(F_{att_{y}}\) are the components of the attraction of the goal on the OS in the \(x\) and \(y\) directions. We calculate the \(x\) and \(y\)-axis components of the attraction of goal on the OS as follows. Figure 12:6  
Figure 12:7  
\(F_{rep_{1}}\) and \(F_{rep_{2}}\) are the repulsive forces of the first and second obstacles for the OS, respectively. \(F_{rep_{1}}\), \(F_{rep_{3}}\), \(F_{rep_{2}}\) and \(F_{rep_{3}}\) are the components of the repulsive force on the \(x\) and \(y\) axes, respectively. \(F_{sumx}\) and \(F_{sumy}\) are the resultant forces in the \(x\) and \(y\) directions, respectively. \(\theta_{sum}\) is the angle between the resultant force and the \(x\)-axis. Since the distance between OS and the first obstacle is greater than \(\rho_{0}\), the repulsive force of the obstacle on the OS is \(0\). We calculate the repulsive forces of the second obstacle on the OS as follows. Figure 12:8  
Figure 12:9  
Figure 13:0 An APF example. We calculate the components of the repulsive force of the obstacles on the OS in the x and y directions as follows. Figure 13:1 Figure 13:2 Figure 13:3 Figure 13:4  
The resultant forces in the x and y directions are as follows. Figure 13:5 Figure 13:6 Figure 13:7  
We calculate the next position \(p_{next}\) (\(p_{nextx}\), \(p_{nexty}\)) in the path planning of OS as follows. Figure 13:8 Figure 13:9  
According to the above formulas, if the position of OS is \(X=(0,0)\), the next position of OS calculated by the APF algorithm is \(p_{next}=(0.14,0.14)\). If the attackers change the position of OS by the GPS spoofing, we find that the next position of path planning results of OS will be changed, shown in Figure 16:0 By analyzing these data, we can see that the farther the false position is from the physical position, the greater the coordinate change of the next position of OS. To prevent GPS spoofing from being found, the false position needs to be as close to the physical location of OS as possible and changes continuously with time. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**False Position x** & **False Position y** & **Next Position x** & **Next Position y** & **x Offset** & **y Offset** \\ \hline  
\hline \hline \end{tabular}
\end{table} 
Table 2: Data relationship between false positions and next positions of OS.