Route planning method and device, storage medium and program product
By using the terrain model based on specification grids and slope cost function to screen reachable nodes in the track planning system, the problem of low efficiency in the track planning in the existing technology is solved, and more efficient, safe and flexible track planning is achieved.
Patent Information
- Application Number
- CN202510239505.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-10
AI Technical Summary
The existing track planning system has low track planning efficiency in field scenarios and cannot meet the needs of real-time track planning of drones.
By obtaining the terrain model based on the specification grid of the target area, filtering the reachable nodes of the current flight node, and determining the first slope cost of the reachable nodes based on the slope difference, and giving priority to the smooth slope track. At the same time, the first distance cost is determined based on the plane distance and the reachable coefficient, thereby enhancing the flexibility of track planning and the smoothness of the path.
It improves the efficiency of track planning, ensures the safety of tracks and the smoothness of paths, and realizes efficient and accurate planning of the optimal track in complex terrain.
Smart Images

Figure CN120122684A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic navigation, and particularly relates to a flight path planning method, device, storage medium, and program product. Background Art
[0002] With the rapid development of computer technology and electronic navigation technology, the unmanned aerial vehicle (UAV) system has gradually given rise to a new technical field: the flight path planning system. Using the flight path planning system, flight path planning can be directly performed using an electronic map, and geographical information can be quickly and easily obtained from the electronic map. The emergence of the flight path planning system has greatly reduced the time required for flight path planning and can also closely follow the flight path of the UAV in real time.
[0003] In related technologies, the flight path planning system obtains a three-dimensional topographic map through a Digital Elevation Model (DEM); and uses the A* algorithm for flight path planning. However, when the flight path planning system performs flight path planning in a field scenario, there is a problem of low flight path planning efficiency and it cannot meet the real-time flight path planning requirements of the UAV system. Summary of the Invention
[0004] The present application provides a flight path planning method, device, storage medium, and program product to achieve the effect of improving flight path planning efficiency.
[0005] In a first aspect, the present application provides a flight path planning method, including:
[0006] Obtain a terrain model based on a regular grid corresponding to a target area of a flight path to be planned, where nodes correspond to the regular grids in the terrain model;
[0007] Based on the terrain model, determine a plurality of reachable nodes included in the surrounding nodes of a set moving pane corresponding to the current flight node according to whether there are surface obstacles;
[0008] Determine the slope difference between the current flight node and the reachable nodes, and determine the first slope cost of the reachable nodes according to the slope difference;
[0009] Determine the first distance cost of the reachable nodes according to the planar distance between the current flight node and the reachable nodes and the reachable coefficient corresponding to the reachable nodes;
[0010] Determine the total cost value corresponding to the reachable nodes according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost, where the second distance cost represents the planar distance from the current flight node to the end point of the flight path, and the second slope cost represents the slope from the current flight node to the end point of the flight path;
[0011] Among multiple reachable nodes, the reachable node corresponding to the minimum total cost is used as the next flight path node to obtain the planned flight path corresponding to the target area.
[0012] In a possible implementation, determining the first slope cost of a reachable node according to the slope difference includes:
[0013] Substituting the slope difference into the slope difference cost function to obtain the first slope cost of the reachable node, where the slope difference cost function is a set exponential function.
[0014] In a possible implementation, determining the slope difference between the current flight node and the reachable node includes:
[0015] Determining the sum of the squares of the elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving pane corresponding to the reachable node;
[0016] Taking the square root of the sum of the squares and then taking the arctangent to obtain the first grid slope of the reachable node;
[0017] Determining the slope difference between the current flight node and the reachable node according to the first grid slope and the second grid slope of the current flight node.
[0018] In a possible implementation, determining the first distance cost of a reachable node according to the planar distance between the current flight node and the reachable node and the reachable coefficient corresponding to the reachable node includes:
[0019] Based on the terrain model, determining the planar distance between the current flight node and the reachable node;
[0020] Mapping the landform of the reachable node to a set landform value range to obtain the reachable coefficient of the reachable node, where the reachable coefficient is negatively correlated with the landform passage cost;
[0021] Determining the planar distance cost between the current flight node and the reachable node according to the slope value, the reachable coefficient, and the planar distance;
[0022] Determining the sum of the squares of the planar distance cost and the elevation difference between the current flight node and the reachable node;
[0023] Taking the square root of the sum of the squares to obtain the first distance cost of the reachable node.
[0024] In a possible implementation, determining the total cost value corresponding to the reachable node according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost includes:
[0025] Based on the terrain model of the specification grid, determining the Manhattan distance between the start point and the end point of the flight path, and the horizontal and vertical distances of the target area;
[0026] Based on a preset weight range, determine a first weight according to the Manhattan distance and the horizontal and vertical distances.
[0027] Determine the sum of the first slope cost, the first distance cost, and the cost from the current node to the starting point of the track as a first intermediate value, and determine the sum of the second distance cost and the second slope cost as a second intermediate value.
[0028] Determine the difference between 1 and the first weight.
[0029] Multiply the difference by the first intermediate value, and then add the product obtained by multiplying the first weight by the second intermediate value to obtain the total cost value corresponding to the reachable node.
[0030] In a possible implementation manner, after determining the first weight, it further includes:
[0031] Based on a weight adjustment function, obtain a weight adjustment value of the first weight according to the search depth, and the weight adjustment function reflects that the weight adjustment value increases as the search depth increases.
[0032] Determine the difference between the first weight and the weight adjustment value as the adjusted first weight.
[0033] Correspondingly, determining the difference between 1 and the first weight includes: determining the difference between 1 and the adjusted first weight.
[0034] In a possible implementation manner, obtaining a terrain model based on a regular grid corresponding to the target area of the track to be planned includes:
[0035] Read the digital elevation model (DEM) data of the target area of the track to be planned.
[0036] Based on the DEM data, perform terrain modeling on the target area to obtain a terrain model based on a regular grid corresponding to the target area.
[0037] In a second aspect, the present application provides a track planning device, including:
[0038] An acquisition module, configured to acquire a terrain model based on a regular grid corresponding to the target area of the track to be planned, and nodes correspond to the regular grids in the terrain model.
[0039] A processing module, configured to determine, based on a terrain model and whether there are surface obstacles, a plurality of reachable nodes included in the surrounding nodes of a set moving pane corresponding to the current flight node; determine the slope difference between the current flight node and the reachable nodes, and determine the first slope cost of the reachable nodes according to the slope difference; determine the first distance cost of the reachable nodes according to the planar distance between the current flight node and the reachable nodes and the reach coefficient corresponding to the reachable nodes; determine the total cost value corresponding to the reachable nodes according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost, where the second distance cost represents the planar distance from the current flight node to the end point of the flight path, and the second slope cost represents the slope from the current flight node to the end point of the flight path.
[0040] A planning module, configured to use the reachable node corresponding to the minimum total cost value among the plurality of reachable nodes as the next flight path node to obtain the planned flight path corresponding to the target area.
[0041] In a possible implementation, the processing module is configured to:
[0042] Substitute the slope difference into a slope difference cost function to obtain the first slope cost of the reachable nodes, where the slope difference cost function is a set exponential function.
[0043] In a possible implementation, the processing module is further configured to:
[0044] Determine the sum of the squares of the elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving pane corresponding to the reachable nodes.
[0045] Take the square root of the sum of the squares and then take the arctangent to obtain the first grid slope of the reachable nodes.
[0046] Determine the slope difference between the current flight node and the reachable nodes according to the first grid slope and the second grid slope of the current flight node.
[0047] In a possible implementation, the processing module is further configured to:
[0048] Based on the terrain model, determine the planar distance between the current flight node and the reachable nodes.
[0049] Map the landform of the reachable nodes to a set landform value range to obtain the reach coefficient of the reachable nodes, where the reach coefficient is negatively correlated with the landform passage cost.
[0050] Determine the planar distance cost between the current flight node and the reachable nodes according to the slope value, the reach coefficient, and the planar distance.
[0051] Determine the sum of the squares of the planar distance cost and the elevation difference between the current flight node and the reachable nodes.
[0052] Taking the square root of the sum of squares to obtain the first distance cost of reachable nodes.
[0053] In one possible implementation, the processing module is further configured to:
[0054] Based on the terrain model of the specification grid, determine the Manhattan distance between the starting point and the ending point of the flight path, and the horizontal and vertical distances of the target area;
[0055] Based on a preset weight range, determine the first weight according to the Manhattan distance and the horizontal and vertical distances;
[0056] Determine the sum of the first slope cost, the first distance cost, and the cost of the current node to the starting point of the flight path as the first intermediate value, and determine the sum of the second distance cost and the second slope cost as the second intermediate value;
[0057] Determine the difference between 1 and the first weight;
[0058] Multiply the difference by the first intermediate value, and then add the product obtained by multiplying the first weight by the second intermediate value to obtain the total cost value corresponding to the reachable node.
[0059] In one possible implementation, after determining the first weight, it further includes:
[0060] Based on the weight adjustment function, obtain the weight adjustment value of the first weight according to the search depth, and the weight adjustment function reflects that the weight adjustment value increases as the search depth increases;
[0061] Determine the difference between the first weight and the weight adjustment value as the adjusted first weight;
[0062] Correspondingly, determining the difference between 1 and the first weight includes: determining the difference between 1 and the adjusted first weight.
[0063] In one possible implementation, the acquisition module is further configured to:
[0064] Read the digital elevation model (DEM) data of the target area of the flight path to be planned;
[0065] Based on the DEM data, perform terrain modeling on the target area to obtain the terrain model of the target area corresponding to the specification grid.
[0066] In a third aspect, the present application provides an electronic device, including: a memory, a processor;
[0067] The memory stores computer-executable instructions;
[0068] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0069] Fourthly, the present application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above first aspect and / or various possible implementation manners of the first aspect when executed by a processor.
[0070] Fifthly, the present application provides a computer program product including a computer program, which implements the above first aspect and / or various possible implementation manners of the first aspect when executed by a processor.
[0071] The trajectory planning method, device, storage medium and program product provided by the present application obtain a terrain model based on a specification grid of a target area, screen reachable nodes of the current flight node according to surface obstacles, and then determine the first slope cost of the reachable nodes in combination with the slope difference to preferentially select a trajectory with a gentle slope, improve flight safety and accelerate algorithm convergence. At the same time, considering the planar distance of the path and the reachability of the nodes, the first distance cost is determined to enhance the flexibility of trajectory planning and the smoothness of the path, and improve the calculation efficiency. Finally, the total cost value of the reachable nodes is determined by synthesizing various costs, and the reachable node with the minimum total cost value is selected as the next trajectory node, so as to efficiently and accurately plan an optimal trajectory that is short, safe and stable during flight in complex terrain, ensure the flight safety and efficiency of the unmanned aerial vehicle or aircraft, and realize the rapid and accurate planning of the trajectory. Description of the Drawings
[0072] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0073] Figure 1 It is a schematic diagram of the scenario of the trajectory planning method provided by the embodiment of the present application;
[0074] Figure 2 It is a schematic flowchart of the trajectory planning method provided by the embodiment of the present application;
[0075] Figure 3 It is a schematic structural diagram of the trajectory planning device provided by the embodiment of the present application;
[0076] Figure 4 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application.
[0077] Through the above drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0078] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0079] With the rapid progress of computer and electronic navigation technologies, unmanned aerial vehicle (UAV) systems have given rise to a new technical field of trajectory planning systems. Trajectory planning systems allow researchers to directly plan routes using electronic maps, quickly and conveniently obtain geographical information, significantly shorten the route planning time, and can track the UAV trajectory in real time. In the electronic map model, DEM is widely used in path planning because it can quickly generate three-dimensional images, line-of-sight maps, contour maps, and shaded relief maps.
[0080] In the related art, applying the A* algorithm to DEM data path planning is particularly common as an efficient heuristic path search algorithm with a small search space. However, when applying the A* algorithm in the wild scenario, the following problems exist: (1) how to select appropriate terrain factors for trajectory evaluation; (2) how to adjust an appropriate evaluation function to adapt to the change in the DEM data resolution; (3) how to improve the efficiency of the A* algorithm for trajectory evaluation when the DEM data volume increases exponentially.
[0081] The trajectory planning method provided by the embodiments of the present application aims to find the optimal trajectory path from the trajectory starting point to the trajectory ending point. In the DEM data, the node cost is evaluated based on the distance cost and the slope cost, and an evaluation function is constructed for trajectory planning. Since the value of the distance cost varies greatly and is affected by grid reachability, while the value range of the slope cost is [0, 90], and the two have different dimensions and a large difference in value ranges. Therefore, according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost, the total cost value corresponding to the reachable node is determined to achieve a dual consideration of the distance cost and the slope cost.
[0082] Screen reachable nodes of the current flight node through surface obstacles, exclude impassable paths, and ensure the feasibility of the planned flight path. Then, determine the first slope cost of reachable nodes in combination with the slope difference, and preferentially select flight paths with gentle slopes, thereby reducing risks during flight, improving flight safety, helping to find the optimal solution faster, and accelerating the convergence speed. Determine the first distance cost based on the planar distance of the path and the reachability of nodes, enhance the flexibility of flight path planning, and be able to adjust the flight path selection strategy according to actual needs. Determine the total cost value of reachable nodes by comprehensively considering various costs, and select the reachable node with the smallest total cost value as the next flight path node, which can efficiently and accurately plan the optimal flight path that is short, safe, and stable during flight in complex terrain, and achieve fast and accurate flight path planning.
[0083] Figure 1 It is a schematic diagram of the scenario of the flight path planning method provided by the embodiment of the present application. As Figure 1 shown, the specific application scenario of the present application includes an aircraft 11, a surface environment 12, and a control center 13. Specifically:
[0084] The aircraft 11 is equipped with a scanning device 110. The scanning device 110 can scan the surface environment 12 in real time or on demand to obtain surface information data. The aircraft 11 constructs a terrain model based on a regular grid according to the surface information data, and determines the optimal planned flight path by combining the terrain model and the flight mission through the flight path planning method. The scanning device 110 can also scan continuously or regularly to update the surface information data, ensure the accuracy of the terrain model, and enable the aircraft 11 to dynamically adjust the flight path, improving flight safety and efficiency.
[0085] In a possible implementation manner, the aircraft 11 is also equipped with a communication device 111. The communication device 111 can communicate with the control center 13. The aircraft 11 sends the obtained surface information data to the control center 13 through the communication device 111. The control center 13 constructs a terrain model based on a regular grid according to the surface information data, combines the flight mission, and calculates the optimal flight path through the flight path planning method. The control center 13 can send the optimal flight path to the aircraft 11 through the communication device 111. After receiving the optimal planned flight path, the aircraft 11 flies according to the optimal planned flight path to ensure the safety and stability of flight.
[0086] Optionally, when the control center 13 is used for trajectory planning, the number of aircraft 11 can be multiple. At this time, the control center 13 receives surface information data from multiple aircraft 11, and optimizes and updates the terrain model based on the specification grid by summarizing the surface information data of different areas scanned by these multiple aircraft 11, so that the obtained terrain model can more accurately and comprehensively reflect the characteristics of the surface environment. The control center 13 combines the optimized terrain model and the flight tasks of multiple aircraft 11, and calculates the optimal planned trajectories of multiple aircraft 11 through the trajectory planning method. Finally, the control center 13 sends the optimal trajectories to the corresponding aircraft 11 in real time or on demand through the communication device 111 to guide their flight.
[0087] The following uses specific embodiments to elaborate in detail on the technical solution of the present application and how the technical solution of the present application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0088] Figure 2 It is a schematic flowchart of the trajectory planning method provided by the embodiment of the present application. As Figure 2 shown, the method includes:
[0089] S201. Obtain a terrain model based on a specification grid corresponding to the target area of the trajectory to be planned, and nodes correspond to the regular grids in the terrain model.
[0090] The specification grid is to divide the target area into a series of grid units of the same size or following certain rules, and each grid unit can be regarded as a node. Through the relationship between nodes, the terrain characteristics of the target area are simulated and represented to obtain a terrain model.
[0091] In this step, first determine the target area of the trajectory to be planned, and then use a scanning device or existing data to obtain the terrain model based on the specification grid of this area. Among them, the terrain model based on the specification grid is obtained by dividing the target area into standardized grid units and assigning a node to each grid unit. Among them, the terrain feature information corresponding to the grid unit is stored in the node. The terrain feature information includes node coordinates elevation value and landform i. The size of the grid can be customized according to actual operation requirements. The nodes and grid units in the terrain model based on the specification grid provide detailed terrain information for trajectory planning, so that the planned trajectory can better fit the actual terrain, avoid collisions and obstacles, and improve the safety and efficiency of aircraft flight.
[0092] S202. Based on the terrain model, determine multiple reachable nodes included in the surrounding nodes of the set moving pane corresponding to the current flight node according to whether there are surface obstacles.
[0093] The moving pane is an area set around the current flight node, used to limit and determine the possible range of movement of the aircraft in the next step. In trajectory planning, the passability of the trajectory is mainly evaluated by surface obstacles. Based on the terrain model, simulate impassable surface obstacles such as lakes, rivers, and swamps, and extract surface obstacle identifiers and their coordinates from the corresponding DEM data. According to the moving pane, determine whether there are surface obstacles in the surrounding nodes.
[0094] Based on the terrain model, determine the current flight node of the aircraft. The current flight node is the node corresponding to the current position of the aircraft in the terrain model. Around the current flight node, according to the set moving pane, determine the possible range of movement of the aircraft in the next step. In the possible range of movement, check each surrounding node to determine whether there are surface obstacles, such as mountains, buildings, etc. Finally, determine the surrounding nodes without surface obstacles as reachable nodes. The reachable nodes are the surrounding nodes that the aircraft can safely reach in the next step.
[0095] Optionally, if it is determined that a certain surrounding node is a surface obstacle according to the information of the moving pane and the surface obstacle, directly add this node to the CLOSED list.
[0096] Optionally, according to the terrain feature information of the current flight node and the surrounding nodes, determine the slope values of the current flight node and the surrounding nodes. If the slope value is within the range of the slope threshold (-B, B), it is considered that this surrounding node is directly reachable in terms of slope, that is, the current flight node can reach this surrounding node after one step length. Further, if it is determined that a certain surrounding node is a reachable node through surface obstacles, but the slope value between this surrounding node and the current flight node is not within the range of the slope threshold (-B, B), the direct reachability of this surrounding node needs to be re-evaluated, and this surrounding node should not be used as a reachable node for the current trajectory planning.
[0097] S203. Determine the slope difference between the current flight node and the reachable nodes, and determine the first slope cost of the reachable nodes according to the slope difference.
[0098] First, determine the position information of the current flight node n-1 and the reachable node n. Use the position information to calculate the slope difference between the current flight node and the reachable node. The slope difference refers to the difference in the rate of change or inclination in height between the current flight node and the reachable node. Then, determine the first slope cost of each reachable node according to the slope difference. 。The first slope cost is a quantitative indicator of reachable nodes, used to evaluate the pros and cons of selecting a reachable node as the next track node, which helps identify potential high-risk areas and high-cost areas, thereby reducing safety hazards and flight costs during flight.
[0099] S204. Determine the first distance cost of the reachable node according to the horizontal distance between the current flight node and the reachable node and the reachable coefficient corresponding to the reachable node.
[0100] The horizontal distance is the straight-line distance between the current flight node and the reachable node on the horizontal plane. The reachable coefficient reflects the difficulty of reaching the reachable node from the current node and is usually related to the terrain of the reachable node.
[0101] Obtain the terrain feature information of the current flight node n - 1 and the reachable node n based on the terrain model. Based on the coordinate information in the terrain feature information, determine the horizontal distance between the current flight node and each reachable node through the distance calculation formula. 。Determine the reachable coefficient corresponding to the reachable node based on the terrain in the terrain feature information. 。Finally, combine the horizontal distance with the reachable coefficient to determine the first distance cost of the reachable node. The lower the first distance cost, the better the path from the current node to the reachable node. Through the first distance cost for track planning, it can help select the shortest or most feasible flight path, reducing flight time and energy consumption. Introducing the reachable coefficient can accurately evaluate the reachability of different reachable nodes, thus avoiding selecting nodes that are difficult to reach due to terrain, meteorological and other conditions, ensuring the smooth progress of the flight process.
[0102] S205. Determine the total cost value corresponding to the reachable node according to the first slope cost, the first distance cost, the second distance cost and the second slope cost. The second distance cost represents the horizontal distance from the current flight node to the track end point, and the second slope cost represents the slope from the current flight node to the track end point.
[0103] The total cost value is used to comprehensively evaluate the pros and cons of the reachable node. The second distance cost represents the horizontal distance from the current flight node to the track end point, measuring the horizontal distance cost that still needs to be flown from the current position to the track end point. The second slope cost measures the slope change from the current flight node to the track end point. Through the second distance cost and the second slope cost, it is possible to predict the slopes and corresponding energy consumption that may be encountered during flight.
[0104] In this step, determine the cost from the track start point to the reachable node according to the sum of the first slope cost and the first distance cost. 。
[0105] Determine the current flight node to the track end point The first distance cost is:
[0106]
[0107] Determine the current flight node to the end point of the flight path The first slope cost is:
[0108]
[0109] where represents the slope value of the reachable node n to the end point end of the flight path; represents the elevation value of the reachable node n; represents the elevation value of the end point end of the flight path. As the flight path planning approaches the end point of the flight path, the value of gradually decreases. At this time, can effectively adjust the size of to avoid too low algorithm efficiency.
[0110] According to the sum of the second distance cost and the second slope cost , determine the cost of the current flight node to the end point of the flight path .
[0111] After that, according to the cost from the start point of the flight path to the reachable node and the sum of the cost from the current flight node to the end point of the flight path, determine the total cost value corresponding to the reachable node:
[0112]
[0113] By comprehensively considering the direct cost from the current node to the reachable node and the cost from the reachable node to the end point of the flight path, the advantages and disadvantages of different reachable nodes can be evaluated more comprehensively, the optimal flight path can be predicted and selected more accurately, which helps to improve the efficiency, safety and reliability of flight, and reduce flight time and energy consumption.
[0114] S206. Among multiple reachable nodes, use the reachable node corresponding to the minimum total cost value as the next flight path node to obtain the planned flight path corresponding to the target area.
[0115] The planned flight path is a complete flight path from the start point to the end point, composed of a series of reachable nodes with the minimum total cost value.
[0116] According to the total cost values of all reachable nodes, find the reachable node corresponding to the minimum total cost value, and determine this reachable node as the next track node. Add the selected next track node to the planned track, and repeat this process until reaching the target area or meeting other termination conditions, thereby obtaining a complete planned track.
[0117] The track planning method provided by the embodiments of this application accurately understands the terrain features of the target area by obtaining a terrain model based on a regular grid, providing a basis for track planning. By determining reachable nodes, it avoids the aircraft colliding with surface obstacles during movement, improving flight safety. By calculating the slope cost and distance cost, it evaluates the advantages and disadvantages of selecting different reachable nodes as the next track node, thereby selecting the optimal or relatively optimal flight path. Finally, by comprehensively considering the first slope cost, the first distance cost, the second distance cost, and the second slope cost, it more comprehensively evaluates the advantages and disadvantages of different reachable nodes, more accurately predicts and selects the optimal flight path, achieving an efficient, safe and terrain-fitting track planning effect, and achieving the effects of improving flight efficiency, reducing flight time and energy consumption.
[0118] In a possible implementation manner, read the DEM data of the target area of the track to be planned; based on the DEM data, perform terrain modeling on the target area to obtain a terrain model based on a regular grid corresponding to the target area.
[0119] By reading the DEM data of the target area of the track to be planned, the elevation data of each discrete point on the surface within the target area of the track to be planned is extracted. Then, based on the elevation data information, the surface form is abstracted and represented as a series of regularized and standardized grid structures. Finally, based on these grid cells, a terrain model based on a regular grid corresponding to the target area is constructed. The terrain model based on a regular grid can intuitively reflect the terrain features of the target area, such as mountains, rivers, plains, etc., providing detailed and reliable terrain information for subsequent track planning.
[0120] In a possible implementation manner, the embodiments of this application provide a method for determining the slope difference. Figure 2 On the basis of the embodiment, the method for determining the slope difference is described in detail, and this method includes:
[0121] S301: Determine the sum of the squares of the elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving window corresponding to the reachable node.
[0122] The elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving window refer to the change rates of the surface elevation in the east-west direction and the north-south direction within a given moving window. The elevation change rates in the east-west direction and the north-south direction are obtained by calculating the ratio of the elevation difference between adjacent nodes within the window to the distance between them.
[0123] In this step, first, determine the moving pane corresponding to the reachable node, and based on the node information on this moving pane, determine the elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving pane. The elevation change rate of the moving pane in the east-west direction refers to the change rate of the surface elevation in the east-west direction within a given moving pane. The elevation change rate of the moving pane in the north-south direction refers to the change rate of the surface elevation in the north-south direction within a given moving pane. Then, add the squared values of the elevation change rate in the east-west direction and the elevation change rate in the north-south direction to obtain the sum of the squared elevation change rates of the moving pane.
[0124] Optionally, the elevation change rate of the moving pane in the east-west direction and the elevation change rate in the north-south direction can be determined by a third-order inverse distance weighted difference model.
[0125] The third-order inverse distance weighted difference model is a mathematical method for calculating the surface elevation change rate. By determining the position, size, and elevation data points involved in the moving pane. Select three points arranged in the east-west direction within the pane, and based on their elevation values and relative positions, apply the inverse distance weighted difference formula to determine the elevation change rate in the east-west direction. Similarly, select three points arranged in the north-south direction to determine the elevation change rate in the north-south direction.
[0126] Exemplarily, taking node n and a moving pane size of 3×3 as an example, the sum of the squared elevation change rate in the east-west direction and the squared elevation change rate in the north-south direction of the moving pane corresponding to the reachable node is described in detail.
[0127] Determine that the moving pane corresponding to node n is a 3×3 pane centered on node n, and obtain the 3×3 = 9 node information within the pane. Obtain three rows of node information arranged in sequence from north to south, and three columns of node information arranged in sequence from west to east. Based on this, determine that the three nodes in the first row are ; the three nodes in the second row are ; the three nodes in the third row are . Use the slope calculation method of the third-order inverse distance weighted difference model to obtain the elevation change rate in the north-south direction and the elevation change rate in the east-west direction :
[0128]
[0129] where g is the grid spacing, which is the length of a grid in the DEM data. The unit of g is meters and it varies with the resolution of the DEM data. The higher the resolution, the smaller g, which will affect the calculation result of the slope.
[0130] Based on the elevation change rate in the north-south direction and the elevation change rate in the east-west direction , the sum of the squares of the elevation change rates of the moving pane is obtained as .
[0131] S302. Take the square root of the sum of the squares, and then take the arctangent to obtain the first grid slope of the reachable node.
[0132] Take the square root of the sum of the squares of the elevation change rates of the moving pane to obtain the square root value of the elevation. Take the arctangent of the square root value of the elevation to obtain the first grid slope of the reachable node.
[0133] Optionally, use n to represent the reachable node, then the first grid slope of the reachable node is .
[0134] S303. Determine the slope difference between the current flight node and the reachable node according to the first grid slope and the second grid slope of the current flight node.
[0135] The second grid slope is the grid slope of the moving pane corresponding to the current flight node. By determining the sum of the squares of the elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving pane corresponding to the current flight node; take the square root of the sum of the squares, and then take the arctangent to obtain the grid slope of the moving pane corresponding to the current flight node.
[0136] Determine the slope difference between the current flight node and the reachable node according to the difference between the first grid slope and the second grid slope of the current flight node. The magnitude of the slope difference can affect the flight attitude, speed, and required power of the aircraft. By obtaining the slope difference, the stable flight of the aircraft can be ensured and potential terrain obstacles can be avoided.
[0137] Optionally, use n - 1 to represent the current flight node, then the second grid slope of the current flight node n - 1 is . Based on this, determine the slope difference between the current flight node and the reachable node :[[]]
[0138]
[0139] The method for determining the slope difference provided by the embodiment of the present application determines the sum of the squares of the elevation change rates of the movable pane corresponding to the reachable node in the east-west direction and the north-south direction, takes the square root of the sum of the squares and takes the arctangent to obtain the first grid slope of the reachable node, converts the elevation change rate into an actual slope, increases the availability of slope information, and the obtained first grid slope can more detailedly represent the slope information of the reachable node. Finally, the slope difference is determined through the first grid slope and the second grid slope of the current flight node. By obtaining the slope difference, the feasibility and safety of the flight path can be judged more accurately, the stable flight of the aircraft can be ensured, and potential terrain obstacles can be effectively avoided.
[0140] In practical applications, a slope threshold needs to be set to constrain the track path search. Since the slope cost may be much smaller than the distance cost, it is necessary to balance the influence of the slope cost and the distance cost on the evaluation result. The distance cost and the slope cost should satisfy in g(n): when the slope ≥ , the slope cost increases sharply and exceeds the distance cost, and g(n) is mainly affected by the slope cost; when the slope < , the slope cost increases slowly and is less than the distance cost, and g(n) is mainly affected by the distance cost. The exponential function satisfies the above properties, so an exponential function is used to construct the slope difference cost function.
[0141] In a possible implementation, the slope difference is substituted into the slope difference cost function to obtain the first slope cost of the reachable node, and the slope difference cost function is a set exponential function.
[0142] The slope difference cost function is an exponential function used to evaluate the impact of terrain slope changes on path planning, and the corresponding first slope cost is determined according to the slope difference. Optionally, the slope difference cost function can be an exponential function with e as the base and the slope difference as the exponent.
[0143] Optionally, substitute the slope difference into the slope difference cost function to obtain the first slope cost :
[0144]
[0145] To balance the influence of distance and slope on the path planning result, a slope threshold will be set. When the slope is greater than or equal to the slope threshold, the importance of the first slope cost to the track planning will increase sharply, making the influence of the first slope cost on the total cost value greater than the influence of the distance cost on the total cost value. When the slope is less than the slope threshold, the influence of the slope function value on the total cost value increases slowly, and the distance becomes the main factor affecting the total cost value. Since the exponential function can meet this requirement, it is selected as the appropriate form for constructing the slope function.
[0146] In a possible implementation manner, an embodiment of the present application provides a first cost determination method. Based on Figure 2 the embodiment, the method for determining the first cost is described in detail, including:
[0147] S401. Based on the terrain model, determine the planar distance between the current flight node and the reachable nodes.
[0148] Based on the terrain model, determine the terrain feature information of the current flight node and the reachable nodes. According to the coordinates of the current flight node and the coordinates of the reachable nodes, use the planar distance determination formula to determine the planar distance between the current flight node and the reachable nodes. By calculating the planar distance, basic data for subsequent path planning is provided. The calculation of the planar distance ignores the height and slope of the terrain, enabling the path planning to more quickly screen out potential reachable nodes in the preliminary stage and improving the planning efficiency.
[0149] Optionally, substitute the coordinates of the current flight node and the coordinates of the reachable nodes into the planar distance determination formula to obtain the planar distance between the current flight node and the reachable nodes :
[0150]
[0151] wherein, R is the earth radius constant, R = 6371393 m.
[0152] Since the planar distance cost between the current flight node and the reachable nodes is affected by the reachability between the two points and the traversal cost, it is necessary to improve the planar distance calculation formula.
[0153] S402. Map the landform of the reachable node to the set landform value range to obtain the reachability coefficient of the reachable node, and the reachability coefficient is negatively correlated with the landform passage cost.
[0154] The landform value range quantifies the complexity of the landform into a comparable numerical range, facilitating subsequent calculation and analysis. The reachability coefficient represents the cost required to pass through on landform i, and the value range is [0, 10]. When the cost is 0, landform i is considered an inaccessible landform
[0155] Optionally, map the landform i of the reachable node to the set landform value range to obtain the reachability coefficient , and the reachability coefficient is negatively correlated with the landform passage cost. GE(n) represents the landform value of the node, mainly used to indicate what kind of landform the node belongs to. The landforms include mountains, plains, hills, and basins.
[0156] S403. Determine the planar distance cost between the current flight node and the reachable node based on the slope value, reachability coefficient, and planar distance.
[0157] Based on the reachability coefficient and planar distance, determine the planar distance cost between the current flight node and the reachable node through the planar distance cost formula. Determining the planar distance cost by introducing the reachability coefficient and planar distance helps to select the optimal path among multiple reachable nodes and improve the accuracy of path planning.
[0158] The slope value between the current flight node and the reachable node is:
[0159]
[0160] where B is defined as the slope tolerance. When is not within the range of (-B, B), it is considered that the current flight node and the reachable node are not directly reachable. If and only if and are satisfied, the current flight node and the reachable node are directly reachable. If the current flight node and the reachable node are not directly reachable, then other nodes are needed to form a flight path.
[0161] The planar distance cost between the current flight node and the reachable node is:
[0162]
[0163] S404. Determine the sum of the squares of the planar distance cost and the elevation difference between the current flight node and the reachable node.
[0164] The elevation difference refers to the difference in elevation values between the current flight node and the reachable node. Accumulate the square of the planar distance cost and the square of the elevation difference between the current flight node and the reachable node to obtain the sum of squares.
[0165] Optionally, the elevation value of the current flight node is , the elevation value of the reachable node is , the elevation difference between the current flight node and the reachable node is , and the sum of the squares of the elevation difference is .
[0166] S405. Take the square root of the sum of squares to obtain the first distance cost of the reachable node.
[0167] The first distance cost of the reachable node is:
[0168]
[0169] The first distance cost reflects the ease of passage in the horizontal direction through the planar distance cost; by considering the elevation difference, it takes into account the passage obstacles in the vertical direction, and can comprehensively evaluate the track distance cost from the current flight node to the reachable node.
[0170] In the first cost determination method provided by the embodiments of the present application, by mapping the landform of the reachable node to a set landform value range, the reachable coefficient of the reachable node is obtained; according to the reachable coefficient and the planar distance, the planar distance cost is determined. According to the planar distance cost and the elevation difference between the current flight node and the reachable node, the first distance cost of the reachable node is obtained, comprehensively evaluating the distance cost of the track from the current flight node to the reachable node, and providing an accurate and intuitive basis for path selection.
[0171] As the resolution of DEM data increases or the search path distance increases, the value of h(n) may gradually decrease, resulting in a decrease in algorithm efficiency. During the search process, when approaching the end point step by step from the starting point, the values of g(n) and h(n) change dynamically. In order to maintain the balance of the influence of these two function values in the evaluation result and improve the search efficiency, it is necessary to dynamically adjust the weights of g(n) and h(n).
[0172] In the initial stage of trajectory planning, due to the relatively shallow search depth, the value of h(n) is relatively small. Therefore, the role of h(n) in the evaluation can be enhanced by increasing its weight. As the search depth gradually increases, the weight of h(n) should be gradually reduced until the weights of g(n) and h(n) are equal. At this time, the influence of g(n) and h(n) on the evaluation result reaches a balance, which helps to find a suitable path and ensures that the search process remains efficient. Based on this, a method for determining the total cost value corresponding to a reachable node is proposed.
[0173] In a possible implementation manner, the embodiments of the present application provide a method for determining the total cost value corresponding to a reachable node. Figure 2 On the basis of the embodiments, the method for determining the total cost value corresponding to a reachable node is described in detail, and the method includes:
[0174] S501. Based on the terrain model of the specification grid, determine the Manhattan distance between the track starting point and the track ending point , and the horizontal and vertical distances of the target area .
[0175] S502. Based on a preset weight range, determine the first weight according to the Manhattan distance and the horizontal and vertical distances.
[0176] The preset weight range includes the upper bound b and the lower bound c of the initial weight. According to the Manhattan distance , the horizontal and vertical distances , the upper bound b and the lower bound c, determine the first weight :
[0177]
[0178] Among them, , the value ranges of b and c are [0, 1]
[0179] S503. Determine that the sum of the first slope cost, the first distance cost, and the cost from the current node to the track start point is the first intermediate value, and determine that the sum of the second distance cost and the second slope cost is the second intermediate value.
[0180] Determine the first slope cost and the first distance cost and the cost from the current node to the track start point The sum is the first intermediate value :
[0181]
[0182] Among them, can be obtained from the historical track. If the current node is the track start point, then .
[0183] Determine the second distance cost and the second slope cost The sum is the second intermediate value :
[0184]
[0185] S504. Determine the difference between 1 and the first weight.
[0186] Determine the difference between 1 and the first weight is .
[0187] S505. Multiply the difference by the first intermediate value, and then add the product obtained by multiplying the first weight by the second intermediate value to obtain the total cost value corresponding to the reachable node.
[0188] In this step, multiply the difference by the first intermediate value , and then add the product obtained by multiplying the first weight by the second intermediate value to obtain the total cost value corresponding to the reachable node :
[0189]
[0190] This total cost value can also be expressed as:
[0191]
[0192] Optionally, when is , at this time, for it is concerned and have the same weight, so it can be considered that the importance of the two is equivalent. Obtain:
[0193] The method for determining the total cost value corresponding to the reachable node provided by the embodiment of the present application flexibly calculates the total cost value of the node by combining the Manhattan distance, the horizontal and vertical distances, and the preset weight range. This method comprehensively considers the current cost from the starting point to the current node and the future cost from the current node to the end point, and adjusts the weight to balance the proportion of the two in the total cost value, thereby optimizing the selection of the flight path.
[0194] In a possible implementation manner, after step S502 determines the first weight, it may further include:
[0195] S601. Based on the weight adjustment function, obtain the weight adjustment value of the first weight according to the search depth, and the weight adjustment function reflects that the weight adjustment value increases as the search depth increases.
[0196] The weight adjustment function is a mathematical function used to dynamically adjust the first weight according to the search depth. According to the search depth of the reachable node n , obtain the weight adjustment value of the first weight . Among them, the larger the search depth , the larger the weight adjustment value
[0197] S602. Determine the difference between the first weight and the weight adjustment value as the adjusted first weight.
[0198] Determine the first weight and the weight adjustment value The difference is the adjusted first weight. As the search depth increases, the first weight gradually decreases to maintain the balance of h(n) and g(n) for the algorithm.
[0199] S603. Correspondingly, determine the difference between 1 and the first weight, including: determining the difference between 1 and the adjusted first weight.
[0200] Determine the difference between 1 and the adjusted first weight as .
[0201] At this time, the total cost value corresponding to the reachable node based on the adjusted first weight is:
[0202]
[0203] Figure 3 This is a schematic structural diagram of the trajectory planning device provided by an embodiment of the present application. As Figure 3 shown, the trajectory planning device 30 provided in this embodiment includes:
[0204] An acquisition module 301, configured to acquire a terrain model based on a regular grid corresponding to a target area of a to-be-planned trajectory, where nodes correspond to regular grids in the terrain model;
[0205] A processing module 302, configured to determine, based on the terrain model and whether there is a surface obstacle, a plurality of reachable nodes included in the surrounding nodes of a set moving pane corresponding to the current flight node; determine the slope difference between the current flight node and the reachable nodes, and determine the first slope cost of the reachable nodes according to the slope difference; determine the first distance cost of the reachable nodes according to the planar distance between the current flight node and the reachable nodes and the reachable coefficient corresponding to the reachable nodes; determine the total cost value corresponding to the reachable nodes according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost, where the second distance cost represents the planar distance from the current flight node to the end point of the trajectory, and the second slope cost represents the slope from the current flight node to the end point of the trajectory;
[0206] A planning module 303, configured to use, among the plurality of reachable nodes, the reachable node corresponding to the minimum total cost value as the next trajectory node, and obtain a planned trajectory corresponding to the target area.
[0207] In a possible implementation manner, the processing module 302 is configured to:
[0208] Substitute the slope difference into a slope difference cost function to obtain the first slope cost of the reachable nodes, where the slope difference cost function is a set exponential function.
[0209] In a possible implementation manner, the processing module 302 is further configured to:
[0210] Determine the sum of the squares of the elevation change rates of the moving pane corresponding to the reachable nodes in the east-west direction and the north-south direction;
[0211] Take the square root of the sum of the squares and then take the arctangent to obtain the first grid slope of the reachable nodes;
[0212] Determine the slope difference between the current flight node and the reachable nodes according to the first grid slope and the second grid slope of the current flight node.
[0213] In a possible implementation manner, the processing module 302 is further configured to:
[0214] Based on the terrain model, determine the planar distance between the current flight node and the reachable nodes;
[0215] Map the landforms of the reachable nodes to a set landform value range to obtain the reachable coefficients of the reachable nodes, where the reachable coefficients are negatively correlated with the landform passage costs;
[0216] Based on the slope value, reachable coefficient, and planar distance, determine the planar distance cost between the current flight node and the reachable nodes;
[0217] Determine the sum of the squares of the planar distance cost and the elevation difference between the current flight node and the reachable nodes;
[0218] Take the square root of the sum of squares to obtain the first distance cost of the reachable nodes.
[0219] In a possible implementation, the processing module 302 is further configured to:
[0220] Based on the terrain model of the specification grid, determine the Manhattan distance between the start point and the end point of the flight path, and the horizontal and vertical distances of the target area;
[0221] Based on a preset weight range, determine the first weight according to the Manhattan distance and the horizontal and vertical distances;
[0222] Determine the sum of the first slope cost, the first distance cost, and the cost from the current node to the start point of the flight path as the first intermediate value, and determine the sum of the second distance cost and the second slope cost as the second intermediate value;
[0223] Determine the difference between 1 and the first weight;
[0224] Multiply the difference by the first intermediate value, and then add the product of the first weight and the second intermediate value to obtain the total cost value corresponding to the reachable nodes.
[0225] In a possible implementation, after determining the first weight, it further includes:
[0226] Based on the weight adjustment function, obtain the weight adjustment value of the first weight according to the search depth, where the weight adjustment function reflects that the weight adjustment value increases as the search depth increases;
[0227] Determine the difference between the first weight and the weight adjustment value as the adjusted first weight;
[0228] Correspondingly, determining the difference between 1 and the first weight includes: determining the difference between 1 and the adjusted first weight.
[0229] In a possible implementation, the acquisition module 301 is further configured to:
[0230] Read the digital elevation model (DEM) data of the target area of the flight path to be planned;
[0231] Based on DEM data, terrain modeling is performed on the target area to obtain a terrain model of the target area corresponding to a regular grid.
[0232] The trajectory planning device provided in this embodiment can execute the method provided in the above method embodiment. The implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.
[0233] Figure 4 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 4 shown, the electronic device 40 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the device 40 further includes a communication component 403. Among them, the processor 401, the memory 402, and the communication component 403 are connected through a bus 404.
[0234] In a specific implementation process, at least one processor 401 executes computer-executable instructions stored in the memory 402, so that at least one processor 401 executes the above method.
[0235] For the specific implementation process of the processor 401, reference can be made to the above method embodiment. The implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.
[0236] In the above embodiment, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0237] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0238] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the accompanying drawings of the embodiments of the present application are not limited to only one bus or one type of bus.
[0239] The embodiments of the present application further provide a computer program product, including a computer program, which implements the above method when executed by a processor.
[0240] The embodiments of the present application further provide a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed, any of the above methods is implemented.
[0241] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a Static Random-Access Memory (SRAM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0242] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0243] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed among each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0244] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0245] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0246] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0247] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0248] Finally, it should be noted that: those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include the common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A trajectory planning method, characterized in that: include: Obtaining a terrain model based on a regular grid corresponding to a target area of a to-be-planned flight path, wherein the regular grid in the terrain model corresponds to nodes; Based on the terrain model, and according to whether there are surface obstacles, determining a plurality of reachable nodes included in the peripheral nodes of the set moving window pane corresponding to the current flight node; Determine the slope difference between the current flight node and the reachable node, and determine the first slope cost of the reachable node based on the slope difference; Determine the first distance cost of the reachable node according to the plane distance between the current flight node and the reachable node and the reachability coefficient corresponding to the reachable node; Determine a total cost value corresponding to a reachable node according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost, wherein the second distance cost represents the plane distance from the current flight node to the end point of the track, and the second slope cost represents the slope from the current flight node to the end point of the track; Among multiple reachable nodes, a reachable node corresponding to a minimum total cost value is used as a next track node to obtain a planned track corresponding to the target area.
2. The trajectory planning method according to claim 1, characterized in that: Determining the first slope cost of the reachable node according to the slope difference includes: Substitute the slope difference into the slope difference cost function to obtain the first slope cost of the reachable node, where the slope difference cost function is a set exponential function.
3. The trajectory planning method according to claim 1, characterized in that: Determining the slope difference of the current flight node relative to the reachable node includes: Determine the sum of the squares of the elevation change rate in the east-west direction and the elevation change rate in the north-south direction of the moving pane corresponding to the reachable node; Take the square root of the sum of squares and then take the inverse tangent to get the first grid slope of the reachable node; The slope difference of the current flight node relative to the reachable node is determined according to the first grid slope and the second grid slope of the current flight node.
4. The method for trajectory planning according to any one of claims 1 to 3, characterized in that: The determining, according to the plane distance between the current flight node and the reachable node and the reachability coefficient corresponding to the reachable node, a first distance cost of the reachable node includes: Based on the terrain model, determining the plane distance between the current flight node and the reachable node; Map the topography of the reachable node to the set topography value range to obtain the reachability coefficient of the reachable node. The reachability coefficient is negatively correlated with the topography travel cost. Determine the plane distance cost between the current flight node and the reachable node according to the slope value, the reachability coefficient and the plane distance; Determine the plane distance cost and the sum of the squares of the elevation differences of the current flight node relative to the reachable nodes; Take the square root of the sum of squares to get the first distance cost of the reachable node.
5. The method for trajectory planning according to any one of claims 1 to 3, characterized in that: The determining of the total cost corresponding to the reachable node according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost includes: Determine the Manhattan distance between the start point and the end point of the track and the horizontal and vertical distances of the target area based on the terrain model of the standard grid; Based on a preset weight range, determining a first weight according to the Manhattan distance and the horizontal and vertical distances; Determine the sum of the first slope cost, the first distance cost and the cost from the current node to the starting point of the track as a first intermediate value, and determine the sum of the second distance cost and the second slope cost as a second intermediate value; Determine a difference between 1 and the first weight; The difference is multiplied by the first intermediate value, and then the product obtained by multiplying the first weight by the second intermediate value is added to obtain a total cost value corresponding to the reachable node.
6. The trajectory planning method according to claim 5, characterized in that: After determining the first weight, the following steps are also included: Obtaining a weight adjustment value of the first weight according to the search depth based on a weight adjustment function, wherein the weight adjustment function reflects that the weight adjustment value increases as the search depth increases; Determine the difference between the first weight and the weight adjustment value as the adjusted first weight; Correspondingly, determining the difference between 1 and the first weight includes: determining the difference between 1 and the adjusted first weight.
7. The method for trajectory planning according to any one of claims 1 to 3, characterized in that: The step of obtaining a terrain model based on a standard grid corresponding to a target area of a to-be-planned track includes: Read the digital elevation model (DEM) data of the target area to be planned; Based on the DEM data, terrain modeling is performed on the target area to obtain a terrain model based on a standard grid corresponding to the target area.
8. A trajectory planning device, characterized in that: include: An acquisition module, used for acquiring a terrain model based on a regular grid corresponding to a target area of a to-be-planned track, wherein the regular grid in the terrain model corresponds to nodes; A processing module, configured to determine, based on the terrain model and according to whether there are surface obstacles, a plurality of reachable nodes included in the peripheral nodes of the set moving window pane corresponding to the current flight node; Determine the slope difference between the current flight node and the reachable node, and determine the first slope cost of the reachable node based on the slope difference; Determine the first distance cost of the reachable node according to the plane distance between the current flight node and the reachable node and the reachability coefficient corresponding to the reachable node; Determine a total cost value corresponding to a reachable node according to the first slope cost, the first distance cost, the second distance cost, and the second slope cost, wherein the second distance cost represents the plane distance from the current flight node to the end point of the track, and the second slope cost represents the slope from the current flight node to the end point of the track; The planning module is used to select a reachable node corresponding to a minimum total cost value as a next track node among multiple reachable nodes, so as to obtain a planned track corresponding to the target area.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.