Complex-terrain-oriented unmanned aerial vehicle true altitude course track smoothing method, system, device and medium
By segmenting and optimizing the flight path of UAVs and dynamically adjusting the flight altitude, the problems of frequent vertical take-off and landing and discontinuous altitude changes in UAV flight path planning in complex terrain environments are solved. This achieves high-precision and high-safety true-altitude flight path planning, and improves the autonomous adaptability and operational efficiency of UAVs in complex terrain.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AEROSPACE AGE LOW AERIAL TECHNOLOGY CO LTD
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies for UAV flight path planning in complex terrain environments suffer from problems such as frequent vertical take-off and landing, discontinuous altitude changes, poor terrain adaptability, insufficient safety, and low computational efficiency, making it difficult to achieve high-precision and high-safety true-altitude flight path planning.
By acquiring two-dimensional flight path data, terrain elevation data, and building top elevation data, segmented processing and height optimization are performed. Using state transition equations and height discretization, a three-dimensional UAV true-altitude flight path is generated, and the flight altitude is dynamically adjusted to adapt to the terrain, ensuring safe distance and smooth transition.
It improves the flight stability and safety of UAVs in complex terrain, reduces energy consumption, enhances autonomous adaptability and operational efficiency, and achieves high-precision flight path planning.
Smart Images

Figure CN121594895B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical fields of unmanned aerial vehicles (UAVs), and in particular to a method, system, device and medium for smoothing the true altitude flight path of UAVs in complex terrain. Background Technology
[0002] With the increasing application of drones in complex terrain environments (such as islands, cities, and mountains), the demand for high-precision and high-safety true-altitude flight path planning is constantly growing. Especially in island environments, the terrain is complex and varied, including steep cliffs and coastlines, undulating hills, and dense man-made facilities (such as wind turbines and communication towers), which places higher demands on the accuracy and adaptability of drone flight path planning.
[0003] One related technology plans the flight path of the UAV based on a fixed altitude, but cannot dynamically adjust the altitude according to changes in terrain and obstacles. Another related technology makes simple altitude adjustments to the flight path based on terrain elevation data. The altitude adjustment strategy is simple but does not take into account three-dimensional space. Yet another related technology performs basic altitude optimization based on terrain and obstacles, and uses linear interpolation or simple curve fitting methods to smooth the altitude. However, it has problems such as too many vertical take-offs and landings and discontinuous altitude changes. Summary of the Invention
[0004] The embodiments of this application aim to at least partially solve one of the technical problems in the related art. To this end, the embodiments of this application propose a method, system, device, and medium for smoothing the true altitude flight path of a UAV in complex terrain, thereby improving adaptability and safety in complex terrain.
[0005] The embodiments of this application provide a method for smoothing the true altitude flight path of a UAV in complex terrain. The method includes: acquiring two-dimensional flight path data, terrain elevation data, building top elevation data, and true altitude flight parameters; segmenting the two-dimensional flight path data based on the terrain elevation data and building top elevation data to obtain multiple initial segment data; calculating the distance between the multiple initial segment data, the two-dimensional flight path data, the terrain elevation data, and the building top elevation data to obtain multiple target segment data; and optimizing the height of the multiple target segment data to obtain a three-dimensional UAV true altitude flight path.
[0006] In some implementations, the true altitude flight path of a 3D UAV is obtained by highly optimizing multiple target segment data, including: acquiring a flyable altitude range, wherein the flyable altitude range is obtained based on true altitude flight parameters, terrain elevation data, and building top elevation data; performing height discretization processing on each target segment data to obtain multiple discrete altitude data corresponding to each target segment data; determining the effective altitude range of each target segment data based on the multiple discrete altitude data corresponding to each target segment data and the flyable altitude range; and obtaining the true altitude flight path of the 3D UAV based on the effective altitude range of each target segment data.
[0007] In some implementations, each target segment data includes first target segment data and second target segment data; based on the effective altitude range of each target segment data, a true altitude flight path for the 3D UAV is obtained, including: establishing a state transition equation, wherein the state transition equation characterizes the functional relationship between the number of adjustments to the first target segment data and the altitude cost, and the altitude cost is the cost from the effective altitude range corresponding to the first target segment data to the effective altitude range corresponding to the second target segment data; and performing altitude optimization on the effective altitude range of each target segment data based on the state transition equation to obtain the true altitude flight path for the 3D UAV.
[0008] In some implementations, the effective altitude range of each target segment data is optimized based on the state transition equation to obtain the true altitude flight path of the 3D UAV. This includes: optimizing the effective altitude range of each target segment data based on the state transition equation to obtain multiple optimal altitude data corresponding to multiple target segment data; determining the target segment data corresponding to the endpoint of the flight path from the multiple target segment data as the designated segment data; and performing backtracking processing on the multiple optimal altitude data based on the designated segment data to obtain the true altitude flight path of the 3D UAV.
[0009] In some implementations, a true-altitude flight path for a 3D UAV is obtained by backtracking multiple optimal height data based on specified segmented data. This includes: using the optimal height data corresponding to the starting position of the last backtracked segment after backtracking the specified segmented data as the flight path starting point; using the optimal height data corresponding to the ending position of the backtracked segment after backtracking the specified segmented data as the segment ending point of the backtracked segment; when the optimal height data corresponding to the backtracked segmented data are different, adding the optimal height data corresponding to each backtracked segment as the segment ending point at the ending position of the backtracked segment; and obtaining the true-altitude flight path for the 3D UAV based on the flight path starting point and the segment ending points.
[0010] In some implementations, the two-dimensional flight path data is segmented based on terrain elevation data and building top elevation data to obtain multiple initial segment data, including: processing the terrain elevation data and building top elevation data to obtain multiple contour surface data; obtaining multiple intersection point data based on the multiple contour surface data and the two-dimensional flight path data; and segmenting the two-dimensional flight path data based on the multiple intersection point data to obtain multiple initial segment data.
[0011] In some implementations, the multiple initial segment data include multiple intersection point data; distance calculations are performed on the multiple initial segment data, two-dimensional flight path data, terrain elevation data, and building top elevation data to obtain multiple target segment data, including: distance calculations are performed on the terrain elevation data and building top elevation data corresponding to the multiple intersection point data of the multiple initial segment data to obtain target point data; and multiple target segment data are obtained based on the target point data.
[0012] This application provides a UAV true altitude flight path smoothing system for complex terrain. The system includes: an acquisition module for acquiring two-dimensional flight path data, terrain elevation data, building top elevation data, and true altitude flight parameters; a segmentation module for segmenting the two-dimensional flight path data based on the terrain elevation data and building top elevation data to obtain multiple initial segment data; a calculation module for performing distance calculations on the multiple initial segment data, the two-dimensional flight path data, the terrain elevation data, and the building top elevation data to obtain multiple target segment data; and an optimization module for performing height optimization on the multiple target segment data to obtain a three-dimensional UAV true altitude flight path.
[0013] An embodiment of this application provides an electronic device, which includes: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by one or more processors, which are executed by one or more processors to cause the one or more processors to implement the steps of the method of any of the above embodiments.
[0014] Embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of any of the above embodiments.
[0015] The above implementation method for smoothing the true-altitude flight path of a UAV in complex terrain includes: acquiring two-dimensional flight path data, terrain elevation data, building top elevation data, and true-altitude flight parameters; segmenting the two-dimensional flight path data based on the terrain elevation data and building top elevation data to obtain multiple initial segment data; calculating the distance between the multiple initial segment data, the two-dimensional flight path data, the terrain elevation data, and the building top elevation data to obtain multiple target segment data; and optimizing the height of the multiple target segment data to obtain the three-dimensional true-altitude flight path of the UAV. By integrating the two-dimensional flight path with terrain and building elevation data, automatic segmentation and smoothing optimization of the true-altitude flight path of the UAV in complex terrain environments is achieved, effectively improving the accuracy and safety of flight path planning. Furthermore, it can dynamically adjust the flight altitude according to terrain undulations and obstacle distribution, significantly reducing the total flight path length and energy consumption caused by vertical take-off and landing while ensuring safe flight distance, thereby enhancing the UAV's autonomous adaptability and overall operational efficiency in complex scenarios. Attached Figure Description
[0016] Figure 1 A flowchart illustrating the method for smoothing the true altitude flight path of an unmanned aerial vehicle (UAV) in complex terrain, provided as an embodiment of this application.
[0017] Figure 2 A schematic diagram of the segmented processing flow of the terrain segmentation module provided in the embodiments of this application;
[0018] Figure 3 A flowchart illustrating the dynamic planning optimization module and the route construction and output module provided for the embodiments of this application;
[0019] Figure 4 A schematic diagram of three-dimensional flight path generation provided for related technologies;
[0020] Figure 5 A schematic diagram of a three-dimensional flight path generated by the UAV true altitude flight path smoothing method for complex terrain provided in the embodiments of this application;
[0021] Figure 6 A block diagram of an electronic device provided for another embodiment of this application. Detailed Implementation
[0022] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0023] With the increasing application of drones in complex terrain environments (such as islands, cities, and mountains), the demand for high-precision and high-safety true-altitude flight path planning is constantly growing. Especially in island environments, the terrain is complex and varied, including steep cliffs and coastlines, undulating hills, and dense man-made facilities (such as wind turbines and communication towers), which places higher demands on the accuracy and adaptability of drone flight path planning.
[0024] Fixed-altitude planning techniques set a fixed altitude for drones to fly, but cannot dynamically adjust the altitude according to terrain changes and obstacles. This can easily lead to safety accidents such as crashing into mountains or buildings in complex terrain environments. Simple altitude adjustment planning techniques make simple altitude adjustments based on terrain elevation data, mainly to generate paths in a two-dimensional plane. They do not adequately consider three-dimensional space, and the altitude adjustment strategy is simple and lacks smoothness processing. Basic altitude optimization planning techniques can perform basic altitude optimization based on terrain and obstacle conditions. They usually use linear interpolation or simple curve fitting methods for altitude smoothing, but they have problems such as too many vertical take-offs and landings and discontinuous altitude changes.
[0025] One related technology proposes a smoothing scheme for the corners of UAV flight paths, which improves the smoothness of the flight path through an inscribed circle model; another related technology proposes a safety detection scheme for UAV flight path planning, which solves the problem of safety detection for manually drawn flight paths; yet another related technology proposes an automatic planning system and method for UAV formation flight paths, which balances flight path length, safety and energy consumption through a multi-objective optimization algorithm.
[0026] However, the aforementioned technologies do not yet have a complete solution specifically for true altitude flight path smoothing in complex terrain environments. In particular, they have significant shortcomings in terrain segmentation processing, dynamic programming optimization, and altitude trajectory smoothing. Specifically, these shortcomings are as follows: (1) Frequent altitude adjustments: When dealing with complex terrain, the UAV needs to perform frequent vertical take-off and landing operations, resulting in poor flight stability, increased energy consumption, and even potential safety accidents. (2) Unsmooth altitude changes: The use of simple linear interpolation or basic curve fitting methods results in discontinuous altitude changes with obvious inflection points, affecting the flight performance and mission execution quality of the UAV. (3) Poor terrain adaptability: When dealing with complex terrain, the UAV needs to perform frequent vertical take-off and landing operations, resulting in poor flight stability and increased energy consumption. (4) Insufficient safety considerations: When performing altitude smoothing, the safety distance requirements with terrain and buildings are often ignored, posing safety hazards. (5) Low computational efficiency: The altitude smoothing algorithms of the aforementioned technologies are usually computationally complex and difficult to meet the needs of real-time planning, especially when dealing with large-scale data. (6) High implementation complexity: The high smoothness algorithm of related technologies is complex to implement and the parameters are difficult to adjust, which is not conducive to engineering application and promotion.
[0027] In view of the shortcomings of the above-mentioned related technologies, the present invention aims to solve the following specific technical problems: (1) How to reduce the number of vertical take-off and landing operations of UAVs: solve the problem of UAVs frequently performing vertical take-off and landing operations in complex terrain environments in related technologies, improve flight stability, reduce energy consumption, and reduce the risk of safety accidents. (2) How to achieve smooth transition of altitude trajectory: solve the problem of discontinuous altitude changes and obvious inflection points in related technologies, and generate a smooth altitude trajectory that conforms to the flight characteristics of UAVs. (3) How to improve terrain adaptability: solve the problem of poor adaptability of related technologies in complex environments such as dense urban building clusters and undulating mountain terrain, and realize the ability to dynamically adjust the altitude trajectory according to terrain features and obstacle distribution. (4) How to ensure safety in the altitude smoothing process: solve the problem of neglecting the safety distance requirement in altitude smoothing processing in related technologies, and ensure that UAVs always maintain a safe distance from terrain and buildings. (5) How to improve computational efficiency: solve the problem of high computational complexity and poor real-time performance of altitude smoothing algorithms in related technologies, realize efficient altitude trajectory smoothing processing, and meet the needs of engineering applications. (6) How to reduce implementation complexity: solve the problems of complex implementation of related technologies and difficulty in parameter adjustment, and provide a highly smooth trajectory solution that is easy to be engineered and promoted.
[0028] Therefore, this application proposes a method for smoothing the true altitude flight path of UAVs in complex terrain. It is a core component of the true altitude flight path planning system and is responsible for three-dimensional height optimization and smoothing after the two-dimensional path is determined. Through terrain segmentation processing and dynamic planning optimization, it achieves efficient, safe and smooth altitude trajectory generation.
[0029] Figure 1 This is a flowchart illustrating a method for smoothing the true altitude flight path of an unmanned aerial vehicle (UAV) in complex terrain, as provided in the embodiments of this application.
[0030] like Figure 1 As shown, the UAV true altitude flight path smoothing method 100 for complex terrain includes, for example, steps S110-S140.
[0031] Step S110: Obtain two-dimensional flight path data, terrain elevation data, building top elevation data, and true altitude flight parameters.
[0032] For example, true altitude flight parameters include minimum permissible true altitude data, maximum permissible true altitude data, etc. Terrain elevation data is used to reflect the ground undulation of the planning area, with a vertical accuracy of less than or equal to 10 meters; building top elevation data is used to reflect the top height information of buildings in the planning area, with a vertical accuracy of less than or equal to 1 meter; and two-dimensional flight path data is flight path data obtained by performing two-dimensional grid coding and path search on the multi-source geographic data corresponding to the planning area.
[0033] Step S120: Based on terrain elevation data and building top elevation data, the two-dimensional flight path data is segmented to obtain multiple initial segment data.
[0034] For example, the terrain elevation data and building top elevation data are cut at preset height intervals to obtain terrain elevation contour data and building top elevation contour data. The two-dimensional flight path data is then segmented based on the intersection of the two-dimensional flight path data with the terrain elevation contour data and building top elevation contour data to obtain multiple initial segment data.
[0035] Step S130: Distance calculations are performed on multiple initial segment data, two-dimensional flight path data, terrain elevation data, and building top elevation data to obtain multiple target segment data.
[0036] For example, the three-dimensional distance between terrain elevation data and the three-dimensional distance between building top elevation data are calculated for the intersection points corresponding to each initial segment data. The terrain elevation data or building top elevation data corresponding to the smallest three-dimensional distance is taken as the segment endpoint corresponding to each initial segment data, thereby obtaining multiple target segment data.
[0037] Step S140: Perform height optimization on multiple target segment data to obtain the true altitude flight path of the 3D UAV.
[0038] For example, altitude optimization includes altitude discretization, calculation of the state transition equation to generate the optimal altitude sequence, and backtracking based on the optimal altitude sequence to obtain the final 3D UAV true altitude flight path. The discretization is performed based on the flyable altitude range (obtained by converting the flightable altitude from true altitude flight parameters to altitude, and by determining the safe range based on terrain elevation data and building top elevation data). By discretizing the flyable altitude range at fixed altitude intervals, multiple discrete altitude data are obtained. For each target segment data, the discrete altitude data are filtered according to the flyable altitude range to obtain the effective altitude range. The state transition equation is adjusted and the cost is calculated based on the effective altitude range of each target segment data to obtain the optimal altitude sequence. Backtracking is performed based on the optimal altitude sequence to obtain the 3D UAV true altitude flight path.
[0039] As can be seen, the UAV true-altitude flight path smoothing method for complex terrain proposed in this application, by integrating two-dimensional flight path data with terrain and building elevation data, achieves automatic segmentation and smoothing optimization of UAV true-altitude flight paths in complex terrain environments, effectively improving the accuracy and safety of flight path planning. Furthermore, it can dynamically adjust flight altitude according to terrain undulations and obstacle distribution, significantly reducing the total flight path length and energy consumption associated with vertical takeoff and landing while ensuring safe flight distances, thereby enhancing the UAV's autonomous adaptability and overall operational efficiency in complex scenarios.
[0040] The embodiments of this application provide a UAV true altitude flight path smoothing system for complex terrain, comprising:
[0041] The acquisition module (data input module) is used to acquire two-dimensional flight path data (latitude and longitude coordinate sequence), terrain elevation data, building top elevation data, and true altitude flight parameters (user settings).
[0042] The segmentation module (terrain segmentation processing module) is used to segment two-dimensional flight path data based on terrain elevation data and building top elevation data to obtain multiple initial segment data (including segmentation processing of the flight path).
[0043] The calculation module (terrain segmentation processing module) is used to perform distance calculations on multiple initial segment data, two-dimensional flight path data, terrain elevation data and building top elevation data to obtain multiple target segment data (including extracting terrain elevation data and building top elevation data for each segment and determining the flyable altitude range of each segment).
[0044] The optimization module (dynamic programming optimization module, flight path construction and output module) is used to perform height optimization on multiple target segment data to obtain the true altitude flight path of the three-dimensional UAV (including discretization of continuous height space, construction of dynamic programming state transition equation, solving the optimal height sequence, minimizing the number of vertical take-off and landing, generating a smooth three-dimensional flight path based on the optimal height sequence, and outputting flight path data in LineString format that meets the flight requirements of the UAV).
[0045] The terrain segmentation module lays the foundation for subsequent dynamic planning and optimization by scientifically and rationally segmenting the two-dimensional flight path.
[0046] In one example, based on terrain elevation data and building top elevation data, the two-dimensional flight path data is segmented to obtain multiple initial segment data, including: processing the terrain elevation data and building top elevation data to obtain multiple contour surface data; obtaining multiple intersection point data based on the multiple contour surface data and the two-dimensional flight path data; and segmenting the two-dimensional flight path data based on the multiple intersection point data to obtain multiple initial segment data.
[0047] Specifically, the data processing includes cutting the terrain elevation data and building top elevation data at preset height intervals to obtain multiple contour surface data, and segmenting the two-dimensional flight path data based on the intersection of the two-dimensional flight path data with the terrain elevation contour surface data and the building top elevation contour surface data to obtain multiple initial segment data.
[0048] For example, contour surface data (with a height interval of 10m) based on terrain elevation data and building top elevation are generated respectively. The intersection points of the two-dimensional flight path with the contour surfaces of terrain elevation and building top elevation are obtained respectively. Here, the intersection point represents the coordinate point on the two-dimensional flight path. The contour surface data of the terrain elevation data or the contour surface data of the building top elevation data corresponding to the point coincides with the two-dimensional flight path. The intersection point of the terrain elevation data and the contour surface is the first intersection point, and the intersection point of the building top elevation data and the contour surface is the second intersection point. The first intersection point and the second intersection point may or may not coincide. The first intersection point and the second intersection point are merged and deduplicated to obtain the final intersection point data. The two-dimensional flight path is segmented according to the final intersection point data to complete the segmentation of the two-dimensional flight path, thereby obtaining multiple initial segment data.
[0049] In one example, multiple initial segment data include multiple intersection point data; distance calculations are performed on multiple initial segment data, two-dimensional flight path data, terrain elevation data, and building top elevation data to obtain multiple target segment data, including: distance calculations are performed on terrain elevation data and building top elevation data based on multiple intersection point data corresponding to multiple initial segment data to obtain target point data; and multiple target segment data are obtained based on the target point data.
[0050] Specifically, an efficient two-pointer algorithm is used to merge terrain elevation data and building top elevation data. Two pointers are initialized to point to the starting positions of the terrain elevation data and building top elevation data respectively (e.g., the terrain elevation data corresponding to intersection point a and the building top elevation data corresponding to intersection point a). The cumulative distance between the data points pointed to by the two pointers is compared, and the point with the smaller distance is selected as the endpoint (target point data) of the current segment (initial segment data), thereby obtaining the target segment data.
[0051] For example, for each initial segment data, the three-dimensional distance between terrain elevation data and the three-dimensional distance between building top elevation data are calculated respectively. The terrain elevation data or building top elevation data corresponding to the smallest three-dimensional distance is taken as the segment endpoint corresponding to each initial segment data, thereby obtaining multiple target segment data.
[0052] Specifically, all coordinate points (intersection data) of the two-dimensional flight path are extracted, and the two-dimensional coordinates, elevation (terrain elevation data, building top elevation data) and cumulative distance information of each point (intersection data) are recorded. Based on the terrain elevation data and building top elevation data corresponding to each intersection data, the three-dimensional distance between adjacent intersection points is calculated (including the three-dimensional distance between the terrain elevation data corresponding to adjacent intersection points and the three-dimensional distance between the building top elevation data corresponding to adjacent intersection points). The minimum distance between the three-dimensional distances between the terrain elevation data and the three-dimensional distances between the building top elevation data is taken as the three-dimensional distance between adjacent intersection points. This process is repeated to obtain the three-dimensional distance between multiple intersection data, and the cumulative distance information is obtained by accumulating them.
[0053] For example, for intersection points a and b (corresponding to initial segment data ab), the terrain elevation data corresponding to intersection point a is 100, the building top elevation data corresponding to intersection point a is 110, the terrain elevation data corresponding to intersection point b is 80, and the building top elevation data corresponding to intersection point b is 70. Calculate the three-dimensional distance between the terrain elevation data and the three-dimensional distance between the building top elevation data of intersection points a and b respectively. For example, if the three-dimensional distance between the terrain elevation data and intersection point b is 30, and the three-dimensional distance between the building top elevation data and intersection point b is 20, then 20 is taken as the three-dimensional distance between intersection points a and b. The building top elevation data corresponding to intersection point b, 70, is taken as the target point data. The building top elevation data corresponding to intersection point a and the building top elevation data corresponding to intersection point b are taken as the target segment data of the initial segment data (intersection ab). Similarly, calculate the 3D distance between the terrain elevation data and the building top elevation data of other segments (initial segment data), and take the endpoint of the previous target segment data as the starting point of the next initial segment data. Move the pointer of the corresponding dataset and continue processing until all data points have been processed. When the terrain elevation or building elevation changes, create a new segment. The terrain elevation and building elevation within each segment remain unchanged, and the segment length is dynamically adjusted according to the terrain complexity.
[0054] Figure 2 This is a schematic diagram illustrating the segmented processing flow of the terrain segmentation module provided in the embodiments of this application.
[0055] like Figure 2 As shown, the terrain segmentation processing module performs segmented processing, for example, steps S201-S206.
[0056] S201, Input two-dimensional flight path.
[0057] S202, sampling terrain elevation data.
[0058] S203, sampling the elevation data of the top of the building.
[0059] S204 processes two-dimensional route data to extract point information.
[0060] For example, the terrain elevation data and building top elevation data are cut at preset height intervals to obtain multiple contour surface data. The intersection points of the two-dimensional flight path data with the terrain elevation contour surface data and the building top elevation contour surface data are obtained, and multiple initial segment data are obtained based on the intersection points.
[0061] S205, merge terrain and building datasets.
[0062] For example, the coordinates, elevation (terrain elevation data, building top elevation data) and cumulative distance information of each intersection point are recorded, and an efficient dual-pointer algorithm is used to calculate the three-dimensional distance between the terrain elevation data and the building top elevation data corresponding to each intersection point.
[0063] S206, Create flight segment.
[0064] For example, a point with a smaller distance is selected as the endpoint of the initial segmented data to obtain the target segmented data.
[0065] In the above embodiments, an efficient dual-pointer merging algorithm was designed based on the terrain segmentation processing algorithm. This algorithm can merge terrain and building data into continuous flight segments. By extracting the terrain elevation and building elevation information of each point, flight segments are generated by merging them. A point data structure is used to record coordinates, elevation and cumulative distance. The dual-pointer algorithm efficiently merges the dataset, solving the technical problem of scientifically segmenting complex terrain in related technologies.
[0066] The dynamic programming optimization module solves the problem of maintaining true altitude flight for UAVs on undulating terrain by constructing scientific state transition equations. The core objective is to minimize the number of vertical take-offs and landings, thereby achieving altitude trajectory optimization with minimal vertical take-off and landings.
[0067] In one example, height optimization is performed on multiple target segment data to obtain a true-altitude flight path for a 3D UAV. This includes: obtaining the flyable altitude range, which is based on true-altitude flight parameters, terrain elevation data, and building top elevation data; performing height discretization processing on each target segment data to obtain multiple discrete altitude data corresponding to each target segment data; determining the effective altitude range of each target segment data based on the multiple discrete altitude data and the flyable altitude range; and obtaining the true-altitude flight path for the 3D UAV based on the effective altitude range of each target segment data.
[0068] Specifically, the discretization process is performed based on the flyable altitude range (the flyable altitude range obtained by converting altitude based on true altitude flight parameters, terrain elevation data, and building top elevation data to determine the safe range). By discretizing the flyable altitude range at fixed altitude intervals, multiple discrete altitude data are obtained. For each target segment data, the discrete altitude data are filtered according to the flyable altitude range to obtain the effective altitude range, thereby recognizing the true altitude flight path of the three-dimensional UAV.
[0069] For example, calculate the minimum and maximum values of the safe altitude (flyable altitude range) for all target segment data, where the flyable altitude range is determined by formula (1):
[0070] Minimum safe height = max{terrain elevation data + 40 meters, building top elevation data + 30 meters} (1)
[0071] Maximum safe height = terrain elevation data + 120 meters
[0072] The continuous altitude space (flyable altitude range) is discretized into discrete values with a step size of Δh, as shown in formula (2):
[0073] globalHeights = {minH, minH+Δh, minH+2Δh, ..., maxH} (2)
[0074] Where globalHeights represents discrete altitude data. For each segment (target segment data), discrete altitude data within its safe altitude range (flyable altitude range) are filtered, as shown in formula (3):
[0075] validHeights[i] = {h ∈ globalHeights | L[i]≤ h ≤ H[i]} (3)
[0076] Where L[i] represents the minimum flyable altitude range, H[i] represents the maximum flyable altitude range, validHeights[i] represents the effective altitude range, and i represents the target segment data.
[0077] In one example, each target segment data includes a first target segment data and a second target segment data. Based on the effective altitude range of each target segment data, a true altitude flight path for the 3D UAV is obtained, including: establishing a state transition equation, wherein the state transition equation characterizes the functional relationship between the number of adjustments to the first target segment data and the altitude cost, and the altitude cost is the cost from the effective altitude range corresponding to the first target segment data to the effective altitude range corresponding to the second target segment data; and performing altitude optimization on the effective altitude range of each target segment data based on the state transition equation to obtain the true altitude flight path for the 3D UAV.
[0078] Specifically, for the first target segment data (end point), the adjustment cost for all effective heights is 0 (no adjustment for the starting point), and the state transition equation is established as shown in formula (4):
[0079] dp[i][h_i]= min{ dp[i-1][h_{i-1}]+ cost(h_{i-1}, h_i)} (4)
[0080] Where dp[i][h_i] (first target segment data) represents the minimum number of adjustments required for the endpoint height h of the i-th segment, h_i represents the endpoint height h of the i-th target segment data, dp[i-1][h_{i-1}] represents the second target segment data, and cost(h_{i-1}, h_i) is the altitude change cost function. When the current segment height (the effective altitude range corresponding to the first target segment data) is the same as the previous segment (the effective altitude range corresponding to the second target segment data), it indicates level flight (no cost). When the current segment height changes from the previous segment, it indicates vertical takeoff and landing (cost +1). For example, when h_{i-1} = h_i, cost = 0 (level flight, no cost); when h_{i-1} ≠ h_i, cost = 1 (vertical adjustment, cost +1). Since the cost of vertical takeoff and landing is set to 1, dp[i][h_i] represents both the total cost and the number of adjustments.
[0081] In one example, the effective altitude range of each target segment data is optimized based on the state transition equation to obtain the true altitude flight path of the 3D UAV. This includes: optimizing the effective altitude range of each target segment data based on the state transition equation to obtain multiple optimal altitude data corresponding to multiple target segment data; determining the target segment data corresponding to the endpoint of the flight path from the multiple target segment data as the specified segment data; and performing backtracking processing on the multiple optimal altitude data based on the specified segment data to obtain the true altitude flight path of the 3D UAV.
[0082] Specifically, for the current altitude (effective altitude range) of each target segment data, priority is given to finding points with the same altitude (effective altitude range) in the previous segment for costless transfer; if no points with the same altitude exist, the altitude with the lowest cost in the previous segment is selected for transfer, thereby obtaining the optimal altitude data (optimal effective altitude range) corresponding to each target segment data. The preceding altitude (optimal altitude data) of each state (target segment data) is recorded for backtracking to generate the optimal altitude sequence, and backtracking is performed based on the last segment of target segment data (specified segment data) to obtain the true altitude flight path of the 3D UAV.
[0083] In one example, backtracking is performed on multiple optimal height data based on specified segment data to obtain a true altitude flight path for a 3D UAV. This includes: using the optimal height data corresponding to the starting position of the last backtracked segment data after backtracking the specified segment data as the flight path starting point; using the optimal height data corresponding to the ending position of the backtracked segment data after backtracking the specified segment data as the segment ending point of the backtracked segment data; when the optimal height data corresponding to the backtracked segment data are different, adding the optimal height data corresponding to each backtracked segment data as the segment ending point at the ending position of the backtracked segment data; and obtaining the true altitude flight path for the 3D UAV based on the flight path starting point and the segment ending points.
[0084] Specifically, the backtracking algorithm works backward from the endpoint to generate an optimal height sequence, including: starting from the last segment (specified segment data), finding the height with the minimum adjustment cost as the endpoint optimal height (optimal height data), backtracking backward from the endpoint, for each segment (target segment data), finding the corresponding optimal height data in the previous segment based on the path record, until backtracking to the first segment, generating a complete optimal height sequence (optimal height data). The optimal height sequence contains the optimal height data of the endpoint of each segment, ensuring that the number of vertical take-offs and landings is minimized.
[0085] In the above embodiments, a highly discretized processing is adopted, and the state dp[i][h_i] is defined as the minimum number of adjustments at the end of the i-th segment at height h. Two state transition methods are designed: level flight (no cost) and vertical adjustment (cost + 1).
[0086] By discretizing the height space, constructing an effective height list, solving the problem using dynamic programming, and backtracking the optimal height sequence, an optimal height trajectory is generated. The height trajectory optimization problem is transformed into a dynamic programming problem. By constructing a scientific state transition equation, the number of vertical take-offs and landings is minimized.
[0087] The route construction and output module ensures that the generated route conforms to the flight characteristics of the UAV, including: (1) Starting point processing: Add the optimal altitude data of the first segment to the starting point position of the first segment (the starting point position of the last segment backtracking data) to form the route starting point. (2) Segment ending point processing: Add the optimal altitude of the segment to the ending point position of each segment (the ending point position of the backtracking data) to form the segment ending point. (3) Altitude change point processing: At the segment connection, when the optimal altitudes of adjacent segments are different, add two points with the same position but different altitudes (the optimal altitude data corresponding to the backtracking data) to represent vertical take-off and landing operations. The first point represents the position of the segment connection and the altitude is the optimal altitude of the previous segment. The second point represents the position of the other segment connection and the altitude is the optimal altitude data of the current segment, ensuring the continuity and smooth transition of altitude changes. (4) Route point sequence construction order: Construct a complete route point sequence in the order of starting point, altitude change point, and segment ending point to finally generate a smooth three-dimensional route.
[0088] In the above embodiments, a scientific rule for constructing the flight path point sequence was designed. In particular, transition points were added at altitude changes to ensure the continuity of altitude changes. At the segment connection points, when the altitude changes, two points with the same position but different altitudes are added to represent vertical take-off and landing operations. The flight path point sequence is constructed in the order of starting point, altitude change point, and segment end point to generate a three-dimensional flight path in LineString format. This solves the technical problem of how to generate a flight path that conforms to the flight characteristics of UAVs based on the optimal altitude sequence.
[0089] Figure 3 A flowchart illustrating the dynamic planning optimization module, route construction and output module provided for the implementation of this application.
[0090] like Figure 3 As shown, the dynamic planning optimization module and the route construction and output module process, for example, steps S301-S308.
[0091] S301, Input segmented data (target segmented data).
[0092] S302, calculates the global altitude range (flyable altitude range).
[0093] S303, Discretized height space.
[0094] For example, multiple discrete altitude data are obtained by discretizing the flyable altitude range at fixed altitude intervals.
[0095] S304, Construct a list of valid heights.
[0096] For example, for each target segment of data, the discrete altitude data is filtered according to the range of flyable altitudes to obtain the effective altitude range.
[0097] S305, solved using dynamic programming.
[0098] S306, backtracking the optimal height sequence.
[0099] S307, construct a sequence of route points.
[0100] S308, output LineString.
[0101] To facilitate understanding, this application provides a specific embodiment, using drone inspection in a complex urban environment as an example for explanation.
[0102] (1) Data preparation: two-dimensional flight path data (generated by the second stage of the true altitude flight path planning system), terrain elevation data (accuracy 10 meters), and building top elevation data (accuracy 1 meter).
[0103] (2) Altitude trajectory smoothing request: The user inputs two-dimensional flight path data into the system and sets the altitude discretization step size Δh = 10 meters.
[0104] (3) System processing flow: Stage 1: The system receives two-dimensional flight path data and requests terrain elevation and building top elevation data from the GIS service; Stage 2: The terrain segmentation module segments the flight path, extracts the terrain elevation and building elevation information of each segment, and calculates the range of flyable altitudes (minimum safe altitude = max{terrain elevation + 40 meters, building top elevation + 30 meters}, maximum allowable altitude = terrain elevation + 120 meters); Stage 3: The dynamic programming optimization module performs altitude discretization processing, constructs the state transition equation, solves the optimal altitude sequence, and minimizes the number of vertical take-offs and landings; Stage 4: The flight path construction module generates a smooth three-dimensional flight path based on the optimal altitude sequence.
[0105] (4) Planning results: Processing time: 3ms, the generated flight path has smooth altitude changes, fewer vertical take-offs and landings, and the flight path always maintains a safe distance from the terrain and buildings.
[0106] Original route (e.g.) Figure 4 The planning results (as shown) are as follows:
[0107] {"type":"LineString","coordinates":[[106.5,29.5,100],[106.53225398,29.47214809,100],[106.53225398,29.47214809,21.0959455],[106.53277004,29.47169857,21.0959455],[106.53277004,29.47169857,99.15432096],[106.5332861,29.47169857,99.15432096],[106.5332861,29.47169857,99.15432096],[106.53328 61,29.47169857,82.89338834],[106.53380217,29.47124904,82.89338834],[106.53380217,29.47124904,99.08737088],[106.55031617,29.4 5821294,99.08737088],[106.55031617,29.45821294,95.78669102],[106.55083224,29.45776342,95.78669102],[106.55083224,29.45776342 ,61.18047773],[106.55186436,29.45776342,61.18047773],[106.55186436,29.45776342,81.48916463],[106.55238042,29.4573139,81.489 16463],[106.55238042,29.4573139,64.7851817],[106.56166955,29.45191965,64.7851817],[106.56166955,29.45191965,68.91801908],[10 6.56218562,29.45191965,68.91801908],[106.56218562,29.45191965,70.12653998],[106.56270168,29.45191965,70.12653998],[106.56270 168,29.45191965,65.88167661],[106.56321774,29.45147013,65.88167661],[106.56321774,29.45147013,70.13408852],[106.56476593,29.45102061,70.13408852],[106.56476593,29.45102061,86.85422862],[106.56528199,29.45057109,86.85422862],[106.56528199,29.45057109,83.70070725],[106.56579806,29.45057109,83.70070725],[106.56579806,29.45057109,84.17964743],[106.56631412,29.45012157,84.17964743],[106.56631412,29.45012157,46.40584258],[106.58747269,29.43933307,46.40584258],[106.58747269,29.43933307,94.74320381],[106.58798875,29.43933307,94.74320381],[106.58798875,29.43933307,98.51558537],[106.58850482,29.43933307,98.51558537],[106.58850482,29.43933307,84.62198562],[106.58902088,29.43933307,84.62198562],[106.58902088,29.43933307,82.94623034],[106.59160119,29.43933307,82.94623034],[106.59160119,29.43933307,90.98543343],[106.59314938,29.43798451,90.98543343],[106.59314938,29.43798451,79.40744857],[106.59366544,29.43753499,79.40744857],[106.59366544,29.43753499,67.40697182],[106.59366544,29.43708546,67.40697182],[106.59366544,29.43708546,69.80526226],[106.59418151,29.43663594,69.80526226],[106.59418151,29.43663594,100],[106.6,29.4,100],[106.59418151,29.43663594,100],[106.59418151,29.43663594,49.89631503],[106.59366544,29.43708546,49.89631503],[106.59366544,29.43708546,89.51608807],[106.59366544,29.43753499,89.51608807],[106.59366544,29.43753499,36.45489323],[106.59314938,29.43798451,36.45489323],[106.59314938,29.43798451,87.34805633],[106.590053,29.44068163,87.34805633],[106.590053,29.44068163,98.97159002],[106.58953694,29.44113115,98.97159002],[106.58953694,29.44113115,90.10331125],[106.58902088,29.44113115,90.10331125],[106.58902088,29.44113115,88.29967382],[106.58850482,29.44158067,88.29967382],[106.58850482,29.44158067,94.88239346],[106.57095868,29.45686438,94.88239346],[106.57095868,29.45686438,73.49901959],[106.57044262,29.4573139,73.49901959],[106.57044262,29.4573139,75.7119898],[106.56992656,29.4573139,75.7119898],[106.56992656,29.4573139,96.20443276],[106.5694105,29.45776342,96.20443276],[106.5694105,29.45776342,79.3802608],[106.5637338,29.46270815,79.3802608],[106.5637338,29.46270815,76.69874729],[106.56321774,29.46315767,76.69874729],[106.56321774,29.46315767,91.39753924],[106.56889443,29.54407141,91.39753924],[106.56889443,29.54407141,84.32744781],[106.56889443,29.54452093,84.32744781],[106.56889443,29.54452093,64.27374287],[106.56528199,29.55351135,64.27374287],[106.56528199,29.55351135,55.0347077],[106.56424987,29.55980464,55.0347077],[106.56424987,29.55980464,79.12738303],[106.56528199,29.56789601,79.12738303],[106.56528199,29.56789601,66.01648153],[106.5694105,29.57284074,66.01648153],[106.5694105,29.57284074,100],[106.6,29.6,100],[106.65920541,29.5481171,100],[106.65920541,29.5481171,48.65904914],[106.65920541,29.54766758,48.65904914],[106.65920541,29.54766758,97.02250731],[106.64475565,29.52474202,97.02250731],[106.64475565,29.52474202,90.25776951],[106.64475565,29.5242925,90.25776951],[106.64475565,29.5242925,96.12702869],[106.64475565,29.52384298,96.12702869],[106.64475565,29.52384298,88.00305238],[106.64475565,29.52339346,88.00305238],[106.64475565,29.[52339346,97.86014254],[106.64940022,29.52159537,97.86014254],[106.64940022,29.52159537,96.84845878],[106.69171736,29.51035735,96.84845878],[106.69171736,29.51035735,82.34089846],[106.69326555,29.50766023,82.34089846],[106.69326555,29.5076] 6023,57.12693536],[106.69429768,29.50091742,57.12693536],[1 06.69429768,29.50091742,70.12450317],[106.69481374,29.500467 9,70.12450317],[106.69481374,29.5004679,100],[106.7,29.5,100]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}.
[0108] After smoothing (e.g.) Figure 5 The route (as shown) is as follows:
[0109] {"type":"LineString","coordinates":[[106.5,29.5,100],[106.53277004,29.47169857,100],[106.53277004,29.47169857,100],[106.53380217,29.47124904,100],[106.53380217,29.47124904,100],[106.55083224,29.45776342,100],[106.55083224,29.45776342,100],[106.552380 42,29.4573139,100],[106.55238042,29.4573139,100],[106.56166955,29.45191965,100],[106.56166955,29.45191965,100],[106.56579806, 29.45057109,100],[106.56579806,29.45057109,100],[106.56631412,29.45012157,100],[106.56631412,29.45012157,100],[106.58747269,2 9.43933307,100],[106.58747269,29.43933307,100],[106.59160119,29.43933307,100],[106.59160119,29.43933307,100],[106.59418151,29 .43663594,100],[106.59418151,29.43663594,100],[106.6,29.4,100],[106.59418151,29.43663594,100],[106.59418151,29.43663594,106.4 5489323],[106.59314938,29.43798451,106.45489323],[106.59314938,29.43798451,106.45489323],[106.58953694,29.44113115,106.454893 23],[106.58953694,29.44113115,96.45489323],[106.58850482,29.44158067,96.45489323],[106.58850482,29.44158067,96.45489323],[106.57044262,29.4573139,96.45489323],[106.57044262,29.4573139,96.45489323],[106.5694105,29.45776342,96.45489323],[106.5694105,29.45776342,96.45489323],[106.56321774,29.46315767,96.45489323],[106.56321774,29.46315767,96.45489323],[106.56889443,29.54407141,96.45489323],[106.56889443,29.54407141,96.45489323],[106.56889443,29.54452093,96.45489323],[106.56889443,29.54452093,96.45489323],[106.56528199,29.55351135,96.45489323],[106.56528199,29.55351135,96.45489323],[106.56424987,29.55980464,96.45489323],[106.56424987,29.55980464,96.45489323],[106.56528199,29.56789601,96.45489323],[106.56528199,29.56789601,96.45489323],[106.5694105,29.57284074,96.45489323],[106.5694105,29.57284074,100],[106.6,29.6,100],[106.65920541,29.5481171,100],[106.65920541,29.5481171,100],[106.65920541,29.54766758,100],[106.65920541,29.54766758,100],[106.64475565,29.52474202,100],[106.64475565,29.52474202,100],[106.64475565,29.52339346,100],[106.64475565,29.52339346,100],[106.64940022,29.52159537,100],[106.64940022,29.[52159537,100],[106.69171736,29.51035735,100],[106.69171736,29.51035735,100],[106.69326555,29.50766023,100],[106.69326555,29.50766023,100],[106.69429768,29.50091742,100] ],[106.69429768,29.50091742,100],[106.69481374,29.5004679,100],[106.69481374,29.5004 679,100],[106.7,29.5,100]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}.
[0110] Original track statistics: Number of altitude changes: 56, total altitude change distance: 1090.52 meters (precise value: 1090.51665994 meters); Optimized track statistics: Number of altitude changes: 3, total altitude change distance: 20.00 meters (precise value: 20.00000000 meters).
[0111] In the above embodiments, the number of altitude changes on the optimized flight path was reduced from 56 to 3, a reduction of 94.6%; the total distance of altitude changes on the optimized flight path was reduced from 1090.52 meters to 20.00 meters, a reduction of 98.2%. The optimized flight path significantly reduces the frequency and magnitude of altitude changes, making flight smoother, which helps save energy, improve flight safety, and increase mission efficiency. The UAV true altitude flight path smoothing system for complex terrain provided in this application performs excellently in UAV inspection applications in complex urban environments, significantly improving flight stability and safety, and providing a reliable solution for similar application scenarios.
[0112] The true altitude flight path smoothing method and system for UAVs in complex terrain proposed in this application achieves the following: (1) a significant reduction in the number of vertical take-offs and landings: In complex terrain environments, the altitude smoothing algorithms of related technologies result in a large number of vertical take-offs and landings, leading to poor flight stability. This application uses a dynamic programming optimization algorithm to minimize the number of vertical take-offs and landings, thereby improving flight stability and reducing the number of vertical take-offs and landings by more than 70%; (2) a significant improvement in the smoothness of the altitude trajectory: The altitude trajectories generated by related technology algorithms have obvious inflection points, resulting in poor flight comfort. This application generates continuous and smooth altitude trajectories through scientific segmentation and dynamic programming. (3) Strong terrain adaptability: Related technologies are poorly adaptable in complex environments such as dense urban building clusters and undulating mountainous terrain. This application can dynamically adjust the altitude trajectory according to terrain features and obstacle distribution. (4) High safety: Related technologies often ignore safety distance requirements when processing altitude smoothing. This application ensures that the UAV always maintains a safe distance from the terrain and buildings through strict safety altitude calculation. (5) High computational efficiency: Related altitude smoothing algorithms have high computational complexity and poor real-time performance. This application adopts efficient discretization processing and dynamic programming algorithm, which has high computational efficiency and time complexity of O(N × K), where N represents the number of segments and K represents the number of discrete altitudes (approximately (maxH-minH) / Δh). (6) Simple implementation: Related technologies are complex to implement and difficult to adjust parameters. The algorithm design of this application is simple and clear, and the parameters are easy to adjust, which is convenient for engineering application and promotion.
[0113] Figure 6 A block diagram of an electronic device provided for another embodiment of this application.
[0114] An embodiment of this application provides an electronic device, which includes: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by one or more processors, which are executed by one or more processors to cause the one or more processors to implement the steps of the method of any of the above embodiments.
[0115] like Figure 6 As shown, for ease of understanding, an embodiment of this application illustrates a specific electronic device 600.
[0116] Electronic device 600 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 600 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0117] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0118] Multiple components in electronic device 600 are connected to input / output (I / O) interface 605. These components include: input unit 606, such as a keyboard or mouse; output unit 607, such as various types of displays or speakers; storage unit 608, such as a disk or optical disk; and communication unit 609, such as a network interface card (NIC), modem, or wireless transceiver. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods described above. For example, in some embodiments, any one or more of the methods described above can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of any one or more of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform any one or more of the methods described above by any other suitable means (e.g., by means of firmware).
[0120] Embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of any of the above embodiments.
[0121] The method and system for smoothing the true altitude flight path of UAVs in complex terrain proposed in this application implement: (1) a terrain segmentation processing algorithm, including: sampling and generating a point sequence along the two-dimensional flight path, obtaining the terrain elevation and building top elevation data of each point, and using a two-pointer merging algorithm to merge the terrain and building datasets into continuous flight segments, with the terrain elevation and building elevation remaining unchanged in each segment, and the segment length dynamically adjusted according to the terrain complexity; (2) a dynamic programming optimization algorithm, including: discretizing the continuous altitude space into discrete values with a step size of Δh, and defining the state dp[i][h]. The minimum number of adjustments is h at the end of the i-th segment. The state transition equation is designed. Level flight has no cost, and vertical adjustment has a cost of +1. The optimal altitude sequence is generated by backtracking algorithm from the end point forward. (3) Route construction rules include: adding the optimal altitude at the starting position of the first segment to form the starting point, adding the optimal altitude of each segment at the end position to form the segment end point, and adding two points at the same position but different altitudes at the segment connection point when the altitude changes to represent vertical take-off and landing operations. The route point sequence is constructed in the order of starting point, altitude change point, and segment end point to generate a smooth three-dimensional route.
[0122] With the rapid development of UAV technology and the continuous expansion of its application fields, the demand for high-precision, high-safety, and high-efficiency true-altitude flight path planning is increasing. The altitude trajectory smoothing system and method provided in this application are particularly suitable for urban environments with complex terrain and dense buildings, as well as island and mountainous environments. They can be widely applied to: UAV inspections in complex urban environments, aerial mapping of complex terrains such as mountains and islands, special missions with strict altitude requirements, and military reconnaissance and surveillance missions. The implementation of this application will significantly improve the flight stability and safety of UAVs in complex terrain environments, reduce energy consumption, and improve mission execution efficiency, possessing broad application prospects and market value.
[0123] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this application, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0124] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0125] In the description of this application, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0126] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0127] Furthermore, the terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this application can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this application, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly and specifically defined in the embodiments.
[0128] In this application, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication between two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific implementation.
[0129] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
Claims
1. A method for smoothing the true altitude flight path of a UAV in complex terrain, characterized in that, The method includes: Acquire two-dimensional flight path data, terrain elevation data, building top elevation data, and true altitude flight parameters; Based on the terrain elevation data and the building top elevation data, the two-dimensional flight path data is segmented to obtain multiple initial segment data. Distance calculations are performed on the multiple initial segment data, the two-dimensional flight path data, the terrain elevation data, and the building top elevation data to obtain multiple target segment data, wherein each target segment data includes a first target segment data and a second target segment data; The flyable altitude range is obtained based on the true altitude flight parameters, the terrain elevation data, and the building top elevation data. Each target segment data is highly discretized to obtain multiple discrete height data corresponding to each target segment data. Based on multiple discrete altitude data corresponding to each target segment data and the flyable altitude range, the effective altitude range of each target segment data is determined. A state transition equation is established, wherein the state transition equation characterizes the functional relationship between the number of adjustments to the first target segment data and the height cost, wherein the height cost is the cost from the effective height range corresponding to the first target segment data to the effective height range corresponding to the second target segment data; Based on the state transition equation, the effective altitude range of each target segment data is optimized to obtain the true altitude flight path of the three-dimensional UAV.
2. The method according to claim 1, characterized in that, The step of performing height optimization on the effective height range of each target segment data based on the state transition equation to obtain the true altitude flight path of the three-dimensional UAV includes: Based on the state transition equation, the effective height range of each target segment data is optimized to obtain multiple optimal height data corresponding to the multiple target segment data. The target segment data corresponding to the end point of the flight path is determined from the multiple target segment data as the designated segment data, and the multiple optimal height data are backtracked based on the designated segment data to obtain the true altitude flight path of the three-dimensional UAV.
3. The method according to claim 2, characterized in that, The step of backtracking the multiple optimal altitude data based on the specified segmented data to obtain the true altitude flight path of the 3D UAV includes: The optimal altitude data corresponding to the starting position of the last backtracked segment after the specified segmented data backtracking process is taken as the starting point of the flight route. The optimal height data corresponding to the endpoint position of the backtracked segment data after the specified segment data backtracking processing is taken as the segment endpoint of the backtracked segment data. When the optimal height data corresponding to the backtracking segment data are different, add the optimal height data corresponding to each backtracking segment data as the segment endpoint at the endpoint position corresponding to the backtracking segment data; Based on the starting point of the flight path and the end point of each segment, the true altitude flight path of the three-dimensional UAV is obtained.
4. The method according to claim 1, characterized in that, Based on the terrain elevation data and the building top elevation data, the two-dimensional flight path data is segmented to obtain multiple initial segmented data, including: Data processing is performed on the terrain elevation data and the building top elevation data to obtain multiple contour surface data; Based on the multiple contour surface data and the two-dimensional flight path data, multiple intersection point data are obtained; The two-dimensional flight path data is segmented based on the multiple intersection point data to obtain multiple initial segment data.
5. The method according to claim 4, characterized in that, The multiple initial segment data include multiple intersection point data; the distance calculation of the multiple initial segment data, the two-dimensional flight path data, the terrain elevation data, and the building top elevation data yields multiple target segment data, including: Distance calculations are performed on the terrain elevation data and the building top elevation data based on the multiple intersection data corresponding to the multiple initial segmented data to obtain the target point data; Based on the target point data, multiple target segment data are obtained.
6. A system for smoothing the true altitude flight path of an unmanned aerial vehicle (UAV) in complex terrain, characterized in that, The system includes: The acquisition module is used to acquire two-dimensional flight path data, terrain elevation data, building top elevation data, and true altitude flight parameters; The segmentation module is used to segment the two-dimensional flight path data based on the terrain elevation data and the building top elevation data to obtain multiple initial segment data. The calculation module is used to perform distance calculations on the multiple initial segment data, the two-dimensional flight path data, the terrain elevation data and the building top elevation data to obtain multiple target segment data, wherein each target segment data includes a first target segment data and a second target segment data; An optimization module is used to obtain the flyable altitude range, which is obtained based on the true altitude flight parameters, the terrain elevation data, and the building top elevation data; to perform altitude discretization processing on each target segment data to obtain multiple discrete altitude data corresponding to each target segment data; to determine the effective altitude range of each target segment data based on the multiple discrete altitude data corresponding to each target segment data and the flyable altitude range; to establish a state transition equation, which characterizes the functional relationship between the number of adjustments to the first target segment data and the altitude cost, where the altitude cost is the cost from the effective altitude range corresponding to the first target segment data to the effective altitude range corresponding to the second target segment data; and to perform altitude optimization on the effective altitude range of each target segment data based on the state transition equation to obtain the true altitude flight path of the three-dimensional UAV.
7. An electronic device having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-5.