Safety detection scheme for planning route of unmanned aerial vehicle
By obtaining the latitude and longitude values of the drone route and the no-fly zone, checking whether the flight sections in the route pass through the no-fly zone, solving the problem of missing safety detection of manually drawn routes, and realizing automated route safety assessment and rapid detection.
Patent Information
- Application Number
- CN202411364594.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-14
AI Technical Summary
The prior art lacks methods for detecting the safety of manually mapped drone planned routes, resulting in the possibility of passing through no-fly areas, environmentally constrained areas or meteorologically complex areas, causing flight risks.
By obtaining the waypoint latitude and longitude values in the drone route, determining the straight line model of the flight segment, and mapping and comparing with the vertex latitude and longitude values of the no-fly zone, automatically detecting the safety of the flight segment, marking the crossing or critical no-fly zone, and then Assess the safety of the entire route.
It realizes automated safety inspection of drone routes, meets the needs of rapid detection, is compatible with route safety inspections in various scenarios, and improves the safety of route planning.
Smart Images

Figure CN119313000A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicles, and in particular to a safety detection method, device, electronic equipment, non-transient computer-readable storage medium, and computer program product for planning a route of an unmanned aerial vehicle. Background Art
[0002] In recent years, with the rapid development of drone technology, the use of drones for reconnaissance missions has become more and more widespread. In such reconnaissance missions, it is necessary to plan the drone route according to the received reconnaissance target and range, complete the reconnaissance and monitoring of the target, and collect the required reconnaissance information.
[0003] The most commonly used reconnaissance route planning method is to manually plan the UAV reconnaissance mission route on a two-dimensional digital map in the UAV ground control station software. This reconnaissance route planning method requires manually setting the latitude and longitude coordinates of multiple waypoints, and then the UAV ground control station software automatically connects the waypoints and draws the UAV flight route. The planned route is then uploaded to the UAV via a data link, and the UAV begins to fly according to the planned route.
[0004] There are several ways to manually draw and plan routes:
[0005] 1) Manually add waypoints on the map with the mouse and draw the route independently.
[0006] 2) Manually add points of interest (such as reconnaissance target points) on the map using the mouse, and then automatically generate circular waypoints around the points of interest and connect them into routes.
[0007] However, the manually drawn planned routes do not fully consider dangerous areas such as no-fly zones, environmental restriction zones, or areas with complex meteorological environments, which may cause some sections of the drawn routes to pass through dangerous areas, thus causing flight hazards. Therefore, a solution is urgently needed to detect the safety of manually drawn planned routes. Summary of the invention
[0008] In view of the above analysis, the embodiments of the present invention aim to provide a method, device, electronic device, non-transitory computer-readable storage medium, and computer program product for detecting the safety of a planned UAV route, so as to solve the problem in the prior art that there is a lack of technology that can detect the safety of manually drawn planned routes.
[0009] In a first aspect, an embodiment of the present invention provides a method for detecting the safety of a planned route of a drone, comprising the following steps:
[0010] Get the latitude and longitude values of two waypoints in any segment of the planned route of the drone;
[0011] Determining a straight line model representing the flight segment according to the latitude and longitude values of the two waypoints;
[0012] Get the longitude and latitude values of each vertex of the no-fly zone;
[0013] The safety of the flight segment is determined according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone.
[0014] Based on the further improvement of the above detection method, determining the safety of the flight segment according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone includes:
[0015] Mapping the original longitude value or the original latitude value of the no-fly zone vertex onto the straight line model to obtain the mapped latitude value or the mapped longitude value of the no-fly zone vertex;
[0016] Comparing the mapped latitude value of the no-fly zone vertex with the original latitude value or the mapped longitude value with the original longitude value;
[0017] The safety of the flight segment is determined according to the comparison results of the mapped latitude values and the original latitude values or the comparison results of the mapped longitude values and the original longitude values of all the no-fly zone vertices.
[0018] Based on the further improvement of the above detection method, determining the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the mapped longitude values and the original longitude values of all the no-fly zone vertices includes:
[0019] If the mapped latitude values of all the no-fly zone vertices are greater than or less than the original latitude values or the mapped longitude values are greater than or less than the original longitude values, the flight segment is safe, otherwise it is not safe.
[0020] Based on the further improvement of the above detection method, determining the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the mapped longitude values and the original longitude values of all the no-fly zone vertices includes:
[0021] In response to at least one of the no-fly zone vertices having a mapped latitude value greater than the original latitude value and at least one of the no-fly zone vertices having a mapped latitude value less than the original latitude value or at least one of the no-fly zone vertices having a mapped longitude value greater than the original longitude value and at least one of the no-fly zone vertices having a mapped longitude value less than the original longitude value, marking the flight segment as crossing the no-fly zone.
[0022] Based on the further improvement of the above detection method, determining the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the mapped longitude values and the original longitude values of all the no-fly zone vertices includes:
[0023] In response to only one of the no-fly zone vertices having a mapped latitude value equal to the original latitude value and all other mapped latitude values of the no-fly zone vertices being greater than or less than the original latitude value, or only one of the no-fly zone vertices having a mapped longitude value equal to the original longitude value and all other mapped longitude values of the no-fly zone vertices being greater than or less than the original longitude value, marking the flight segment as critical to the no-fly zone.
[0024] Further improvement based on the above detection method also includes the following steps:
[0025] The safety of the planned route of the drone is determined based on the safety of all the flight segments in the planned route of the drone.
[0026] In a second aspect, an embodiment of the present invention provides a safety detection device for planning a route of a drone, comprising:
[0027] A scene building module is configured to build an environment scene by assigning values to states of grids in a spreadsheet;
[0028] A setting module, which is configured to generate a starting point and an end point of each intelligent agent in the environment scene by setting a coordinate type of a grid in the electronic table;
[0029] An import module configured to import the path planning algorithm of each agent;
[0030] A calculation module, configured to calculate a planned path of each agent in the environment scene according to the path planning algorithm of each agent and its starting point and end point;
[0031] The display module is configured to move each agent according to the planned path and display a grid where the agent moves each step forward in a style determined by the agent.
[0032] In a second aspect, an embodiment of the present invention provides a safety detection device for planning a route of a drone, comprising:
[0033] The first acquisition module is configured to obtain the latitude and longitude values of two waypoints in any segment of the planned route of the drone;
[0034] A first determination module is configured to determine a straight line model representing the flight segment according to the latitude and longitude values of the two waypoints;
[0035] A second acquisition module is configured to acquire the latitude and longitude values of each vertex of the no-fly zone; and
[0036] The second determination module is configured to determine the safety of the flight segment according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone.
[0037] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0038] at least one processor;
[0039] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the safety detection method for planning a route for a drone as described in any one of the first aspects of the present invention.
[0040] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the safety detection method for planning a route for a drone as described in any one of the first aspects of the present invention.
[0041] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising program code instructions. When the program product is executed by a computer, the program code instructions enable the computer to execute the safety detection method for planning a route for a drone as described in any one of the first aspects of the present invention.
[0042] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0043] 1. The solution of the present invention introduces automated testing technology into route inspection, automatically realizes the inspection of route safety, and meets the rapid detection requirements of reconnaissance routes.
[0044] 2. The solution of the present invention uses universal longitude and latitude data, and the algorithm has strong compatibility, which can meet the needs of route safety detection in various scenarios.
[0045] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0047] Figure 1a A schematic flow chart of a method for detecting safety of a planned route for a UAV according to an embodiment of the present invention is shown.
[0048] Figure 1bA conceptual schematic diagram of a UAV route planning in an embodiment of the present invention is shown.
[0049] Figure 2 A schematic flow chart of a method for detecting safety of a planned route for a UAV according to another embodiment of the present invention is shown.
[0050] Figure 3 An exemplary block diagram of a safety detection device for planning a route for a drone according to an embodiment of the present invention is shown.
[0051] Figure 4 A schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0052] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0053] Figure 1a FIG. 1 is a flow chart showing a method for detecting the safety of a planned route of a drone according to an embodiment of the present invention. Figure 1a As shown, the safety detection method of the UAV planning route includes the following steps:
[0054] Step S100: Obtain the latitude and longitude values of two waypoints in any segment of the planned route of the drone.
[0055] The planned route of the drone in this embodiment can be a manually drawn route. In this embodiment, the manually drawn route data can be obtained through the imported route file. The route data here includes the latitude and longitude data of each waypoint in the route. Figure 1b FIG. 1 is a conceptual diagram showing a UAV route planning method in an embodiment of the present invention. Figure 1b As shown in the left figure, four waypoints can be marked on the two-dimensional map first ( Figure 1b The waypoints are marked as 1, 2, 3, and 4 in the figure, and then the waypoints are connected in sequence along the flight direction by manual connection to form a route. The right figure shows the route, which includes three segments, each of which is interconnected in sequence, and each segment includes two waypoints. For example, the first segment includes waypoint 1 and waypoint 2.
[0056] Step S200: Determine a straight line model representing the flight segment according to the latitude and longitude values of the two waypoints.
[0057] In this embodiment, the longitude and latitude values of the waypoints can be represented by x and y respectively. x is a point on the horizontal axis X (longitude direction), y is a point on the vertical axis Y (latitude direction), and XOY forms a two-dimensional plane (O is the origin). The mathematical expression of the straight line model is y=kx+b, where k and b are constants. In this embodiment, the longitude and latitude values of two waypoints in any segment can be taken, and the positions of the two waypoints on the XOY plane can be represented by (x1, y1) and (x2, y2), where x1<x2. Substitute (x1, y1) and (x2, y2) into the straight line model y=kx+b to obtain the values of k and b. At this time, the straight line model of the segment can be expressed as: y=kx+b, x∈[x1,x2].
[0058] In this embodiment, the longitude and latitude values of the waypoints can be represented by x and y respectively. x is a point on the horizontal axis X (longitude direction), y is a point on the vertical axis Y (latitude direction), and XOY forms a two-dimensional plane (O is the origin). The mathematical expression of the straight line model is x=k'y+b', where k' and b' are constants. In this embodiment, the longitude and latitude values of two waypoints in any segment can be taken, and the positions of the two waypoints on the XOY plane can be represented by (y1, x1) and (y2, x2), where y1<y2. Substitute (y1, x1) and (y2, x2) into the straight line model x=k'y+b' to obtain the values of k' and b'. At this time, the straight line model of the segment can be expressed as: x=k'y+b', y∈[y1, y2].
[0059] Step S300: Obtain the longitude and latitude values of each vertex of the no-fly zone.
[0060] In this embodiment, the no-fly zone that has been drawn on the two-dimensional map can be obtained and the longitude and latitude data of the vertices can be extracted. In this embodiment, the current bad weather area that is unfavorable for flight (for example, including rain, snow, strong wind, and cloudy weather) that has been drawn on the two-dimensional map can be obtained and the longitude and latitude data of the vertices can be extracted. In this embodiment, the current enemy reconnaissance or danger area that has been drawn on the two-dimensional map can be obtained and the longitude and latitude data of the vertices can be extracted. For the convenience of description, this article will collectively refer to dangerous areas such as no-fly zones, current bad weather areas that are unfavorable for flight, current enemy reconnaissance or danger areas as "no-fly zones". "No-fly zones" are closed areas surrounded by multiple line segments, indicating areas where drones cannot pass.
[0061] In this embodiment, the longitude and latitude data of each vertex of the no-fly zone may also be obtained by other means, such as a no-fly zone that has been stored in the system but not displayed on the two-dimensional map.
[0062] In this embodiment, a judgment can be made based on the range of the no-fly zone and the range of the two-dimensional map to calculate whether the no-fly zone is within the two-dimensional map, outside the two-dimensional map, or intersecting with the two-dimensional map. If it is within the two-dimensional map, the longitude and latitude values of each vertex of the no-fly zone can be directly obtained. If it is outside the range of the two-dimensional map, the no-fly zone can be set to be ineffective and not participate in subsequent calculations. If it intersects with the two-dimensional map, the intersection of the range of the no-fly zone and the range of the two-dimensional map can be calculated first, and then the no-fly zone can be divided according to the intersection, the part within the two-dimensional map is taken, and the no-fly zone vertices are reset. Finally, the longitude and latitude values of each vertex of the no-fly zone after the division can be obtained.
[0063] Step S400: Determine the safety of the flight segment according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone.
[0064] In this embodiment, the safety of the flight segment can be determined based on the positional relationship between the straight line model of the flight segment and the no-fly zone. Specifically, if the straight line model of the flight segment is y=kx+b, then when the no-fly zone is above or below the straight line model of the flight segment, the flight segment does not pass through the no-fly zone, otherwise the flight segment passes through the no-fly zone. If the straight line model of the flight segment is x=k'y+b', then when the no-fly zone is to the left or right of the straight line model of the flight segment, the flight segment does not pass through the no-fly zone, otherwise the flight segment passes through the no-fly zone.
[0065] In some embodiments, step S400 may include the following steps:
[0066] Step S10: Mapping the original longitude value or the original latitude value of the no-fly zone vertex onto the straight line model to obtain the mapped latitude value or the mapped longitude value of the no-fly zone vertex.
[0067] Step S20: Compare the mapped latitude value of the no-fly zone vertex with the original latitude value or the mapped longitude value with the original longitude value.
[0068] Step S30: Determine the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the comparison results of the mapped longitude values and the original longitude values of all the no-fly zone vertices.
[0069] The following describes steps S10 to S30 by assuming that the straight line model of the flight segment is y=kx+b.
[0070] First, obtain the longitude and latitude values of all vertices in the no-fly zone, and use x' and y' to represent the longitude and latitude values of the vertices. x' is the point on the horizontal axis X (longitude direction), and y' is the point on the vertical axis Y (latitude direction).
[0071] After that, substitute x' into the straight line model of the current flight segment: y=kx+b, and calculate the y" value. Compare the y" value with the y' value to get the comparison result. If the y' values of all vertices in the no-fly zone are greater than the y" value, it means that the no-fly zone is above this flight segment and this flight segment does not pass through the no-fly zone. If the y' values of all vertices in the no-fly zone are less than the y" value, it means that the no-fly zone is below this flight segment and this flight segment does not pass through the no-fly zone. If it is calculated that the y' values of some no-fly zone vertices are greater than the y" value, and the y' values of some no-fly zone vertices are less than the y" value, it means that this flight segment crosses the no-fly zone. If it is calculated that the y' values of some no-fly zone vertices are equal to the y" value, and the y' values of all other no-fly zone vertices are greater than or less than the y" value, it means that this flight segment is a critical no-fly zone. If this flight segment passes through or is a critical no-fly zone, this flight segment is not safe, otherwise this flight segment is safe.
[0072] In this embodiment, the y" value obtained by the above calculation is the mapped latitude value of the vertex of the no-fly zone.
[0073] In this embodiment, two adjacent waypoints in the route can be combined into a flight segment, and each flight segment is calculated according to this algorithm. If all flight segments do not cross the no-fly zone, then the route does not cross the no-fly zone; if one flight segment crosses the no-fly zone or the critical no-fly zone, then the route has crossed the no-fly zone or the critical no-fly zone.
[0074] The following describes steps S10 to S30 by taking the straight line model of the flight segment as x=k'y+b'.
[0075] First, obtain the longitude and latitude values of all vertices in the no-fly zone, and use x' and y' to represent the longitude and latitude values of the vertices. x' is the point on the horizontal axis X (longitude direction), and y' is the point on the vertical axis Y (latitude direction).
[0076] After that, substitute y' into the straight line model of the current flight segment: x = k'y + b', and calculate the x" value. Compare the x" value with the x' value to get the comparison result. If the x' values of all vertices in the no-fly zone are greater than the x" value, it means that the no-fly zone is on the right side of this flight segment, and this flight segment does not pass through the no-fly zone. If the x' values of all vertices in the no-fly zone are less than the x" value, it means that the no-fly zone is on the left side of this flight segment, and this flight segment does not pass through the no-fly zone. If it is calculated that the x' values of some no-fly zone vertices are greater than the x" value, and the x' values of some no-fly zone vertices are less than the x" value, it means that this flight segment crosses the no-fly zone. If it is calculated that the x' values of some no-fly zone vertices are equal to the x" value, and the x' values of all other no-fly zone vertices are greater than or less than the x" value, it means that this flight segment is a critical no-fly zone. If this flight segment passes through or is a critical no-fly zone, this flight segment is not safe, otherwise this flight segment is safe.
[0077] In this embodiment, the x" value obtained by the above calculation is the mapped longitude value of the vertex of the no-fly zone.
[0078] In this embodiment, two adjacent waypoints in the route can be combined into a flight segment, and each flight segment is calculated according to this algorithm. If all flight segments do not cross the no-fly zone, then the route does not cross the no-fly zone; if one flight segment crosses the no-fly zone or the critical no-fly zone, then the route has crossed the no-fly zone or the critical no-fly zone.
[0079] Figure 2 FIG. 1 is a flow chart showing a method for detecting the safety of a planned route of a drone according to an embodiment of the present invention. Figure 2 As shown, first obtain the longitude and latitude values of the two waypoints of any flight segment, represented by x and y respectively. Then use y=kx+b to represent this flight segment, substitute the x and y of the two waypoints, and calculate the k and b values. Then, obtain the longitude and latitude values of all vertices in the no-fly zone, also represented by x and y. Next, substitute the x value of any vertex in the no-fly zone into the formula y=kx+b to calculate and obtain the y1 value of this vertex. Then compare the y1 value with the y value of this vertex and record the comparison result. Then loop to calculate each vertex in the no-fly zone and record the comparison result of the y1 value of each vertex and the y value of this vertex. Then judge whether this flight segment passes through the no-fly zone based on the comparison results of all vertices in the no-fly zone. Specifically, if the comparison result is: the y1 value calculated by all vertices is greater than the actual y value of the vertex, then this flight segment does not pass through the no-fly zone. If the comparison result is: the y1 value calculated by all vertices is less than the actual y value of the vertex, then this flight segment does not pass through the no-fly zone. If the comparison result is: there are vertices whose calculated y1 value is greater than the actual y value of the vertex, and there are vertices whose calculated y1 value is less than the actual y value of the vertex, then this segment passes through the no-fly zone. If the comparison result is: there are vertices whose calculated y1 value is equal to the actual y value of the vertex, and the other vertices whose calculated y1 values are greater than or less than the actual y value of the vertex, then this segment is a critical no-fly zone. Then record the test results of this segment, repeat the above process, and test all segments of the route. Finally, determine whether the route passes through the no-fly zone based on the test results of each segment.
[0080] Figure 3 FIG. 2 shows an exemplary block diagram of a safety detection device for planning a route for a drone according to an embodiment of the present invention. Figure 3As shown, the safety detection device 300 for the planned route of the unmanned aerial vehicle includes: a first acquisition module 301, configured to obtain the longitude and latitude values of two waypoints of any segment in the planned route of the unmanned aerial vehicle; a first determination module 302, configured to determine a straight line model representing the segment according to the longitude and latitude values of the two waypoints; a second acquisition module 303, configured to obtain the longitude and latitude values of each vertex of a no-fly zone, wherein the no-fly zone is a closed area surrounded by multiple line segments; and a second determination module 304, configured to determine the safety of the segment according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone.
[0081] It should be understood that Figure 3 The various modules of the apparatus 300 shown in FIG. Figure 1a The steps in the described method correspond to each other. Therefore, the operations, features and advantages described above for the method are also applicable to the device 300 and the modules included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0082] Figure 4 4 is a schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure. Figure 4 , a structural block diagram of an electronic device 400 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein. Figure 4As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 403. In RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404. Multiple components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0083] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as a safety detection method for planning a route for a drone. For example, in some embodiments, the safety detection method for planning a route for a drone may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via ROM 402 and / or a communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the gift package recommendation method described above may be executed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform a safety detection method for planning a route for a drone by any other appropriate means (e.g., by means of firmware).
[0084] An embodiment of the present invention provides a non-transient computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute any of the safety detection methods for planning routes for unmanned aerial vehicles described above. In this article, one or more computer-readable non-transient storage media may include one or more semiconductor-based or other integrated circuits (ICs) (e.g., field programmable gate arrays (FPGAs) or application-specific ICs (ASICs)), hard disk drives (HDDs), hybrid hard disk drives (HHDs), optical disks, optical disk drives (ODDs), magneto-optical disks, magneto-optical disk drives, floppy disks, floppy disk drives (FDDs), magnetic tapes, solid-state drives (SSDs), RAM drives, and any other suitable computer-readable non-transient storage media. Computer-readable non-transient storage media may be volatile, non-volatile, or a combination of volatile and non-volatile.
[0085] An embodiment of the present invention provides a computer program product, including program code instructions. When the program product is executed by a computer, the program code instructions enable the computer to execute any of the safety detection methods for planning routes of unmanned aerial vehicles described above.
[0086] Compared with the prior art, the embodiments of the present invention can achieve at least one of the following beneficial effects:
[0087] 1. The solution of the present invention introduces automated testing technology into route inspection, automatically realizes the inspection of route safety, and meets the rapid detection requirements of reconnaissance routes.
[0088] 2. The solution of the present invention uses universal longitude and latitude data, and the algorithm has strong compatibility, which can meet the needs of route safety detection in various scenarios.
[0089] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for detecting the safety of a planned route of an unmanned aerial vehicle, characterized in that: The following steps are involved: Get the latitude and longitude values of two waypoints in any segment of the planned route of the drone; Determining a straight line model representing the flight segment according to the latitude and longitude values of the two waypoints; Get the longitude and latitude values of each vertex of the no-fly zone; The safety of the flight segment is determined according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone.
2. The detection method according to claim 1, characterized in that: Determining the safety of the flight segment according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone includes: Mapping the original longitude value or the original latitude value of the no-fly zone vertex onto the straight line model to obtain the mapped latitude value or the mapped longitude value of the no-fly zone vertex; Comparing the mapped latitude value of the no-fly zone vertex with the original latitude value or the mapped longitude value with the original longitude value; The safety of the flight segment is determined according to the comparison results of the mapped latitude values and the original latitude values or the comparison results of the mapped longitude values and the original longitude values of all the no-fly zone vertices.
3. The detection method according to claim 2, characterized in that: Determining the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the mapped longitude values and the original longitude values of all the no-fly zone vertices includes: If the mapped latitude values of all the no-fly zone vertices are greater than or less than the original latitude values or the mapped longitude values are greater than or less than the original longitude values, the flight segment is safe, otherwise it is not safe.
4. The detection method according to claim 2, characterized in that: Determining the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the mapped longitude values and the original longitude values of all the no-fly zone vertices includes: In response to at least one of the no-fly zone vertices having a mapped latitude value greater than the original latitude value and at least one of the no-fly zone vertices having a mapped latitude value less than the original latitude value or at least one of the no-fly zone vertices having a mapped longitude value greater than the original longitude value and at least one of the no-fly zone vertices having a mapped longitude value less than the original longitude value, marking the flight segment as crossing the no-fly zone and not being safe.
5. The detection method according to claim 2, characterized in that: Determining the safety of the flight segment according to the comparison results of the mapped latitude values and the original latitude values or the mapped longitude values and the original longitude values of all the no-fly zone vertices includes: In response to only one of the no-fly zone vertices having a mapped latitude value equal to the original latitude value and all other mapped latitude values of the no-fly zone vertices being greater than or less than the original latitude value, or only one of the no-fly zone vertices having a mapped longitude value equal to the original longitude value and all other mapped longitude values of the no-fly zone vertices being greater than or less than the original longitude value, marking the flight segment as critical to the no-fly zone and unsafe.
6. The detection method according to claim 1, characterized in that: The following steps are also included: The safety of the planned route of the drone is determined based on the safety of all the flight segments in the planned route of the drone.
7. A safety detection device for planning a route for an unmanned aerial vehicle, characterized in that: include: The first acquisition module is configured to obtain the latitude and longitude values of two waypoints in any segment of the planned route of the drone; A first determination module is configured to determine a straight line model representing the flight segment according to the latitude and longitude values of the two waypoints; The second acquisition module is configured to obtain the longitude and latitude values of each vertex of the no-fly zone; as well as The second determination module is configured to determine the safety of the flight segment according to the straight line model and the longitude and latitude values of each vertex of the no-fly zone.
8. An electronic device comprising: at least one processor; A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the safety detection method for planning a route for a drone as described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the safety detection method for planning a route for an unmanned aerial vehicle according to any one of claims 1 to 6.
10. A computer program product comprising program code instructions which, when the program product is executed by a computer, cause the computer to perform the method of at least one of claims 1 to 6.