Low-altitude flight base map construction method for unmanned aerial vehicle path planning
Through the regularized spatial division and refinement strategy of Beidou grid code, the existing technology mid-base map construction method has solved the problem of large data storage requirements and low computing efficiency in urban environments, and a lightweight low-altitude flight base map of the drone is realized, which improves the efficiency and safety of path planning.
Patent Information
- Application Number
- CN202510483427.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-25
AI Technical Summary
The existing basemap construction methods are difficult to meet the needs of precise path planning in urban environments, and there are problems such as large data storage requirements and low computing efficiency.
The Beidou grid code is used for regular space division, urban obstacles are meshed and refined, and a lightweight low-altitude flight base map of drone is constructed. By obtaining geographic information vector data and preprocessing, building data is screened, building data is calculated, actual footprint is divided, grid levels are divided, grid coding and refinement are performed step by step, and building space is represented by sub-grid groups.
It significantly reduces the amount of data storage, improves computing efficiency, and reduces the path planning time to one-third of the original, ensuring safe flight of drones in urban environments.
Smart Images

Figure CN120370970A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for constructing a low-altitude flight base map, specifically a method for constructing a low-altitude flight base map for unmanned aerial vehicle (UAV) path planning, and belongs to the technical field of UAV route planning. Background Art
[0002] In recent years, UAVs have demonstrated unique advantages in complex urban environments due to their high maneuverability, low cost, and high efficiency, playing an important role in urban planning and the development of the low-altitude economy. However, the safe flight of UAVs depends on efficient path planning, and the accuracy of path planning not only depends on algorithm optimization but is also closely related to the construction method of the base map.
[0003] Existing base map construction methods mainly include Digital Elevation Model (DEM), Digital Surface Model (DSM), and three-dimensional real-scene modeling, etc. DEM can provide terrain elevation information but is difficult to meet the accurate path planning requirements in urban environments because it lacks a complete description of obstacles such as buildings and vegetation and has a low resolution. DSM adds ground object information and improves accuracy, but it is not suitable for large-scale UAV path planning because its data processing complexity is high and the computing resource requirements are large. The three-dimensional real-scene modeling method can provide a high-precision environmental description and support visualization applications, but its data acquisition cost is high, storage requirements are large, and the computing overhead is high. This is because three-dimensional modeling usually relies on technologies such as UAV aerial photography and LiDAR laser scanning, with complex data processing processes and heavy computing burdens.
[0004] Therefore, in the process of overcoming the limitations of existing base map construction methods, how to ensure sufficient base map accuracy while reducing data storage requirements and improving computing efficiency is an urgent problem to be solved in the construction of UAV low-altitude flight base maps. Summary of the Invention
[0005] Object of the Invention: Aiming at the above problems, the object of the present invention is to provide a method for constructing a low-altitude flight base map for UAV path planning, which uses the regularized space division ability of the Beidou grid code to divide and refine the grid of urban obstacles, project geographic information vector data into grid cells, and realize the construction of a lightweight and flexible low-altitude flight base map for UAVs.
[0006] Technical Solution: The method for constructing a low-altitude flight base map for UAV path planning according to the present invention includes the following steps:
[0007] Obtain geographic information vector data and perform preprocessing;
[0008] Select a target area, screen the building data in the target area, and calculate the actual floor area of each building after screening;
[0009] Divide the grid levels to which each building belongs according to the actual floor area of each building;
[0010] Perform grid coding on the grid levels to which each building belongs;
[0011] Construct an initial grid;
[0012] Adopt a method based on the spatial characteristics of buildings to gradually refine the initial grid to obtain sub-grids, and use the sub-grid group to represent the building space.
[0013] Furthermore, the steps for calculating the actual floor area of each building after screening include:
[0014] First, convert the longitude and latitude coordinates of the building into UTM coordinates. First, calculate the zone number of the UTM projection. The formula is:
[0015]
[0016] In the formula, λ represents the longitude of the location where the building is located, represents rounding down;
[0017] Calculate the central meridian of the projection zone according to the zone number Zone. The formula is:
[0018] λ0 = (Zone × 6 - 183)
[0019] Calculate the radius of curvature in the prime vertical direction. The formula is:
[0020]
[0021] In the formula, a represents the semi-major axis of the known ellipsoid parameter in the WGS-1984 coordinate system, e represents the first eccentricity of the known ellipsoid in the WGS-1984 coordinate system, and φ represents the latitude;
[0022] Calculate the square value of the tangent. The formula is:
[0023] T = tan 2 φ
[0024] Calculate the cosine square term of the second eccentricity. The formula is:
[0025] C = e′ 2 cos 2 φ
[0026] In the formula, e′ represents the second eccentricity of the ellipsoid in the WGS-1984 coordinate system, and cos 2 φ represents the cosine correction term in the latitude direction;
[0027] Calculate the angular difference between the longitude and the central meridian. The formula is:
[0028] A = (λ - λ0)cosφ
[0029] Calculate the meridian arc length, and the formula is:
[0030]
[0031] Then calculate the UTM abscissa, and the formula is:
[0032]
[0033] In the formula, k0 represents the scale factor; T represents the square value of the tangent, reflecting the influence of the slope in the latitude direction on the projection; 500000 is the offset, making the X-axis coordinate always positive;
[0034] Finally, calculate the UTM ordinate, and the formula is:
[0035]
[0036] In the formula, if φ < 0°, then Y = Y + 10000000, making the Y-axis coordinate always positive;
[0037] Record the actual floor area of the building as a polygon, and calculate the actual floor area of the building according to the UTM abscissa and ordinate of each vertex of the polygon corresponding to the building. The formula is:
[0038]
[0039] In the formula, (X i , Y i ) are the abscissa and ordinate of the i-th vertex of the polygon, and (X n+1 , Y n+1 ) = (X1, Y1), and n is the total number of polygon vertices.
[0040] Furthermore, the steps for grid coding the grid levels to which each building belongs include:
[0041] When the grid level L of the building is 1, obtain the north-south hemisphere identification code according to the location of the building, and then calculate the longitude and latitude identification codes according to the Beidou grid coding rules to obtain the first-level Beidou two-dimensional grid position code;
[0042] When 2 ≤ L ≤ 10, then first calculate the longitude and latitude coordinates of the positioning corner points of the L - 1-level Beidou grid. The formulas are respectively:
[0043] λ L-1 = λ L-2 + (a L-1 - 1) × Δ L-1 λ
[0044] φ L-1 = φ L-2+(φ L-1 -1)×Δ L-1 φ
[0045] In the formula, λ i represents the longitude of the positioning corner point of the i-th level two-dimensional Beidou grid where the actual geographical location of a certain building or target point is located; φ i represents the latitude of the positioning corner point of the i-th level two-dimensional Beidou grid where this location is located; a i represents the column number of the i-th level two-dimensional Beidou grid where this location is located; b i represents the row number of the i-th level two-dimensional Beidou grid where this location is located; Δ i λ represents the longitude difference of the i-th level two-dimensional Beidou grid; Δ i φ represents the latitude difference of the i-th level two-dimensional Beidou grid;
[0046] Then, calculate the row and column numbers corresponding to the L-th level Beidou grid. The formulas are respectively:
[0047]
[0048] In the formula, [] represents taking the integer part of the quotient, Lng represents the longitude of the actual geographical location of a certain building or target point, and Lat represents the latitude of the actual geographical location of a certain building or target point;
[0049] Obtain the longitude and latitude coordinates and row and column numbers of the positioning corner points corresponding to each level of grid through the formula. According to the two-dimensional Beidou grid position code encoding rule corresponding to each level of grid, convert the row and column numbers into the corresponding longitude and latitude identification codes.
[0050] Furthermore, the steps for constructing the initial grid include:
[0051] Obtain the building contour boundary, construct grid cutting lines according to the longitude and latitude resolution of the current level of grid, use the floor function and ceiling function to ensure that the building area can be completely covered by the grid, and generate a two-dimensional grid, with the horizontal axis being the longitude cutting line and the vertical axis being the latitude cutting line;
[0052] Calculate the building centroid of each building and find the index of the corresponding two-dimensional grid;
[0053] Use an array to store grid information, and the storage format is [minimum longitude, maximum longitude, minimum latitude, maximum latitude].
[0054] Furthermore, the steps for gradually refining the initial grid to obtain sub-grids by using the method based on the spatial characteristics of the building include:
[0055] Perform grid overlap detection on the initial grid, and detect whether the longitude interval of grid i is within the longitude interval of grid j. The formula is:
[0056] λmin,i ≥ λ min,j - ∈
[0057] λ max,i ≤ λ max,j + ∈
[0058] Check whether the latitude interval of grid i is within the latitude interval of grid j. The formula is:
[0059] φ min,i ≥ φ min,j - ∈
[0060] φ max,i ≤ φ max,j + ∈
[0061] In the formula, ∈ is the floating-point error, [λ min,k , λ max,k , φ min,k , φ max,k are the minimum longitude, maximum longitude, minimum latitude, and maximum latitude of the kth grid;
[0062] If there is an overlap, it means there are multiple buildings inside the grid. Then refine the overlapping grid to obtain a sub-table. Otherwise, there is no need.
[0063] Furthermore, the steps for refining the overlapping grid include:
[0064] Perform longitude refinement. The formula is:
[0065] Δλ new = Δλ old / ρ, ρ ∈ {2, 8, 12, 15}
[0066] Perform latitude refinement. The formula is:
[0067] Δφ new = Δφ old / ω, ω ∈ {2, 3, 8, 10, 15}
[0068] In the formula, Δλ new , Δφ new are the longitude span and latitude span of the refined grid, Δλ old , Δφ old are the longitude span and latitude span of the original grid, ρ is the longitude refinement factor, and ω is the latitude refinement factor.
[0069] Furthermore, the steps for representing the building space using the sub-grid group include:
[0070] From each vertex P q (x q , y q ) of the sub-grid, to Vi (x i , y i ) to V i+1 (x i+1 , y i+1 ) of the building outline edge composed of line segments, emit a ray in the positive x-axis direction, and calculate the abscissa of the intersection point of the ray and the edge. The formula is:
[0071]
[0072] In the formula, x intersection represents the x-axis coordinate of the intersection point of the ray and the edge;
[0073] Judge the relative size of the abscissa of the intersection point and x q . If x intersection ≥ x q , then the ray intersects the edge; if x intersection < x q , then it does not intersect;
[0074] Count the number of intersection points. If it is odd, the current vertex is inside the building; if the number of intersection points is even, the current vertex is outside the building. Finally, only retain the sub-grids that intersect with the building or are inside the building, and use the sub-grid group to represent the building space.
[0075] Furthermore, obtaining and preprocessing the geographic information vector data includes:
[0076] Project the geographic information vector data onto the same coordinate uniformly;
[0077] Among them, the geographic information vector data includes spatial information, area data, perimeter data, elevation attributes, and building coding information.
[0078] Advantageous effects: Compared with the prior art, the significant advantages of the present invention are:
[0079] 1. The present invention constructs a low-altitude flight base map for unmanned aerial vehicles based on the Beidou grid code, and has significant advantages in terms of data storage and calculation efficiency compared with traditional DEM, DSM, and three-dimensional real-scene modeling methods;
[0080] 2. The present invention constructs an efficient and lightweight low-altitude flight base map for unmanned aerial vehicles through a regular grid division and refinement strategy, reducing the storage capacity of the base map data by more than 95%, greatly reducing the storage overhead;
[0081] 3. The present invention optimizes the calculation efficiency, utilizes the high efficiency of the Beidou grid code in data compression, and verifies by using the A* path search algorithm, and obtains that the calculation time of the unmanned aerial vehicle path planning is reduced to one-third of the original. Description of the Drawings
[0082] Figure 1 It is a flowchart of a method for constructing a low-altitude flight base map for UAV path planning;
[0083] Figure 2 It is a schematic diagram of Beidou grid for urban buildings;
[0084] Figure 3 It is a schematic diagram of geographic information vector data;
[0085] Figure 4 It is a Beidou grid base map based on the floor area of buildings;
[0086] Figure 5 It is a Beidou grid base map based on the spatial characteristics of buildings;
[0087] Figure 6 It is a UAV path based on the Beidou grid base map;
[0088] Figure 7 It is a UAV path based on geographic information vector data. Specific implementation manner
[0089] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0090] The method for constructing a low-altitude flight base map for UAV path planning described in this embodiment has a flowchart as Figure 1 shown, and this method includes the following steps:
[0091] Step 1, obtain geographic information vector data and perform preprocessing.
[0092] Further, obtaining geographic information vector data and performing preprocessing includes:
[0093] Project the geographic information vector data onto the same coordinate uniformly;
[0094] The geographic information vector data includes spatial information, area data, perimeter data, elevation attributes and building coding information. The spatial information includes information such as the coordinate points, contour lines and geometric shapes of buildings, the area data refers to the actual planar area occupied by the buildings, the perimeter data refers to the length of the building contour, the elevation attribute refers to the height information of the buildings, and the building coding information refers to building numbers or classification codes.
[0095] The schematic diagram of Beidou grid for urban buildings is as Figure 2 shown, the dark blue grid is the area where the building is located, and the white grid is the area without obstacles. In order to avoid the UAV colliding with the building during flight, its path needs to always stay within the white grid.
[0096] Combined withFigure 3 , each polygon in the figure corresponds to a building, reflecting the shape and distribution characteristics of the actual buildings in the area, and the attributes contain key information such as the height, longitude and latitude of the buildings, providing support for subsequent base map construction and UAV path planning.
[0097] Step 2: Select the target area, screen the building data in the target area, and calculate the actual floor area of each building after screening.
[0098] In an example, the SuperMap software is used to process the geographic information vector data, and all the geographic information vector data can be uniformly projected onto the WGS-1984 coordinate system to avoid errors during data fusion under different coordinate systems. Subsequently, the target area is selected, and the building data in the target area is screened to remove incorrect or invalid data.
[0099] Furthermore, the steps for calculating the actual floor area of each building after screening include:
[0100] Since longitude and latitude cannot be used to directly calculate the area, they are first converted to UTM coordinates, and then the area is calculated. First, convert the longitude and latitude coordinates of the building to UTM coordinates. First, calculate the partition number of the UTM projection. The formula is:
[0101]
[0102] In the formula, λ represents the longitude of the location of the building, represents rounding down;
[0103] Calculate the central meridian of the projection zone according to the partition number Zone. The formula is:
[0104] λ0 = (Zone × 6 - 183)
[0105] Calculate the radius of curvature in the prime vertical direction. The formula is:
[0106]
[0107] In the formula, a represents the semi-major axis of the known ellipsoid parameter in the WGS-1984 coordinate system, e represents the first eccentricity of the known ellipsoid in the WGS-1984 coordinate system, and φ represents the latitude;
[0108] Calculate the square value of the tangent. The formula is:
[0109] T = tan 2 φ
[0110] Calculate the cosine square term of the second eccentricity. The formula is:
[0111] C = e′ 2 cos2 φ
[0112] Wherein, e' represents the second eccentricity of the ellipsoid in the WGS-1984 coordinate system, and cos 2 φ represents the cosine correction term in the latitude direction;
[0113] Calculate the angular difference between the longitude and the central meridian. The formula is:
[0114] A = (λ - λ0)cosφ
[0115] Calculate the meridian arc length. The formula is:
[0116]
[0117] Then calculate the UTM abscissa. The formula is:
[0118]
[0119] Wherein, k0 represents the scale factor; T represents the square value of the tangent, reflecting the influence of the slope in the latitude direction on the projection; 500000 is the offset to make the X-axis coordinate always positive;
[0120] Finally, calculate the UTM ordinate. The formula is:
[0121]
[0122] Wherein, if φ < 0°, then Y = Y + 10000000 to make the Y-axis coordinate always positive;
[0123] Record the actual floor area of the building as a polygon, and calculate the actual floor area of the building according to the UTM abscissa and ordinate of each vertex of the polygon corresponding to the building. The formula is:
[0124]
[0125] Wherein, (X i , y i ) are the abscissa and ordinate of the i-th vertex of the polygon, and (X n+1 , Y n+1 ) = (X1, Y1), and n is the total number of polygon vertices.
[0126] Its principle is to calculate the area according to the given polygon vertex coordinates. By decomposing the polygon into multiple triangles, calculate the area of each triangle according to the cross product rule, and finally sum up to get the polygon area. Note that the order of the coordinates is clockwise or counterclockwise, and the polygon for solving the area is also a simple polygon.
[0127] Step 3: Divide the grid levels to which each building belongs according to the actual floor area of each building.
[0128] Further, the steps of dividing the grid levels to which each building belongs according to the actual floor area of each building include:
[0129] The Beidou two-dimensional grid levels are divided into a total of one to ten levels. The higher the level, the smaller the corresponding grid. For buildings with different floor areas, grid levels of different sizes are used to achieve a regular grid structure. Let L represent the grid level, and each grid level has a corresponding preset area threshold. If the actual floor area of a building is greater than the area threshold of a certain grid, then a lower or even lower level grid is selected as the grid level to which the building belongs; otherwise, the current level or a higher level is selected as the grid level to which the building belongs, ensuring that high resolution is applied to small buildings and low resolution is applied to large buildings.
[0130] Exemplarily, after calculating the actual floor area of a building, if the area is greater than the threshold of a certain grid, then a lower or even lower level grid is selected; otherwise, the current level or a higher level grid is selected. For example, the area threshold of the fifth-level grid is approximately 1.52992×10 4 m 2 , and the area threshold of the sixth-level grid is approximately 3.82418×10 3 m 2 . If the actual floor area of a building is 8000m 2 , this actual floor area is greater than the sixth-level grid and less than the fifth-level grid, so the grid level should be selected as the fifth level.
[0131] Step 4, perform grid coding on the grid levels to which each building belongs.
[0132] Further, the steps of performing grid coding on the grid levels to which each building belongs include:
[0133] When the grid level L of the building is 1, obtain the north-south hemisphere identification code, i.e., N or S, according to the location of the building, and then calculate the longitude and latitude identification codes according to the Beidou grid coding rule to obtain the first-level Beidou two-dimensional grid position code;
[0134] When 2 ≤ L ≤ 10, then first calculate the longitude and latitude coordinates of the positioning corner points of the (L - 1)-level Beidou grid. The formulas are respectively:
[0135] λ L-1 = λ L-2 +(a L-1 -1)×Δ L-1 λ
[0136] φ L-1 = φ L-2 +(b L-1 -1)×Δ L-1 φ
[0137] where λ i represents the longitude of the positioning corner point of the i-th level two-dimensional Beidou grid where the actual geographical location of a certain building or target point is located; φ i represents the latitude of the positioning corner point of the i-th level two-dimensional Beidou grid where this location is located; a i represents the column number of the i-th level two-dimensional Beidou grid where this location is located; b i represents the row number of the i-th level two-dimensional Beidou grid where this location is located; Δ i λ represents the longitude difference of the i-th level two-dimensional Beidou grid; Δ i φ represents the latitude difference of the i-th level two-dimensional Beidou grid;
[0138] Then calculate the row and column numbers corresponding to the L-th level Beidou grid. The formulas are as follows:
[0139]
[0140] where [], represents taking the integer part of the quotient, Lng represents the longitude of the actual geographical location of a certain building or target point, and Lat represents the latitude of the actual geographical location of a certain building or target point;
[0141] Obtain the longitude and latitude coordinates and row and column numbers of the positioning corner points corresponding to each level of grid through the formula. According to the two-dimensional Beidou grid position code encoding rule corresponding to each level of grid, convert the row and column numbers into the corresponding longitude and latitude identification codes.
[0142] The ultimate goal of encoding is to encode the spatial position information of the building or target area into a group of recognizable longitude and latitude grid identification codes. After completing the grid encoding, effectively compress the data, reduce the data volume, and facilitate the precise path planning and task execution of the unmanned aerial vehicle.
[0143] Step 5, construct the initial grid.
[0144] Furthermore, the steps for constructing the initial grid include:
[0145] Obtain the building contour boundary, construct grid cutting lines according to the longitude and latitude resolution of the current level of grid, use the floor function and ceiling function to ensure that the building area can be completely covered by the grid, and generate a two-dimensional grid, with the horizontal axis being the longitude division line and the vertical axis being the latitude division line;
[0146] Calculate the building centroid of each building and find the index of the corresponding two-dimensional grid;
[0147] Use an array to store the grid information, and the storage format is [minimum longitude, maximum longitude, minimum latitude, maximum latitude].
[0148] The building's center of gravity is mainly based on two-dimensional geographical coordinates, without considering height. Since the Beidou two-dimensional grid coding is based on the longitude and latitude coordinate plane, the height information is only used for three-dimensional modeling and does not affect the grid index calculation. The average value of the longitude and latitude coordinate points of the building outline is directly taken as its geometric center on the two-dimensional plane, that is, the building's center of gravity. Since the area is divided at fixed longitude and latitude intervals at the defined grid level, after obtaining the center of gravity, by comparing the two-dimensional center of gravity coordinates with the longitude and latitude cutting lines at the current grid level, the corresponding row and column indexes in the longitude and latitude directions can be calculated respectively, so as to accurately locate the grid cell where the building is located. The index is in the form of row and column coordinates, which is a two-dimensional integer pair (lat_idx, lon_idx), where lat_idx and lon_idx represent the index numbers of the grid where the building is located in the latitude and longitude directions respectively. In the currently divided two-dimensional grid, each grid cell can be used as a data storage unit to store the attribute information corresponding to this spatial area.
[0149] Combined with Figure 4 It can be seen that the red rectangles in the figure are the grid cells occupied by each building. For buildings with a large floor area, the grid cells are larger; while for buildings with a small floor area, the grid cells are smaller. This is because the grid level is divided according to the actual floor area of the building, and the larger the floor area of the building, the larger the natural grid cell. At the same time, the irregular boundaries of the building itself are simplified into regular grids. Although a certain degree of accuracy is lost, the complexity of the data is significantly reduced. In addition, it can also be observed from the figure that the distribution of the grids also conforms to the distribution of the actual buildings. Especially in the areas where the buildings are more concentrated in the middle and on the right, the distribution of the grids also shows similar characteristics. However, the gaps between the grids are small and cannot correctly reflect the space between the buildings, resulting in a waste of flyable airspace resources. Therefore, it is necessary to refine the current grids to improve their accuracy, so that the areas where the buildings are located and the gap areas are clearer, in order to better utilize the flyable airspace.
[0150] Step 6: Use the method based on the spatial characteristics of the building to gradually refine the initial grid to obtain sub-grids, and use the sub-grid group to represent the building space.
[0151] If there are multiple buildings inside the grid, it may cause the space between the buildings to be covered, resulting in a waste of airspace resources and having a certain impact on the subsequent path planning of the UAV. In order to make the grid more accurately reflect the actual characteristics of the building, avoid this problem and improve the accuracy of the base map, the existing two-dimensional grid is gradually refined using the method based on the spatial characteristics of the building.
[0152] Further, the steps of obtaining sub-grids by gradually refining the initial grid using a method based on the spatial characteristics of buildings include:
[0153] Perform grid overlap detection on the initial grid to detect whether the longitude range of grid i is within the longitude range of grid j. The formula is:
[0154] λ min,i ≥λ min,j -∈
[0155] λ max,i ≤λ max,j +∈
[0156] Detect whether the latitude range of grid I is within the latitude range of grid J. The formula is:
[0157] φ min,i ≥φ min,j -∈
[0158] φ max,i ≤φ max,j +∈
[0159] In the formula, ∈ is the floating-point error, [λ min,k ,λ max,k ,φ min,k ,φ max,k are the minimum longitude, maximum longitude, minimum latitude, and maximum latitude of the kth grid;
[0160] When all four above overlap detection formulas are satisfied simultaneously, it means there is grid overlap. If there is overlap, it indicates that there are multiple buildings inside the grid, and then the overlapping grid is refined to obtain a sub-table, otherwise it is not necessary.
[0161] Further, the steps of refining the overlapping grid include:
[0162] Perform longitude refinement. The formula is:
[0163] Δλ new =Δλ old / ρ, ρ ∈ {2, 8, 12, 15}
[0164] Perform latitude refinement. The formula is:
[0165] Δφ new =Δφ old / ω, ω ∈ {2, 3, 8, 10, 15}
[0166] In the formula, Δλ new 、Δφ new are the longitude span and latitude span of the refined grid, Δλ old 、Δφ oldis the longitude span and latitude span of the original grid, ρ is the longitude refinement factor, and ω is the latitude refinement factor.
[0167] For example, when both the latitude refinement factor and the longitude refinement factor are 8, the operation of dividing the longitude and latitude spans of the current grid into 8 equal parts can be refined into 64 sub-grids, which is equivalent to raising the grid level by one level.
[0168] Combined with Figure 5 gives the Beidou grid base map obtained by gradually refining the grid based on the spatial characteristics of buildings. Compared with Figure 4 After refinement, the grid fits the contour of the actual building more closely and can accurately reflect the boundary of the building footprint. This is because by adjusting the grid level, the sub-grids that are not inside the building or do not intersect with the building are removed, reducing the gaps between the grids, making the grid distribution more reasonable, and thus optimizing the problem of wasted airspace resources.
[0169] Further, the steps of representing the building space using the sub-grid group include:
[0170] From each vertex P q (x q , y q ) of the sub-grid, emit a ray in the positive x-axis direction towards the building contour edge composed of the line segment from V i (x i , y i ) to V i+1 (x i+1 , y i+1 ), and calculate the abscissa of the intersection point of the ray and the edge. The formula is:
[0171]
[0172] In the formula, x intersection represents the x-axis coordinate of the intersection point of the ray and the edge;
[0173] Judge the relative size of the abscissa of the intersection point and x q . If x intersection ≥ x q , then the ray intersects the edge; if x intersection < x q , then they do not intersect;
[0174] Count the number of intersection points. If it is odd, the current vertex is inside the building; if the number of intersection points is even, the current vertex is outside the building. Finally, only the sub-grids that intersect with the building or are inside the building are retained, and the sub-grid group is used to represent the building space.
[0175] To ensure that the drone can perform tasks safely in complex urban environments, it is necessary to reasonably plan the path of the drone. Considering the two-dimensional plane scenario, using the Beidou grid obstacle data in the base map, by setting the starting point and the ending point, and combining obstacle detection and the A* search algorithm, a path that is close to the optimal length from the starting point to the ending point and avoids obstacles is generated. The specific process is as follows:
[0176] (1) Two-dimensional environment modeling
[0177] The boundary range of each obstacle is defined by its longitude and latitude coordinates [lon_min, lon_max, lat_min, lat_max], and a safety margin of safety_margin = 0.000026 is added to ensure the distance safety between the drone and the obstacle. Any path point that falls within the expanded obstacle boundary range will be considered a collision. The collision detection logic is as follows:
[0178] lon_min[i] - safety_margin ≤ x ≤ lon_max[i] + safety_margin
[0179] lat_min[i] - safety_margin ≤ y ≤ lat_max[i] + safety_margin
[0180] In the formula, lon_min[i] and lon_max[i] represent the minimum longitude and the maximum longitude respectively, and lat_min[i] and lat_max[i] represent the minimum latitude and the maximum latitude respectively;
[0181] If the path point (x, y) falls within the obstacle or the safety boundary, it means a collision occurs, otherwise it is safe.
[0182] (2) Path planning modeling
[0183] The A* search algorithm is used for the path planning of the drone. The principle of the A* algorithm is as follows:
[0184] f(m) = h(n) + h(n)
[0185]
[0186] In the formula, g(n) is the path cost from the starting point to the current node, h(n) is the estimated cost from the current node to the target node, and f(n) is the comprehensive cost, which determines the search priority; (x1, y1) is the position coordinate of the current node, and (x2, y2) is the position coordinate of the target node.
[0187] The Euclidean distance is selected to measure the distance between two nodes and is used as the heuristic function. The formula is:
[0188] g(n′) = g(n) + d(n,n′)
[0189]
[0190] f(n′) = g(n′) + h(n′)
[0191] Wherein, g(n′) is the path cost from the starting point to the new starting point; d(n,n′) is the actual movement cost from the current node n to the neighbor node n′, and h(n,n′) is the estimated cost from the node n′ to the target node goal. (x goal , y goal ) are the coordinates of the target node goal, and (x n′ , y n′ ) are the coordinates of the current candidate node n′.
[0192] By continuously updating the path cost and the comprehensive cost, always select the node with the smallest f(n) for path search until the target point is found.
[0193] (3) Algorithm execution
[0194] Initialization phase: Create a priority queue frontier, store the cost dictionary ccost_so_far of the nodes and the dictionary came_from of the path sources, and set the step size step_size = 0.0001;
[0195] Node processing: Each time select the node with the lowest priority in the queue, judge whether the end point is reached. If not, expand the current node to generate neighbor nodes in 8 directions;
[0196] Neighbor node check: Check whether each neighbor node is within the obstacle or the safety margin, calculate the cost and priority of the neighbor node, and update them to the queue, the cost dictionary and the source dictionary;
[0197] Path generation: If the target is reached, backtrack the path from the target. If the queue is empty or the maximum number of iterations is reached, output failure.
[0198] Figure 6The figure shows the UAV path calculated from the starting point to the end point using the A* algorithm. In the figure, the red grids represent the areas occupied by buildings, the blue broken line "Path" represents the flight path planned by the UAV, "Path Points" represents the path points, "Start" represents the starting point, and "Goal" is the target end point. The entire planning process is based on the Beidou grid map, ensuring that the UAV can safely avoid obstacles and achieve a balance between the shortest path and flight safety. It can be seen that the path is relatively smooth and successfully bypasses obstacles. This is because the A* algorithm optimizes the path through cost functions, heuristic search, and diagonal movement, making the path shorter, straighter, and smoother, thus reducing unnecessary inflection points and improving flight stability. At the same time, the Beidou grid code discretizes the search space into regular grid cells, not only reducing the complexity of the search but also improving the path calculation efficiency. The time required for the final path planning is only 4 seconds.
[0199] Figure 7 The figure shows the UAV path obtained using the A* algorithm based on geographic information vector data. The outline of the building is represented by a polygon based on vector data. Compared with the regular Beidou grid, its path fits the real boundary of the building with higher fineness, but it also greatly increases the calculation complexity. This is because the vector data stores the exact boundary coordinates, and data rasterization or region segmentation needs to be performed before path planning to meet the search requirements of the A* algorithm. The time required for the final path planning is 12 seconds. Compared with the UAV path based on the Beidou grid map, the planning time has increased by 3 times.
Claims
1. A method for constructing a low-altitude flight base map for UAV path planning, characterized in that It includes the following steps: Obtain geographic information vector data and perform preprocessing; Select the target area, screen the building data within the target area, and calculate the actual floor area of each building after screening; Divide the grid levels to which each building belongs according to the actual floor area of each building; Perform grid coding on the grid levels to which each building belongs; Construct an initial grid; Use a method based on the spatial characteristics of buildings to gradually refine the initial grid to obtain sub-grids, and use the sub-grid group to represent the building space.
2. The method for constructing a low-altitude flight base map for UAV path planning according to claim 1, wherein The steps for calculating the actual floor area of each building after screening include: First convert the longitude and latitude coordinates of the building to UTM coordinates. First calculate the partition number of the UTM projection. The formula is: where λ represents the longitude of the location where the building is located, represents rounding down; Calculate the central meridian of the projection zone according to the partition number Zone. The formula is: λ0 = (Zone × 6 - 183) Calculate the radius of curvature in the prime vertical direction. The formula is: In the formula, a represents the semi-major axis of the known ellipsoid parameter in the WGS-1984 coordinate system, e represents the first eccentricity of the known ellipsoid in the WGS-1984 coordinate system, and φ represents the latitude; Calculate the square value of the tangent. The formula is: T = tan 2 φ Calculate the cosine square term of the second eccentricity. The formula is: C = e′ 2 cos 2 φ where e′ represents the second eccentricity of the ellipsoid in the WGS-1984 coordinate system, and cos 2 φ represents the cosine correction term in the latitude direction; Calculate the angular difference between the longitude and the central meridian. The formula is: A = (λ - λ0)cosφ Calculate the meridian arc length. The formula is: Then calculate the UTM abscissa. The formula is: In the formula, k0 represents the scale factor; T represents the square value of the tangent, which reflects the influence of the slope in the latitude direction on the projection; 500000 is the offset to make the X-axis coordinate always positive; Finally calculate the UTM ordinate. The formula is: In the formula, if φ < 0°, then Y = Y + 10000000 to make the Y-axis coordinate always positive; Record the actual floor area of the building as a polygon, and calculate the actual floor area of the building according to the UTM abscissa and ordinate of each vertex of the polygon corresponding to the building. The formula is: where (X i , y i ) are the abscissa and ordinate of the i-th vertex of the polygon, and (X n+1 , Y n+1 ) = (X1, Y1), and n is the total number of polygon vertices.
3. The method for constructing a low-altitude flight base map for UAV path planning according to claim 2, wherein The steps for performing grid coding on the grid levels to which each building belongs include: When the grid level L of the building = 1, obtain the north-south hemisphere identification code according to the location of the building, and then calculate the longitude and latitude identification codes according to the Beidou grid coding rule to obtain the first-level Beidou two-dimensional grid position code; When 2 ≤ L ≤ 10, first calculate the longitude and latitude coordinates of the positioning corner points of the (L - 1)-level Beidou grid. The formulas are respectively: λ L-1 = λ L-2 + (a L-1 - 1) × Δ L-1 λ φ L-1 = φ L-2 + (b L-1 - 1) × Δ L-1 φ where λ i represents the longitude of the positioning corner point of the i-th level two-dimensional Beidou grid where the actual geographical location of a certain building or target point is located; φ i represents the latitude of the positioning corner point of the i-th level two-dimensional Beidou grid where the location is located; a i represents the column number of the i-th level two-dimensional Beidou grid where the location is located; b i represents the row number of the i-th level two-dimensional Beidou grid where the location is located; Δ i λ represents the longitude difference of the i-th level two-dimensional Beidou grid; Δ i φ represents the latitude difference of the i-th level two-dimensional Beidou grid; Then calculate the row and column numbers corresponding to the L-level Beidou grid. The formulas are respectively: In the formula, [] represents taking the integer part of the quotient, Lng represents the longitude of the actual geographical location of a certain building or target point, and Lat represents the latitude of the actual geographical location of a certain building or target point; Obtain the longitude and latitude coordinates and row and column numbers of the positioning corner points corresponding to each level of grid through the formula. According to the two-dimensional Beidou grid position code coding rule corresponding to each level of grid, convert the row and column numbers into the corresponding longitude and latitude identification codes.
4. The method for constructing a low-altitude flight base map for UAV path planning according to claim 3, wherein The steps for constructing the initial grid include: Obtain the building contour boundary, construct grid cutting lines according to the longitude and latitude resolution of the current level of grid, and use the floor function and ceiling function to ensure that the building area can be completely covered by the grid, generating a two-dimensional grid with the horizontal axis as the longitude cutting line and the vertical axis as the latitude cutting line; Calculate the building center of gravity of each building and find the index of the corresponding two-dimensional grid; Use an array to store grid information, and the storage format is [minimum longitude, maximum longitude, minimum latitude, maximum latitude].
5. The method for constructing a low-altitude flight base map for UAV path planning according to any one of claims 1 to 4, characterized in that Adopt a method based on the spatial characteristics of buildings to gradually refine the initial grid. The steps to obtain sub-grids include: Perform grid overlap detection on the initial grid. Check whether the longitude interval of grid i is within the longitude interval of grid j. The formula is: λ min,i ≥λ min,j -∈ λ max,i ≤λ max,j +∈ Check whether the latitude interval of grid i is within the latitude interval of grid j. The formula is: φ min,i ≥ φ min,j - ∈ φ max,i ≤ φ max,j + ∈ where ∈ is the floating-point error, [λ min,k , λ max,k , φ min,k , φ max,k are the minimum longitude, maximum longitude, minimum latitude, and maximum latitude of the k-th grid; If there is an overlap, it means there are multiple buildings inside the grid. Then refine the overlapping grid to obtain a sub-table. Otherwise, there is no need to do so.
6. The method for constructing a low-altitude flight base map for UAV path planning according to claim 5, wherein The steps to refine the overlapping grid include: Perform longitude refinement. The formula is: Δλ new = Δλ old / ρ, where ρ ∈ {2, 8, 12, 15} Perform latitude refinement. The formula is: Δφ new = Δφ old / ω, ω ∈ {2, 3, 8, 10, 15} where Δλ new , Δφ new are the longitude span and latitude span of the refined grid, and Δλ old , Δφ old are the longitude span and latitude span of the original grid, ρ is the longitude refinement factor, and ω is the latitude refinement factor.
7. The method for constructing a low-altitude flight base map for UAV path planning according to claim 6, characterized in that, The steps to represent the building space using a sub-grid group include: From each vertex P of the sub-grid q (x q , y q ), emit a ray in the positive x-axis direction towards the building contour edge formed by the line segment from V i (x i , y i ) to V i+1 (x i+1 , y i+1 ), and calculate the abscissa of the intersection point of the ray and the edge. The formula is: where x intersection represents the x-axis coordinate of the intersection point of the ray and the side; Judge the relative size of the abscissa of the intersection point and x q If x intersection ≥x q , then the ray intersects the edge; if x intersection <x q , then they do not intersect; Count the number of intersection points. If it is odd, the current vertex is inside the building; if the number of intersection points is even, the current vertex is outside the building. Finally, only retain the sub-grids that intersect or are inside the building, and use the sub-grid group to represent the building space.
8. The method for constructing a low-altitude flight base map for UAV path planning according to claim 1, characterized in that, Obtain and preprocess the geographic information vector data, including: Project the geographic information vector data onto the same coordinate uniformly; Among them, the geographic information vector data includes spatial information, area data, perimeter data, elevation attributes, and building coding information.
Citation Information
Cited By
DSM data extraction method based on high-fidelity scene
CN120563770A
A DSM data extraction method based on high-fidelity scenes
CN120563770B
Gridding method and system based on flight trajectory data of unmanned aerial vehicle
CN121528042A