# Research on Airspace Conflict Detection Method Based on Spherical Discrete Grid Representation
## 5 Simulation Experiment  
In a work area with boundary longitude and latitude coordinates: (108.10\({}^{\circ}\) E, 31.73\({}^{\circ}\) N), (114.05\({}^{\circ}\) E, 39.10\({}^{\circ}\) N), (118.85\({}^{\circ}\) E, 31.28\({}^{\circ}\) N), (113.14\({}^{\circ}\) E, 24.15\({}^{\circ}\) N), set 100 simulated airspace and routes as required to verify the feasibility of airspace conflict algorithm. Computer parameters for conducting simulation experiments: CPU:intel i5-10200H; Graphics card: GTX 3060 Laptop GPU; Memory: 16.0 GB; Running environment: Python 3.8 environment.  
(1) Workspace and AR  
According to the airspace boundary coordinates, the airspace occupation grid is determined, and the airspace number, priority, occupation time, altitude and other information are assigned to the grid. The airspace is entered in priority order, numbered from 001 to 100, and the routes occupancy grid is assigned a value of 5, so that the grid is occupied, and each airspace is surrounded by a layer for grid representation, as shown in Figure 13.  
The airspace coordinates are entered in the Geographic Information System (GIS), and the AR is displayed simultaneously, as shown in Figure 14.  
Figure 13: Routes and airspaces simulation diagram.  
(2) Perform airspace 3D CD  
Run the CD algorithm based on matrix Hadamard product operation, and carry out the CD according to the time, height and range attributes of the airspace in order to verify the feasibility of the algorithm. As shown in Figure 15.  
(3) Simulation conclusion and analysis  
According to the visualization simulation results, the airspace conflict point location and the corresponding airspace number of this conflict point location can be accurately derived. By comparing with the airspace delineated by GIS, the AG based on a spherical rhombus of the positive icosahedron is a rhombic grid, and there is some redundancy in the enclosing layers of the AG compared with the specified safety interval, but the airspace can still be accurately represented after the visualization of the rectangular grid to ensure the safety of CD. It is shown that the black-box algorithm is feasible.  
Figure 14: GIS simulation diagram.  
Figure 15: CD result.  
Under the same experimental simulation conditions, using the Python language written by the traditional CD algorithm for comparison experiments. The collision detection time increases with the increase of the number of airspaces. Compared with the traditional algorithm, this algorithm is faster and more efficient.  
When the number of airspace is 100, there are 88 airspace in conflict with other airspace, total of 120 conflict points. When using matrix detection algorithm for conflict detection, the detection time is 0.00288 s when the number of airspace is 10, and 0.20710 s when the number of airspace is 100; Using traditional detection algorithms for comparison, the detection time is 0.00287 s when the number of airspace is 10, and 0.27987 s when the number of airspace is 100. The amount of operations is \(1/2(n^{2}+n)\), the time complexity of the algorithm is \(O(n^{2})\), and the CD between hundreds of airspace is completed in seconds. As shown in Figure 16:  
The results show that the CD algorithm using the matrix Hadamard product operation can fully utilize the computer's GPU acceleration performance and improve the algorithm operation efficiency.  
The implementation parameters of the algorithm are longitude and latitude coordinates of airspace, occupation height information of airspace, time information, and the custom sequence number of airspace.