# Towards the Detection of GPS Spoofing Attacks against Drones by Analyzing Camera's Video Stream
## 4 Analysis and Simulation
### Influence of Speed  
The drone's speed affects the efficacy of the test window and how quickly it needs to be changed. As the drone's speed increases, its perspective widens, and the correlation between consecutive frames decreases accordingly. To isolate the problem, a constant velocity is used in this experiment.  
Experimental Setup: In this experiment, we used three different altitudes (50, 100, and 200 m) and one location in Manhattan (Figure 4). For each altitude, three different speeds and a constant velocity were used. One frame was collected per second. As mentioned in Section 4.2, the simulation ended immediately after the drone was out of the scope of the first image.  
Results and Conclusions: Tables 4-6 present the results for altitudes of 50, 100, and 200 m. Several interesting insights can be derived from the results: (1) RMSE: as the speed increases, the RMSE value decreases; (2) \(R^{2}\): while this tends to be a value of one, it can be seen that the \(R^{2}\) value decreases at \(10^{-3}\); (3) MEA: when the value is close to zero we get a better match to reality; and (4) by examining each speed separately, at higher altitudes the error associated with high speeds decreases. We observe that the best speed for this terrain is 10 m/s, where it can be seen that the values of the RMSE, \(R^{2}\), and MEA are the lowest for all altitudes.  
The results presented in Section 4.2 demonstrate that the proposed method provides good results in urban environments, so in this section, we examine only unsettled open/flat areas.  
Experimental Setup: In this experiment, the drone flew over an unsettled open/flat area at the lake in Central Park (Figure 7). Using a histogram normalized for the color scale, the flatter the histogram, the more stable the image changes are. As the starting point, we used the worst-case scenario in which the drone hovers over the lake at three different altitudes (50, 100, and 200 m; see Figure 8) at speeds of 5, 10, and 20 m/s. As mentioned in Section 4.2, the simulation ended immediately after the drone was out of the scope of the first image.  
Results and Conclusions: Tables 7-9 present the results for this terrain for altitudes of 50, 100, and 200 m. Based on the results obtained, we calculated the RMSE, \(R^{2}\), and MEA. The results obtained for the three metrics indicate that none of the metrics were suitable for evaluating the influence of the terrain on our method's performance. However, several interesting insights can be derived from the results: (1) RMSE: the RMSE value is very high (over 180) at all speeds and altitudes; (2) \(R^{2}\): the value obtained for this metric is never close to one; therefore the error keeps increasing; and (3) MEA: the MEA value is never close to zero. Based on the results of this experiment, we conclude that our solution is not effective when applied on unsettled open/flat terrains; it is more suitable for urban terrain.  
Figure 8: Terrain test for the Central Park Lake location (location #2) from altitudes of: 200 m (in the **left** image), 100 m (in the **center** image), 50 m (in the **right** image).  
Figure 7: The two types of terrain from an altitude of 1.2 km and histogram graphs: Manhattan as urban (**top**) and Central Park as unsettled open/flat area (**bottom**).