UAV control method, device, electronic device and computer readable medium
The method and device stabilize drone mode transitions by adjusting flight speed and updating waypoints, addressing sudden attitude angle changes and collision risks during mode switches.
Patent Information
- Application Number
- CN201811545280.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-17
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2038-12-17
AI Technical Summary
Existing drone control systems face issues of sudden attitude angle changes and collision risks when switching from manual to automatic mode due to speed margins and unadjusted route trajectories, posing safety hazards.
A method and device that adjust the drone's real-time flight speed to a predetermined threshold, decelerate horizontally and vertically, and update waypoint data based on historical flight data to ensure stable mode transitions.
Improves stability and route flexibility by limiting sudden attitude angle changes and ensuring safe mode transitions, reducing collision risks.
Smart Images

Figure CN111324135B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of unmanned aerial vehicles, and in particular to a method, device, electronic device and computer-readable medium for controlling an unmanned aerial vehicle. Background Art
[0002] With the development of drone technology and the gradual maturity of control systems, more and more drones are being used in logistics, security, plant protection, inspection and other fields. When drones are performing autonomous waypoint missions, in some special cases, it is necessary to switch between automatic mode and manual mode. For example, in an emergency, during the autonomous return of a logistics drone, if there are obstacles in the temporary route of the autonomous return, the drone without obstacle avoidance function needs to switch to manual mode first, manually control it to bypass the obstacle, and then switch to automatic mode to continue the route flight.
[0003] Since the control of automatic mode generally requires three waypoints: the previous waypoint, the current waypoint, and the next waypoint, the existing technology generally adopts the following method when the drone switches modes: when switching from automatic mode to manual mode, the current waypoint ID is recorded; when the manual flight ends, the manual mode is switched to automatic mode, and the corresponding three waypoints in the waypoint file are re-read according to the previously recorded waypoint ID, and the automatic mode flight continues. However, the existing technology has the following shortcomings:
[0004] (1) Since there may be a speed margin in the manual mode, a sudden speed change is likely to occur when switching from manual mode to automatic mode, resulting in a large attitude angle.
[0005] (2) After switching back to automatic mode, the original waypoint is still used and the route trajectory has not changed, so there is still a risk of collision with obstacles.
[0006] (3) If the expected speed planning is related to the position of the aircraft in the route, then after switching from manual mode to automatic mode, the speed expectation is larger because the position of the drone is not at the initial position of the route, resulting in a larger attitude angle, which poses certain safety hazards. Summary of the invention
[0007] In view of this, the present application provides a drone control method, device, electronic device and computer-readable medium, which can improve the poor stability problem caused by sudden changes in attitude angle and expected speed when the drone is switched from manual mode to automatic mode, and improve route flexibility.
[0008] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0009] According to a first aspect of an embodiment of the present application, a method for controlling a drone is proposed, the method comprising: receiving an instruction to switch a drone from a manual flight mode to an automatic flight mode; adjusting the real-time flight speed of the drone to within a predetermined flight speed threshold; determining a route of the drone; and the drone automatically flying according to the adjusted real-time flight speed and the route.
[0010] In an exemplary embodiment of the present application, adjusting the real-time flight speed of the UAV to a predetermined flight speed includes: decelerating the UAV until the real-time flight speed meets a predetermined flight speed threshold.
[0011] In an exemplary embodiment of the present application, decelerating the drone includes: decelerating the horizontal flight speed of the drone; and decelerating the vertical flight speed of the drone.
[0012] In an exemplary embodiment of the present application, decelerating the horizontal flight speed of the UAV includes: determining an expected change value of the horizontal speed by comparing the horizontal flight speed with a predetermined threshold of the horizontal speed; and determining the horizontal flight speed of the UAV by comparing the expected change value of the horizontal speed.
[0013] In an exemplary embodiment of the present application, decelerating the vertical flight speed of the UAV includes: determining an expected change value of the vertical speed by comparing the vertical flight speed with a predetermined vertical speed threshold; and determining the vertical flight speed of the UAV by the expected change value of the vertical speed.
[0014] In an exemplary embodiment of the present application, determining the route of the drone includes: determining the route of the drone through historical waypoint data.
[0015] In an exemplary embodiment of the present application, determining the route of the drone through historical waypoint data includes: acquiring first waypoint data, second waypoint data, and third waypoint data in the historical waypoint data; and determining the route through the current position of the drone and the first waypoint data, the second waypoint data, and the third waypoint data.
[0016] In an exemplary embodiment of the present application, determining the route through the current position of the UAV and the first waypoint data, the second waypoint data, and the third waypoint data includes: determining a first distance through the current position of the UAV and the second waypoint data; determining a first vector through the first waypoint data and the second waypoint data; determining a route inclination angle based on a relationship between the first vector and a vertical direction; and updating the first waypoint data through the first distance and the route inclination angle.
[0017] In an exemplary embodiment of the present application, updating the first waypoint data using the first distance and the route inclination angle includes: updating the first waypoint data according to a relationship between the first distance and a distance threshold.
[0018] In an exemplary embodiment of the present application, updating the first waypoint data using the first distance and the route inclination angle includes: updating the first waypoint data according to a relationship between the route inclination angle and a inclination angle threshold.
[0019] According to the second aspect of an embodiment of the present application, a drone control device is proposed, which includes: a command module for receiving a command to switch a drone from a manual flight mode to an automatic flight mode; a speed module for adjusting the real-time flight speed of the drone to within a predetermined flight speed threshold; a route module for determining the route of the drone; and an automatic flight module for causing the drone to automatically fly according to the adjusted real-time flight speed and the route.
[0020] According to the third aspect of an embodiment of the present application, an electronic device is proposed, which includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned drone control methods.
[0021] According to a fourth aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, a drone control method as described in any one of the above items is implemented.
[0022] According to the drone control method, device, electronic device and computer-readable medium of the present application, it is possible to improve the problem of poor stability caused by sudden changes in attitude angle and expected speed when the drone is switched from manual mode to automatic mode, and improve route flexibility.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. The drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 The present invention is a system block diagram of a method and device for controlling a drone according to an exemplary embodiment.
[0026] Figure 2 The figure is a flow chart of a method for controlling a drone according to an exemplary embodiment.
[0027] Figure 3 The figure is a flow chart of a method for controlling a drone according to an exemplary embodiment.
[0028] Figure 4 The figure is a flow chart of a method for controlling a drone according to an exemplary embodiment.
[0029] Figure 5 The figure is a flow chart of a method for controlling a drone according to an exemplary embodiment.
[0030] Figure 6 The figure is a block diagram of a drone control device according to an exemplary embodiment.
[0031] Figure 7 The present invention is a block diagram of an electronic device for controlling a drone according to an exemplary embodiment. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0033] The described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0034] The accompanying drawings are only schematic illustrations of the present invention, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some block diagrams shown in the accompanying drawings do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and steps, nor must they be executed in the order described. For example, some steps can be decomposed, and some steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0036] Exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0037] Figure 1 The present invention is a system block diagram of a method and device for controlling a drone according to an exemplary embodiment.
[0038] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for the drone control system operated by the user using the terminal devices 101, 102, and 103. The background management server may analyze and process the received drone control request and other data, and feed back the processing results (such as specific values of drone speed adjustment and waypoint coordinates - only as an example) to the terminal device.
[0039] The server 105 may, for example, receive an instruction to switch the drone from a manual flight mode to an automatic flight mode; the server 105 may, for example, adjust the real-time flight speed of the drone to within a predetermined flight speed threshold; the server 105 may, for example, determine the route of the drone. The server 105 may, for example, enable the drone to automatically fly according to the adjusted real-time flight speed and the route.
[0040] The server 105 may be a physical server, or may be composed of multiple servers, a part of the server 105 may be used as the drone command receiving system in the present application, for obtaining the user's command to switch the drone from a manual flight mode to an automatic flight mode; and a part of the server 105 may be used as the drone control system in the present application, for adjusting the real-time flight speed of the drone to within a predetermined flight speed threshold; determining the route of the drone; and the drone automatically flies according to the adjusted real-time flight speed and the route.
[0041] It should be noted that the drone control method provided in the embodiment of the present application can be executed by the server 105, and accordingly, the drone control device can be set in the server 105. The request end provided to the user for sending instructions is generally located in the terminal devices 101, 102, and 103.
[0042] Figure 2 is a flow chart of a method for controlling a drone according to an exemplary embodiment. Figure 2 The drone control method shown can improve the poor stability problem caused by sudden changes in attitude angle and expected speed when the drone is switched from manual mode to automatic mode, and improve the route flexibility.
[0043] Next, we will refer to Figure 2 , the drone control method in the exemplary embodiment of the present application is described.
[0044] In step S210, an instruction to switch the drone from manual flight mode to automatic flight mode is received. In some special cases, it is necessary to switch between automatic mode and manual mode. For example, in an emergency, during the autonomous return of a logistics drone, if there are obstacles in the temporary route of autonomous return, the drone without obstacle avoidance function needs to switch to manual mode first, manually control it to bypass the obstacle, and then switch to automatic mode to continue flying according to the route.
[0045] In step S220, the real-time flight speed of the drone is adjusted to within the predetermined flight speed threshold. In particular, since there may still be a speed margin in the manual mode, when switching to the automatic mode, the speed is switched from the manual mode to the default speed in the automatic mode, and a sudden change in speed is likely to occur, causing the drone to have a larger attitude angle. In addition, when the speed expectation planning is related to the position of the drone in the route, after switching from the manual mode to the automatic mode, since the drone is not at the initial position of the route, the speed expectation is large, which will also cause the drone to have a larger attitude angle.
[0046] According to an example embodiment, step S220 may include: decelerating the drone until the real-time flight speed meets a predetermined flight speed threshold. In view of the aforementioned problem of a large attitude angle, the real-time speed of the drone may be decelerated, so that the flight speed of the drone is less than the threshold speed; and a control algorithm for limiting the slope of the speed expectation may be added to the deceleration control logic.
[0047] According to an example embodiment, decelerating the drone may include: decelerating the horizontal flight speed of the drone; and decelerating the vertical flight speed of the drone. The real-time speed of the drone is decomposed into horizontal speed and vertical speed, but the present invention is not limited thereto, and other decomposition methods may be used, or no decomposition may be performed.
[0048] According to an exemplary embodiment, decelerating the horizontal flight speed of the drone includes: determining an expected change value of the horizontal speed by comparing the horizontal flight speed with a predetermined threshold of the horizontal speed; and determining the horizontal flight speed of the drone by the expected change value of the horizontal speed. hm When the horizontal speed of the drone is considered to be too large, the expected speed change value is calculated. (i.e. acceleration):
[0049]
[0050] Where dt is the time step, is the expected value of horizontal flight speed at time i, is the horizontal flight speed at time i-1. Then determine Among them, a hm is the threshold of the expected change value of the horizontal speed. When the above formula is satisfied, it is considered that the speed expectation is large. In order to avoid a large attitude angle, the speed expectation value can be adjusted: When judging When , it is considered that the horizontal speed of the UAV is within the safe range, then
[0051] According to an exemplary embodiment, decelerating the vertical flight speed of the drone includes: determining an expected vertical speed change value by comparing the vertical flight speed with a predetermined vertical speed threshold; and determining the vertical flight speed of the drone by comparing the expected vertical speed change value. zm When the vertical speed of the UAV is considered to be too large, the expected speed change value is calculated. (i.e. acceleration):
[0052]
[0053] Where dt is the time step. is the expected value of vertical flight speed at time i, is the vertical flight speed at time i-1. Then determine Among them, a zmis the vertical speed expected change value threshold. When the above formula is satisfied, it is considered that the speed expectation is large. In order to avoid a large attitude angle, the speed expectation value can be adjusted: When judging When , it is considered that the vertical speed of the UAV is within the safe range, then
[0054] In step S230, the route of the drone is determined. According to an example embodiment, step S230 may include: determining the route of the drone through historical waypoint data. In automatic mode, the route of the drone is determined by waypoints, and the drone will complete the flight mission according to the route planned by the waypoints. For example, when the drone switches from manual mode to automatic mode, the waypoint data last recorded before switching to manual mode can be obtained.
[0055] According to an example embodiment, determining the route of the drone through historical waypoint data may include: acquiring first waypoint data, second waypoint data, and third waypoint data in the historical waypoint data; and determining the route through the current position of the drone and the first waypoint data, the second waypoint data, and the third waypoint data. The first waypoint data may be a previous waypoint, the second waypoint data may be a current waypoint, and the third waypoint data may be a next waypoint.
[0056] According to an example embodiment, determining the route through the current position of the drone and the first waypoint data, the second waypoint data, and the third waypoint data may include: determining a first distance through the current position of the drone and the second waypoint data; determining a first vector through the first waypoint data and the second waypoint data; determining a route inclination angle according to the relationship between the first vector and the vertical direction; and updating the first waypoint data through the first distance and the route inclination angle. For example, there is a first waypoint A (x1, y1, z1), a second waypoint B (x2, y2, z2), a third waypoint C (x3, y3, z3) and the current position P (x p ,y p , z p ). The first distance may be the horizontal distance between the current position P of the drone and the second waypoint B. The first vector may be a vector
[0057] According to an example embodiment, updating the first waypoint data by using the first distance and the route inclination angle may include: updating the first waypoint data according to the relationship between the first distance and the distance threshold. m When x1=x p , y1=y p , z1=z p, where d m is the distance threshold; when d>d m When x1=x p , y1=y p , z1=z2. It should be understood that the technical solution of the present invention is not limited to this, and the above condition judgment may not be performed, and the current position of the drone is directly assigned to the first waypoint data to complete the update.
[0058] According to an example embodiment, updating the first waypoint data by using the first distance and the route tilt angle may include: updating the first waypoint data according to the relationship between the route tilt angle and the tilt angle threshold. For example, the vector The unit vector perpendicular to When the angle α between (0,0,1) and sinα is less than the tilt angle threshold, let x1=x2, y1=y2, z1=z p .
[0059] In step S240, the UAV automatically flies according to the adjusted real-time flight speed and the route.
[0060] According to the drone control method of the present application, by adjusting the real-time flight speed and route of the drone, it is possible to improve the poor stability problem caused by sudden changes in attitude angle and expected speed when the drone is switched from manual mode to automatic mode, and improve route flexibility.
[0061] Figure 3 FIG. 1 is a flow chart of a method for controlling a drone according to an exemplary embodiment. Figure 3 , the drone control method may include:
[0062] Step S310, determining the first distance through the current position of the drone and the second waypoint data. The first waypoint A (x1, y1, z1), the second waypoint B (x2, y2, z2), the third waypoint C (x3, y3, z3) and the current position P (x p ,y p , z p ). The first distance may be the horizontal distance between the current position P of the drone and the second waypoint B.
[0063] Step S320, determining a first vector by using the first waypoint data and the second waypoint data. As mentioned above, the first vector may be a vector
[0064] Step S330, determining the course inclination angle according to the relationship between the first vector and the vertical direction. For example, the inclination angle can be a vector The unit vector perpendicular to The angle α.
[0065] Step S340: Update the first waypoint data by using the first distance and the route inclination angle. m When x1=x p , y1=y p , z1=z p , where d m is the distance threshold; when d>d m When x1=x p , y1=y p , z1=z2. For another example, when sinα is less than the tilt angle threshold, let x1=x2, y1=y2, z1=z p .
[0066] Figure 4 FIG. 1 is a flow chart of a method for controlling a drone according to an exemplary embodiment. Figure 4 , the drone control method may include:
[0067] Step S410, initialize the expected horizontal speed and the current expected horizontal speed. The horizontal speed at the moment of switching is: Current horizontal speed expectation
[0068] Step S420: according to the horizontal speed and the horizontal speed threshold v hm , acceleration threshold value a hm Determine the expected change in horizontal velocity. For example, v hm The possible values are 0.1m / s-1.0m / s, and the acceleration threshold value is a hm The value can be 0.1m / s 2 —5.0m / s 2 , the present invention does not make any special limitation on this. Calculate the expected rate of change of speed: Where dt is the time step. If but if but if
[0069] Step S430, initialize the vertical speed expectation and the current vertical and horizontal speed expectation. The vertical speed at the moment of switching is Initial vertical speed Current horizontal speed expectation
[0070] Step S440: according to the vertical speed and the vertical speed threshold v zm , acceleration threshold value a zm Determine the desired change in vertical velocity. For example, v zm The possible values are 0.1m / s-1.0m / s, and the acceleration threshold value is a zm The value can be 0.1m / s 2 —5.0m / s 2 , the present invention does not make any special limitation on this. Calculate the expected rate of change of speed: Where dt is the time step. If but if but if Among them, a hm and a zm It is not necessarily a fixed value and can change with the speed of the drone or time.
[0071] Step S450, i++, repeat steps S410 to S440 until End the process.
[0072] Figure 5 FIG. 1 is a flow chart of a method for controlling a drone according to an exemplary embodiment. Figure 5 , the drone control method may include:
[0073] Step S510, read the waypoint file, and obtain the three waypoints before the automatic mode is switched to the manual mode. The three waypoints can be respectively represented as: the previous waypoint A (x1, y1, z1), the current waypoint B (x2, y2, z2), and the next waypoint C (x3, y3, z3).
[0074] Step S520, calculate the horizontal distance between the current position of the drone and the current waypoint. For example, the current position of the drone P(x p ,y p , z p ) and the horizontal distance d from the current waypoint B can be expressed as
[0075] Step S530, calculate the course inclination angle. For example, the vector is obtained based on the A and B coordinates. Then we get the route and the vertical unit vector Angle
[0076] Step S540: according to the horizontal distance threshold d m Reset the coordinates of the last waypoint. mFor example, the value may be 0.5m-2m, but the present invention does not impose any special limitation on this. m , then let x1=x p , y1=y p , z1=z p ; if d>d m , then let x1=x p , y1=y p , z1=z2.
[0077] Step S550, determine whether it is a vertical route. For example, the vertical tilt angle of the route direction is determined based on v = sin (α), and the vertical direction determination threshold is v m (For example, 0.1m / s-0.5m / s). If v≤v m , indicating that the original route is nearly vertical, so let x1 = x2, y1 = y2, z1 = z p .
[0078] According to an example embodiment, one or more of steps S520, S530, S540, and S550 may be omitted, and the coordinates of the current position of the drone may be directly assigned to the previous waypoint.
[0079] According to the drone control method of the present application, by limiting the flight speed of the drone, adjusting the expected speed value, and updating the waypoint data, it is possible to improve the poor stability caused by the sudden change of attitude angle and expected speed when the drone is switched from manual mode to automatic mode, and improve the flexibility of the route. In summary, when switching from manual mode to automatic mode, the drone control method of the present application first implements a control strategy of decelerating to a speed less than a threshold value, and then performs slope limiting on the expected speed. After the mode is switched, the previous waypoint is reset according to different judgment conditions such as the route direction and the current position of the drone, which can improve the safety and stability of the drone when switching modes.
[0080] Figure 6 is a block diagram of a drone control device according to an exemplary embodiment. Figure 6 The drone control device may include: a command module 610 , a speed module 620 , a route module 630 and an automatic flight module 640 .
[0081] In the drone control device, the command module 610 is used to receive a command to switch the drone from manual flight mode to automatic flight mode. In some special cases, it is necessary to switch between automatic mode and manual mode. For example, in an emergency, during the autonomous return of a logistics drone, if there are obstacles in the temporary route of autonomous return, the drone without obstacle avoidance function needs to switch to manual mode first, manually control it to bypass the obstacle, and then switch to automatic mode to continue flying according to the route.
[0082] The speed module 620 is used to adjust the real-time flight speed of the drone to within a predetermined flight speed threshold. In particular, since there may still be a speed margin in the manual mode, when switching to the automatic mode, when the speed in the manual mode is switched to the default speed in the automatic mode, a sudden change in speed is likely to occur, causing the drone to have a larger attitude angle. In addition, when the speed expectation planning is related to the position of the drone in the route, after switching from the manual mode to the automatic mode, since the drone position is not at the initial position of the route, the speed expectation is large, which will also cause the drone to have a larger attitude angle.
[0083] The route module 630 is used to determine the route of the drone. When the drone switches from manual mode to automatic mode, its route can be reset. For example, when the drone switches from manual mode to automatic mode, the last waypoint data recorded before switching to manual mode can be obtained, and the route of the drone can be confirmed according to the current position.
[0084] The automatic flight module 640 is used to enable the UAV to automatically fly according to the adjusted real-time flight speed and the route.
[0085] According to the drone control device provided by the present application, by limiting the flight speed of the drone, adjusting the expected speed value, and updating the waypoint data, it is possible to improve the poor stability caused by the sudden change of attitude angle and expected speed when the drone is switched from manual mode to automatic mode, and improve the flexibility of the route. In summary, when the drone control device of the present application switches from manual mode to automatic mode, it first implements a control strategy of decelerating to a speed less than the threshold value, and then limits the slope of the expected speed. After the mode is switched, the previous waypoint is reset according to different judgment conditions such as the route direction and the current position of the drone, which can improve the safety and stability of the drone when switching modes.
[0086] Figure 7 The present invention is a block diagram of an electronic device for controlling a drone according to an exemplary embodiment.
[0087] Refer to the following Figure 7 hereinafter describes an electronic device 900 according to this embodiment of the present application. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 to a random access memory (RAM) 703. For example, the central processing unit 701 can perform the following operations: Figure 2 , Figure 3 , Figure 4 , Figure 5 1 or more of the steps shown.
[0089] In RAM 703, various programs and data required for system operation are also stored, such as waypoint data, horizontal speed threshold value, vertical speed threshold value, etc. CPU 701, ROM 702 and RAM 703 are connected to each other via bus 704. An input / output (I / O) interface 705 is also connected to bus 704.
[0090] The following components are connected to the I / O interface 705: an input section 706 including a touch screen, a keyboard, etc.; an output section 707 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 708 including a flash memory, etc.; and a communication section 709 including a wireless network card, a high-speed network card, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a semiconductor memory, a magnetic disk, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0091] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution of the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for a computing device (which can be a personal computer, a server, a mobile terminal, or a smart device, etc.) to execute the method according to the embodiment of the present invention, for example Figure 2 , Figure 3 , Figure 4 , Figure 5 1 or more of the steps shown.
[0092] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0093] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not claimed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the claims.
[0094] It should be understood that the present invention is not limited to the detailed structures, drawings or implementations shown herein, but rather the present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A method for controlling a drone, It is characterized in that include: Receive instructions to switch the drone from manual flight mode to automatic flight mode; Adjusting the real-time flight speed of the UAV to within a predetermined flight speed threshold; determining a route of the drone; as well as The UAV automatically flies according to the adjusted real-time flight speed and the route; Wherein, determining the route of the drone includes: obtaining first waypoint data, second waypoint data, and third waypoint data in historical waypoint data; determining the route through the current position of the drone and the first waypoint data, the second waypoint data, and the third waypoint data, wherein the first waypoint data is the previous waypoint, the second waypoint data is the current waypoint, and the third waypoint data is the next waypoint; Among them, determining the route through the current position of the drone and the first waypoint data, the second waypoint data, and the third waypoint data includes: determining a first distance through the current position of the drone and the second waypoint data; determining a first vector through the first waypoint data and the second waypoint data; determining a route inclination angle based on a relationship between the first vector and a vertical direction; and updating the first waypoint data through the first distance and the route inclination angle.
2. The method according to claim 1, It is characterized in that Adjusting the real-time flight speed of the drone to a predetermined flight speed includes: The drone is decelerated until the real-time flight speed meets a predetermined flight speed threshold.
3. The method according to claim 2, It is characterized in that The UAV is decelerated, including: decelerating the horizontal flight speed of the drone; and The vertical flight speed of the UAV is decelerated.
4. The method according to claim 3, It is characterized in that The deceleration process of the horizontal flight speed of the UAV includes: Determining an expected change value of the horizontal speed by using the horizontal flight speed and a predetermined threshold of the horizontal speed; and The horizontal flight speed of the UAV is determined by the expected change value of the horizontal speed.
5. The method according to claim 3, It is characterized in that The vertical flight speed of the UAV is decelerated by: Determine the expected change value of the vertical speed by using the vertical flight speed and the vertical speed predetermined threshold; and The vertical flight speed of the UAV is determined by the expected vertical speed change value.
6. The method according to claim 1, It is characterized in that Updating the first waypoint data by using the first distance and the route inclination angle includes: The first waypoint data is updated according to the relationship between the first distance and the distance threshold.
7. The method according to claim 1, It is characterized in that Updating the first waypoint data by using the first distance and the route inclination angle includes: The first waypoint data is updated according to the relationship between the route inclination angle and the inclination angle threshold.
8. A drone control device, It is characterized in that include: The command module is used to receive a command to switch the UAV from a manual flight mode to an automatic flight mode; A speed module, used to adjust the real-time flight speed of the UAV to within a predetermined flight speed threshold; A route module, used to determine the route of the drone; as well as An automatic flight module, used for the UAV to automatically fly according to the adjusted real-time flight speed and the route; The route module is further used to: obtain the first waypoint data, the second waypoint data, and the third waypoint data in the historical waypoint data; determine the route through the current position of the drone and the first waypoint data, the second waypoint data, and the third waypoint data, wherein the first waypoint data is the previous waypoint, the second waypoint data is the current waypoint, and the third waypoint data is the next waypoint; Among them, the route module is also used to: determine a first distance through the current position of the drone and the second waypoint data; determine a first vector through the first waypoint data and the second waypoint data; determine a route inclination angle based on the relationship between the first vector and the vertical direction; and update the first waypoint data through the first distance and the route inclination angle.
9. An electronic device, It is characterized in that include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
