# Clustering Method of Large-Scale Battlefield Airspace Based on Multi A * in Airspace Grid System
## 4 Airspace Clustering Steps Based on Multi-A \({}^{*}\) Algorithm
### Airspace Projection Image Preprocessing
#### 4.2.3 Grid Representation of Projected Image  
Through the processing of the projection image in the previous section, a binary matrix containing airspace location and other parameters are obtained. Next, the airspace grid generation framework is used as the organizational basis to grid the airspace projection image. In the process of characterization, the method of combining the longitude latitude coordinate grid and the rectangular coordinate grid can be adopted. The longitude latitude coordinate grid faces a large range (global or national), and it is suitable for the application of more roughly representing the distribution of information and rough positioning. The rectangular grid is oriented to a small area (province or city), which is suitable for the distribution of more detailed information and the application of relatively accurate positioning. The GeoSOT generation framework defines the \(512^{\circ}\times 512^{\circ}\) grid with the intersection of the equator and the prime meridian as the center point as the level 0 grid. The first level grid is divided into four equal parts on the basis of the first level grid, and the size of each first level grid is \(256^{\circ}\times 256^{\circ}\). The second level grid is further quartered on the basis of the first level grid. The size of each second level grid is \(128^{\circ}\times 128^{\circ}\). The following grids are divided according to the quadtree division principle (as shown in the Figure 7a). GeoSOT grid coding model adopts \(Z\)-order coding. As shown in the Figure 7b, the starting point of coding is \((0,0)\), so the z-order directions of the four hemispheres are different. The next grid is coded in \(Z\)-order on the basis of the previous grid; Each level of grid is assigned a value \(\{0,1,2,3\}\) in \(Z\)-order, which is converted into a binary code of \(\{00,01,10,11\}\). Each level of grid code occupies 2 bits, and the level 32 grid code occupies 64 bits. Figure 6: Black and white binary projection of mission airspace. Figure 7: Grid generation and coding sequence diagram. (**a**) Grid division drawing; (**b**) Grid coding sequence diagram. Taking the longitude and latitude coordinates (39\({}^{\circ}\)54\({}^{\prime}\)20\({}^{\prime\prime}\) N, 116\({}^{\circ}\)25\({}^{\prime}\)29\({}^{\prime\prime}\) E) of Tian'anmen Tower in Beijing, China as an example, the transformation method between longitude and latitude coordinates and GeoSOT grid coding is explained. Since the longitude value 116\({}^{\circ}\)25\({}^{\prime}\)29\({}^{\prime\prime}\) E is less than 256\({}^{\circ}\) and 128\({}^{\circ}\), the first two bits of the grid code are both 0. At the same time, if 116\({}^{\circ}\)25\({}^{\prime}\)29\({}^{\prime\prime}\)/64\({}^{\circ}=1\) is more than 116\({}^{\circ}\)25\({}^{\prime}\)29\({}^{\prime\prime}\)/64\({}^{\circ}=1\), the third bit is coded as 1. Then, divide the grid into the fourth level with a size of 32\({}^{\circ}\). If 52\({}^{\circ}\)25\({}^{\prime}\)29\({}^{\prime\prime}\)/32\({}^{\circ}=1\) is more than 20\({}^{\circ}\)25\({}^{\prime}\)29\({}^{\prime\prime}\), the fourth bit code is also 1, and so on. Finally, under the grid precision of the 16 th level (32\({}^{\prime\prime}\times 32^{\prime\prime}\)), the binary longitude code is 001110100011001010. Similarly, the binary latitude code is 00010011110110100. Cross the latitude code and longitude code to get the one-dimensional binary code of the 16 th level grid where the Tian'anmen Gate Tower is located as \(G\)0000011101001110101011010100100, and convert it into the one-dimensional quaternary code as \(G\)001310322 \(-\) 2312210. When characterizing small objects, the rectangular coordinate grid in the region can be used. The rectangular coordinate grid adopts the Gauss Kruger projection rectangular coordinate system (as shown in the Figure 8), which takes 100 km as the basic unit and expands step by step. The minimum grid spacing can reach the \"meter\" level.