# Impacts of GPS Spoofing on Path Planning of Unmanned Surface Ships
## 3 GPS Attack Designs and Spoofing Analysis
### Spoofing Analysis  
Next, we analyze how the above GPS spoofing influences the result of the path planning of unmanned ships based on the APF method in Section 2. As we see in the above subsections, GPS signals received by the GPS receiver of an unmanned ship is determined  
Figure 8: Perspective of attackers and receivers.  
Figure 7: The architecture of a receiver-spoofer [41].  
by the attacker, conducting a GPS spoofing attack on the unmanned ship. We take an obstacle as an example to explain the influence of GPS deception on the path planning results of the APF method. Let \(X=(x,y)\) denote the physical position of the unmanned ship, \(X_{1}=(x_{1},y_{1})\) denote the obstacle coordinates, \(X_{g}=(x_{g},y_{g})\) denote the goal coordinate, \(\xi\) denote the positive scaling factor for attractive potential, and \(\eta\) denote the positive scaling factor for repulsive potential. The GPS receiver of the unmanned ship receives the GPS data of the ship, i.e., \(X^{\prime}\)= \(X+\delta=(x+\delta_{x},y+\delta_{y})\). Additionally, \(\delta\) is the position offset added by attackers during GPS spoofing. In conclusion, the Equations (2)-(10) of the artificial potential field method in Section 2 is changed into the following Equations (29)-(34). In the case of GPS spoofing, the attractive potential field \(U_{att}(X^{\prime})\) is rewritten as:  
\[U_{att}(X^{\prime})=\frac{1}{2}\xi(X+\delta-X_{g})^{2}, \tag{29}\]  
\[U_{att}(X^{\prime})=\frac{1}{2}\xi\Big{[}(x+\delta_{x}-x_{g})^{2}+(y+\delta_{ y}-y_{g})^{2}\Big{]}. \tag{30}\]  
Next, we analyze the change of the repulsive potential field in the case of GPS spoofing. When the distance between the OS and the obstacle is less than or equal to the influence radius (\(\rho_{0}\)) of the repulsion force generated by the obstacle, the repulsive potential field of the obstacle can be written as:  
\[U_{rep_{1}}(X^{\prime})=\frac{1}{2}\eta\left(\frac{1}{\sqrt{(x+\delta_{x}-x_{ 1})^{2}+(y+\delta_{y}-y_{1})^{2}}}-\frac{1}{\rho_{0}}\right)^{2}. \tag{31}\]  
When the distance between the OS and the obstacle exceeds the radius of influence (\(\rho_{0}\)) of the repulsion force generated by the obstacle, we think that the repulsive potential field of the obstacle is 0. We superimpose attractive potential field and repulsive potential field to form artificial potential field \(U(X^{\prime})\), and the equation is shown as follows.  
\[U(X^{\prime})=U_{att}(X^{\prime})+U_{rep_{1}}(X^{\prime}). \tag{32}\]  
As we know, the path planning of the artificial potential field method is to move forward along the negative gradient direction from the current position until the gradient is 0. The derivatives of the attractive potential function and repulsive potential function are attractive force function and repulsive force function, which can be written as:  
\[F_{att}(X^{\prime})=-\
abla U_{att}(X^{\prime}), \tag{33}\]  
\[F_{rep_{1}}(X^{\prime})=-\
abla U_{rep_{1}}(X^{\prime}). \tag{34}\]  
According to Equation (34), assuming that \(x\) and \(y\) are from 0 to 10, the step is 0.1, \(\delta\) is from 0 to 10, the step is 0.1, the coordinate of goal \(X_{g}\) = (10,10), the coordinate of obstacle \(X_{o1}\) = (4,8), the attraction gain \(\xi\) = 50, the repulsive gain \(\eta\) = 15, and the influence distance of obstacles \(\rho_{0}\) = 0.4, we can get the curve of the influence of \(\delta\) change rate on \(U_{att}\), as shown in Figure 9. Similarly, according to Equation (35), the curve of delta change rate on \(U_{rep_{1}}\) can be obtained, as shown in Figure 10. The influence of \(\delta\) change rate on the resultant force of attraction and repulsion is shown in Figure 11.