# Research on Airspace Conflict Detection Method Based on Spherical Discrete Grid Representation
## 3 Construction of Airspace Grid Model Based on Icosahedron Spherical Rhombus Subdivision
### Grid Coding Method  
The description of the spatial location of the AG unit needs to be realized through geocoding. Hilbert curve has been proven to be a space-filled curve that can best maintain the local adjacency of space points [27].  
Connect the midpoint of the opposite side of the rhombus grid to obtain four sub-rhombus. Set the four sub-rhombus as quadrants 0, 1, 2, and 3 respectively. Fill the quadrants with a Hilbert curve, and set them as I, II, III, and IV respectively, as shown in Figure 6. According to the Hilbert coding and state transfer mode of the initial diamond grid, the Hilbert coding and state transfer mode of the sub-diamond can be deduced [28]. By constructing multi-level Hilbert curves, the low-level curves of the AG can be formed by the translation or rotation of high-level curves through corresponding rules at each level of subdivision.  
For example, in the case of level m and the current status is I, when point P is located in the quadrant with the number of binary value 01 (that is, sub-diamond number 1), the status of the next level can be deduced from the status transfer table as b. The number binary value 01 is used as the coding of the m level. On this basis, the coding and segmentation of the m + 1 level are continued under the current status of II, and the code 0101 of the m + 1 level is obtained. As shown in Figure 7.  
The representation of the target point consists of the following parts:  
* The first part: the diamond code: the 0 th level of the segmentation. Table 2 shows the longitude and latitude coordinates of the vertices of the regular icosahedron. Use binary to represent the serial number of the initial diamond, as shown in Figure 8:  
Figure 6: State transition mode of each quadrant of the Hilbert curve.  
Figure 7: Mapping method of low order Hilbert curve to high order.  
* The second part: location code: the 1-3 rd levels of segmentation. The grid quadtree is divided, the grid space is filled by the Hilbert curve, and the binary code is converted into Hilbert code;
* The third part: coordinate code: the 4-10 th levels of segmentation. The grid quadtree is divided, and the grid space is filled by the Hilbert curve. The binary code is converted into Hilbert code, and then the Hilbert code is converted into \((i,j)\) coordinates.  
Take the longitude and latitude coordinates [7.29, 51.19] as an example, first, determine the diamond number of the point as 1, divide the grid to the 10 th level, and obtain the binary code of 1-3 rd levels of 000101, and the binary code of 4-10 th levels of 10000011111000. According to the above method, the global unique representation of the target point is obtained, and the global code is [diamond code, location code, coordinate code]. As shown in Figure 9:  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Vertice** & **Longitude** & **Latitude** & **Vertice** & **Longitude** & **Latitude** \\ \hline S0 & 0\({}^{\circ}\) E & 90\({}^{\circ}\) N & S6 & 36\({}^{\circ}\) E & 26.57\({}^{\circ}\) S \\ S1 & 0\({}^{\circ}\) E & 26.57\({}^{\circ}\) N & S7 & 108\({}^{\circ}\) E & 26.57\({}^{\circ}\) S \\ S2 & 72\({}^{\circ}\) E & 26.57\({}^{\circ}\) N & S8 & 180\({}^{\circ}\) E & 26.57\({}^{\circ}\) S \\ S3 & 144\({}^{\circ}\) E & 26.57\({}^{\circ}\) N & S9 & 108\({}^{\circ}\) W & 26.57\({}^{\circ}\) S \\ S4 & 144\({}^{\circ}\) W & 26.57\({}^{\circ}\) N & S10 & 36\({}^{\circ}\) W & 26.57\({}^{\circ}\) S \\ S5 & 72\({}^{\circ}\) W & 26.57\({}^{\circ}\) N & S11 & 0\({}^{\circ}\) E & 90\({}^{\circ}\) S \\ \hline \hline \end{tabular}
\end{table}
Table 2: Longitude and latitude coordinates of the vertex of a regular icosahedron.  
Figure 8: Ordinal number of initial rhombus position of the icosahedron.  
Figure 9: Diagram of coordinate transformation.