Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for controlling navigation of an aircraft, which can improve the safety of the aircraft in the flight process, and the technical scheme is as follows:
in a first aspect, there is provided a method of controlling navigation of an aircraft, the method comprising:
setting a waypoint sequence of a target aircraft as a reference waypoint sequence, and acquiring a second waypoint in the reference waypoint sequence as a reference waypoint, wherein the waypoint sequence comprises a plurality of waypoints arranged according to a navigation sequence;
determining a steering angle of the reference waypoint, if the steering angle is larger than an angle threshold value, adding at least one waypoint between two waypoints in the reference waypoint sequence based on the reference waypoint, two waypoints adjacent to the reference waypoint in the reference waypoint sequence, the steering angle and the angle threshold value, setting the reference waypoint sequence after adding the waypoint as the reference waypoint sequence, and if the steering angle is smaller than or equal to the angle threshold value, keeping the reference waypoint sequence unchanged;
if the reference waypoint is not the penultimate waypoint in the reference waypoint sequence, setting the next waypoint of the reference waypoint as the reference waypoint in the reference waypoint sequence, and turning to execute the determining of the steering angle of the reference waypoint;
And if the reference waypoint is the penultimate waypoint in the reference waypoint sequence, controlling the target aircraft to navigate based on the reference waypoint sequence.
Optionally, the adding at least one waypoint between two waypoints in the reference waypoint sequence based on the reference waypoint, two waypoints adjacent to the reference waypoint in the reference waypoint sequence, the steering angle, and the angle threshold comprises:
determining a target curve of the two waypoints adjacent to the reference waypoint;
determining a target number of added waypoints between the two waypoints based on the steering angle and the angle threshold;
uniformly selecting the target number of waypoints on the target curve;
determining a first navigation point relatively ahead in the reference navigation point sequence in the two navigation points, and sequentially adding each selected navigation point between the two navigation points in the reference navigation point sequence based on the distance between each selected navigation point and the first navigation point on the target curve and the distance between the reference navigation point and the first navigation point on the target curve.
Optionally, the determining, based on the steering angle and the angle threshold, the target number of adding waypoints between the two waypoints includes:
Determining a target ratio of the steering angle to the angle threshold;
and determining the target number of the added waypoints between the two waypoints based on the target ratio and the corresponding relation between the preset ratio and the number.
Optionally, the determining the target curve of the reference waypoint and two waypoints adjacent to the reference waypoint includes:
determining a curve locating point based on the following equation set, wherein the curve locating point is a reference point for determining the target curve;
wherein x is 0 、y 0 Is the coordinate of a curve locating point, x 1 、y 1 X is the coordinates of the reference waypoint 2 、y 2 X is the coordinates of the first waypoint 3 、y 3 For the coordinates of a second, relatively later, of the two waypoints in the reference waypoint sequence, x 4 、y 4 X is the coordinate of the first intersection point of the target straight line passing through the reference waypoint and the first line segment 5 、y 5 The coordinates of a second intersection point of the target straight line and a second line segment, wherein two end points of the first line segment are respectively the first navigation pointsThe two endpoints of the second line segment are the second navigation point and the curve locating point respectively;
the target curve is determined based on the curve locating point, the first waypoint and the second waypoint.
Optionally, the determining the target curve based on the curve locating point, the first waypoint and the second waypoint includes:
selecting a first moving point on the first line segment, wherein the initial position of the first moving point is the same as the navigation point position of the first navigation point, selecting a second moving point on the second line segment, wherein the initial position of the second moving point is the same as the curve locating point, and selecting a third moving point on the third line segment, wherein two end points of the third line segment are the first moving point and the second moving point respectively, and the initial position of the third moving point is the same as the initial position of the first moving point;
respectively controlling the first moving point to move to the curve locating point, the second moving point to move to the second navigation point, the third moving point to move to the second moving point, determining a first distance between the first moving point and the first navigation point, a second distance between the second moving point and the second navigation point, and a third distance between the third moving point and the first moving point;
maintaining a first ratio of a distance between the first waypoint and the curve setpoint to the first distance, a second ratio of a distance between the second waypoint and the curve setpoint to the second distance, and a third ratio of a distance between the first and second moving points to the third distance equal during movement of the first, second, and third moving points;
And stopping the movement of the first moving point, the second moving point and the third moving point when the first moving point moves to the curve locating point, and determining the movement track of the third moving point as a target curve.
In a second aspect, there is provided an apparatus for controlling the voyage of an aircraft, the apparatus comprising:
the system comprises an acquisition module, a navigation module and a navigation module, wherein the acquisition module is used for setting a navigation point sequence of a target aircraft as a reference navigation point sequence, and acquiring a second navigation point in the reference navigation point sequence as a reference navigation point, wherein the navigation point sequence comprises a plurality of navigation points arranged according to navigation sequence;
an adding module, configured to determine a steering angle of the reference waypoint, and if the steering angle is greater than an angle threshold, add at least one waypoint between two waypoints in the reference waypoint sequence based on the reference waypoint, two waypoints adjacent to the reference waypoint in the reference waypoint sequence, the steering angle, and the angle threshold, set a reference waypoint sequence after adding the waypoint as a reference waypoint sequence, and if the steering angle is less than or equal to the angle threshold, keep the reference waypoint sequence unchanged;
The judging module is used for setting the next navigation point of the reference navigation point as the reference navigation point in the reference navigation point sequence if the reference navigation point is not the last-to-last navigation point in the reference navigation point sequence, and turning to execute the steering angle of the reference navigation point; and if the reference waypoint is the penultimate waypoint in the reference waypoint sequence, controlling the target aircraft to navigate based on the reference waypoint sequence.
Optionally, the adding module is configured to:
determining a target curve of the two waypoints adjacent to the reference waypoint;
determining a target number of added waypoints between the two waypoints based on the steering angle and the angle threshold;
uniformly selecting the target number of waypoints on the target curve;
determining a first navigation point relatively ahead in the reference navigation point sequence in the two navigation points, and sequentially adding each selected navigation point between the two navigation points in the reference navigation point sequence based on the distance between each selected navigation point and the first navigation point on the target curve and the distance between the reference navigation point and the first navigation point on the target curve.
Optionally, the adding module is configured to:
determining a target ratio of the steering angle to the angle threshold;
and determining the target number of the added waypoints between the two waypoints based on the target ratio and the corresponding relation between the preset ratio and the number.
Optionally, the adding module is configured to:
determining a curve locating point based on the following equation set, wherein the curve locating point is a reference point for determining the target curve;
wherein x0 and y0 are coordinates of a curve locating point, x1 and y1 are coordinates of the reference waypoint, x2 and y2 are coordinates of the first waypoint, x3 and y3 are coordinates of a second waypoint which is relatively backward in the reference waypoint sequence in the two waypoints, x4 and y4 are coordinates of a first intersection point of a target straight line passing through the reference waypoint and a first line segment, x5 and y5 are coordinates of a second intersection point of the target straight line and the second line segment, wherein two end points of the first line segment are the first waypoint and the curve locating point respectively, and two end points of the second line segment are the second waypoint and the curve locating point respectively;
the target curve is determined based on the curve locating point, the first waypoint and the second waypoint.
Optionally, the adding module is configured to:
selecting a first moving point on the first line segment, wherein the initial position of the first moving point is the same as the navigation point position of the first navigation point, selecting a second moving point on the second line segment, wherein the initial position of the second moving point is the same as the curve locating point, and selecting a third moving point on the third line segment, wherein two end points of the third line segment are the first moving point and the second moving point respectively, and the initial position of the third moving point is the same as the initial position of the first moving point;
respectively controlling the first moving point to move to the curve locating point, the second moving point to move to the second navigation point, the third moving point to move to the second moving point, determining a first distance between the first moving point and the first navigation point, a second distance between the second moving point and the second navigation point, and a third distance between the third moving point and the first moving point;
maintaining a first ratio of a distance between the first waypoint and the curve setpoint to the first distance, a second ratio of a distance between the second waypoint and the curve setpoint to the second distance, and a third ratio of a distance between the first and second moving points to the third distance equal during movement of the first, second, and third moving points;
And stopping the movement of the first moving point, the second moving point and the third moving point when the first moving point moves to the curve locating point, and determining the movement track of the third moving point as a target curve.
In yet another aspect, a computer device is provided, characterized in that it comprises a processor and a memory, said memory having stored therein at least one instruction loaded and executed by said processor to carry out the operations performed by the method of controlling the voyage of an aircraft as described above.
In yet another aspect, a computer readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement operations performed by a method of controlling an aircraft voyage as described above.
The beneficial effects that technical scheme that this application embodiment provided brought are:
according to the method for controlling the navigation of the aircraft, whether the steering angle corresponding to the plurality of waypoints in the navigation data is larger than the angle threshold value can be sequentially determined, and if the corresponding steering angle is larger than the angle threshold value, the waypoints can be added between two adjacent waypoints of the waypoints, so that the steering angle corresponding to the waypoints is reduced. Therefore, by adopting the method and the device, the steering angle corresponding to each waypoint can be smaller than the set angle threshold value, so that dangerous situations such as overturning caused by overlarge steering angle in the course of the aircraft in the course of the journey can be avoided, and the safety of the aircraft in the course of the journey is improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The method for controlling the navigation of the aircraft can be realized by the terminal, the terminal can be provided with a processor and a memory, wherein the memory can store an execution program and execution data corresponding to the method for controlling the navigation of the aircraft, and the processor can process the execution data according to the stored execution program in the memory so as to realize the method for controlling the navigation of the aircraft. The terminal may further include a display device, and a data transmission device, wherein the display device may display a navigation map or the like corresponding to the aircraft, and the data transmission device may establish wired or wireless connection with the aircraft, and may transmit data with the aircraft. The terminal can be a mobile phone, a tablet computer, intelligent wearable equipment, a desktop computer, a notebook computer and the like.
In the application, an aircraft is taken as an unmanned aerial vehicle, and a terminal is taken as control equipment for controlling the unmanned aerial vehicle to fly, so that a method for controlling the aircraft to fly is described. The user can set a route for the unmanned aerial vehicle through the control device. For example, the control device is provided with a touch-controllable display screen, a map image of the current position of the user can be displayed in the display screen, the user can perform operations such as enlarging and reducing the map image, and can set waypoints for the unmanned aerial vehicle by clicking on the map image, and a plurality of waypoints can form a waypoint sequence according to the clicking sequence of the user to obtain a route corresponding to the unmanned aerial vehicle. When a user sets a route of the unmanned aerial vehicle on the control equipment, the corresponding waypoint sequence can be sent to the unmanned aerial vehicle, and the unmanned aerial vehicle can fly according to the received waypoint sequence after receiving the waypoint sequence and the flight instruction. The unmanned aerial vehicle can acquire positioning information of the unmanned aerial vehicle, namely longitude and latitude of the current flight position, and can adjust the flight direction of the unmanned aerial vehicle to fly towards the position of the next waypoint when the unmanned aerial vehicle flies to the position corresponding to any waypoint in the waypoint sequence in the flight process.
According to the method for controlling the navigation of the aircraft, after the user sets the route for the unmanned aerial vehicle, the steering angles corresponding to the plurality of waypoints in the route can be detected, if the corresponding waypoints with the steering angles larger than the preset angle threshold exist, one or more waypoints can be added between two adjacent waypoints in the waypoint sequence, and the steering angle of the unmanned aerial vehicle at the waypoints is reduced. Can avoid unmanned aerial vehicle at the flight in-process, because turn to the angle too big dangerous condition such as upset appears, the security of unmanned aerial vehicle flight has been improved.
Fig. 1 is a flowchart of a method for controlling navigation of an aircraft according to an embodiment of the present application. Referring to fig. 1, this embodiment includes:
step 101, setting a navigation point sequence of a target aircraft as a reference navigation point sequence, and acquiring a second navigation point in the reference navigation point sequence as a reference navigation point.
The navigation point sequence comprises a plurality of navigation points arranged according to navigation sequence, wherein the navigation sequence can be the sequence of clicking and setting each navigation point when a user sets a navigation route.
In implementation, after the control device sets the route of the unmanned aerial vehicle, the control device may determine the waypoint sequence corresponding to the route as the reference waypoint sequence, and determine the second waypoint in the reference waypoint sequence as the reference waypoint.
Step 102, determining the steering angle of the reference waypoint.
The steering angle of the unmanned aerial vehicle at any waypoint is an included angle between an extension line of a connecting line of a previous waypoint and the waypoint of the waypoint and a connecting line of the next waypoint and the waypoint, wherein the previous waypoint and the next waypoint of the waypoint can be determined according to a reference waypoint sequence.
In practice, after the reference waypoint is determined in the sequence of reference waypoints, the corresponding steering angle of the drone when flying to the location of the reference waypoint may be determined. If the position of the reference waypoint and the positions of two waypoints adjacent to the reference waypoint in the reference waypoint sequence can be obtained, the corresponding steering angle when the unmanned aerial vehicle flies to the position of the reference waypoint is calculated according to the position of the reference waypoint and the positions of the two waypoints adjacent to the reference waypoint. As shown in fig. 2, two waypoints adjacent to the reference waypoint are the waypoint a and the waypoint C, respectively, and the steering angle corresponding to the reference waypoint B may be +.b.
The location of a general waypoint may be represented by latitude and longitude, but latitude and longitude are not convenient for directly calculating the steering angle corresponding to the waypoint. The position of each waypoint can be converted from longitude and latitude to coordinates in a two-dimensional coordinate system before calculating the steering angle. The corresponding process may be as follows:
The position of each waypoint can be converted into an radian coordinate from longitude and latitude, the radian coordinate corresponding to the position of one waypoint is selected and determined as a reference coordinate point, and the selected reference coordinate point is used as an origin in a two-dimensional coordinate system. For example, the coordinates of the reference coordinate point may be selected as the coordinates of the radian system corresponding to the first waypoint on the waypoint sequence. For example, the reference coordinate point may be (ref_lat, ref_lon), and assuming that the RADIUS constant of the EARTH is radius_earth, the coordinate values (X, Y) corresponding to any one radian coordinate (lat, lon) to be converted in the two-dimensional coordinate system may be expressed as:
X=RADIUS_EARTH*(lat–ref_lat)
Y=RADIUS_EARTH*cos(ref_lat)*(lon–ref_lon)
thus, the coordinate value of each waypoint in the two-dimensional coordinate system can be obtained. For the steering angle of the reference waypoint, the coordinate values of the reference waypoint and two waypoints adjacent to the reference waypoint in the two-dimensional coordinate system can be calculated. The following are provided:
and respectively calculating vectors respectively formed by the two navigation points adjacent to the reference navigation point according to the coordinate values of the two navigation points adjacent to the reference navigation point in the two-dimensional coordinate system. Then, the cosine value of the included angle between the two vectors can be calculated according to a vector formula, as follows:
The vector a is a vector of the reference waypoint pointing to the reference waypoint from the previous waypoint corresponding to the reference waypoint in the reference waypoint sequence, and the vector b is a vector of the reference waypoint pointing to the next waypoint corresponding to the reference waypoint in the reference waypoint sequence. As shown in fig. 2, vector a may be a vector in which waypoint a points to reference waypoint B, and vector B may be a vector in which reference waypoint B points to waypoint C. After the cosine value of the included angle of the two vectors is calculated, the included angle between the two vectors can be determined. The included angle between the two vectors is the steering angle of the unmanned aerial vehicle at the reference waypoint.
Step 103, if the steering angle is greater than the angle threshold, adding at least one waypoint between two waypoints in the reference waypoint sequence based on the reference waypoint, two waypoints adjacent to the reference waypoint in the reference waypoint sequence, the steering angle and the angle threshold, setting the reference waypoint sequence after adding the waypoint as the reference waypoint sequence, and if the steering angle is less than or equal to the angle threshold, keeping the reference waypoint sequence unchanged.
The angle threshold may be preset by a technician, for example, may be set according to the flight performance of the unmanned aerial vehicle and experience of the technician, for example, when the steering angle of the unmanned aerial vehicle is greater than a certain angle, there is a certain probability that dangerous situations such as overturn occur, and then the value of the angle may be set as the angle threshold.
In the implementation, if the steering angle of the reference waypoint is greater than the angle threshold, the waypoint can be added between two waypoints adjacent to the reference waypoint in the reference waypoint sequence, and the added waypoint can share the steering angle of the unmanned aerial vehicle at the reference waypoint to a certain extent, so that the steering angle of the unmanned aerial vehicle at the reference waypoint is reduced. As shown in fig. 3, the waypoint B in fig. 3 may be a reference waypoint, the waypoint A, C is two adjacent waypoints of the waypoint B, and by adding the waypoint D, E between the waypoint a and the waypoint C, the unmanned aerial vehicle may perform steering at the added waypoint D in advance before flying to the waypoint B, so as to reduce the steering angle of the unmanned aerial vehicle at the waypoint B; through adding waypoint E between waypoint C and waypoint B, can make unmanned aerial vehicle turn to the waypoint E of interpolation before waypoint B turns to waypoint C earlier, when flight to the waypoint E of interpolation, the unmanned aerial vehicle of control turns to waypoint C again, also can reduce unmanned aerial vehicle at the steering angle of waypoint B.
Here, the process of adding waypoints between two waypoints in the reference waypoint sequence will not be described in detail. The position of the added waypoint can be determined according to the reference waypoint and two waypoints adjacent to the reference waypoint, and the number of the added waypoints can be determined according to the steering angle of the unmanned aerial vehicle at the reference waypoint and a set angle threshold value, or can also be determined according to the distance between the two waypoints adjacent to the reference waypoint. After determining the added waypoints, the corresponding waypoints may be added to the reference waypoint sequence, and then the reference waypoint sequence after adding the waypoints is set as the reference waypoint sequence.
If the steering angle is smaller than or equal to the angle threshold, the steering angle of the current reference waypoint can be determined to be within the set angle threshold, the possibility that the unmanned aerial vehicle turns over when flying through the reference waypoint is low, and the current reference waypoint sequence can be kept unchanged.
And 104, if the reference waypoint is not the penultimate waypoint in the reference waypoint sequence, setting the next waypoint of the reference waypoint as the reference waypoint in the reference waypoint sequence, turning to execute the steering angle for determining the reference waypoint, and if the reference waypoint is the penultimate waypoint in the reference waypoint sequence, controlling the navigation of the target aircraft based on the reference waypoint sequence.
In an implementation, after adding a waypoint to the reference waypoint sequence to obtain a new reference waypoint sequence, or after determining that the steering angle of the unmanned aerial vehicle at the reference waypoint is less than an angle threshold, it may be determined whether the current reference waypoint is the penultimate waypoint in the reference waypoint sequence. If the reference waypoint is not the penultimate waypoint in the sequence of reference waypoints, then it is indicated that there are still waypoints that require unmanned steering after the reference waypoint. The next waypoint to the reference waypoint may be set as the reference waypoint and proceed to step 102. If the reference waypoint is determined to be the last-to-last waypoint in the reference waypoint sequence, that is, the next waypoint corresponding to the reference waypoint is the last waypoint of the unmanned aerial vehicle on the route, steering operation is not needed. Therefore, the current reference waypoint sequence can be determined to be the waypoint sequence for controlling the unmanned aerial vehicle to fly, and the unmanned aerial vehicle can be controlled to fly according to the current reference waypoint sequence.
According to the method for controlling the navigation of the aircraft, whether the steering angle corresponding to the plurality of waypoints in the navigation data is larger than the angle threshold value can be sequentially determined, and if the corresponding steering angle is larger than the angle threshold value, the waypoints can be added between two adjacent waypoints of the waypoints, so that the steering angle corresponding to the waypoints is reduced. Therefore, by adopting the method and the device, the steering angle corresponding to each waypoint can be smaller than the set angle threshold value, so that dangerous situations such as overturning caused by overlarge steering angle in the course of the aircraft in the course of the journey can be avoided, and the safety of the aircraft in the course of the journey is improved.
Fig. 4 is a flowchart of a method for controlling navigation of an aircraft according to an embodiment of the present application. The method may be used to add at least one waypoint between two waypoints in a reference waypoint sequence, see fig. 4, the method comprising:
step 401, determining a target curve of two waypoints adjacent to the reference waypoint.
In practice, a target curve may be determined that crosses a reference waypoint, two waypoints adjacent to the reference waypoint in the sequence of reference waypoints. For example, the target curve may be an arc of a circle passing through the reference waypoint, two waypoints adjacent to the reference waypoint, or may be a smooth curve determined by other means of determining the curve, etc.
Step 402, determining a target number of added waypoints between two waypoints based on the steering angle and the angle threshold.
As shown in fig. 5, the denser the waypoints are selected on the curve, the smaller the steering angle corresponding to each waypoint is, but the more the selected waypoints are, the larger the data amount required to be processed by the unmanned aerial vehicle during flight is. Therefore, in the application, a method for determining the number of selected waypoints on a curve is provided, and the target number of added waypoints between two adjacent waypoints of a reference waypoint can be determined through the steering angle of the unmanned aerial vehicle at the reference waypoint and an angle threshold set by a technician.
Alternatively, a target ratio of the steering angle to the angle threshold may be determined, and a target number of waypoints to be added between two waypoints may be determined based on the target ratio and a preset correspondence of the ratio to the number.
As can be seen from fig. 5, the more waypoints are added, the smaller the steering angle of each waypoint, so when the steering angle of the reference waypoint is larger, more waypoints need to be added between two waypoints adjacent to the reference waypoint, so that the steering angle corresponding to the reference waypoint is smaller than the preset angle threshold. The technician can preset the corresponding relationship between the angle ratio of the steering angle to the angle threshold and the number of added navigation points. For example, the correspondence may be as shown in table one below.
List one
After determining the target ratio of the steering angle of the reference waypoint to the angle threshold, the target number of the added waypoints between two adjacent waypoints of the reference waypoint can be determined according to a preset corresponding relation. In addition, it should be noted that the correspondence in table one is only an exemplary illustration, and the specific correspondence may be set by a technician according to experience and flight performance of the unmanned aerial vehicle.
Step 403, uniformly selecting a target number of waypoints on the target curve.
In implementation, after determining the target curve and adding the target number of waypoints, the target number of waypoints may be uniformly selected on the determined target curve. For example, the length of the target curve may be determined, and then the target curve is uniformly segmented according to the number of targets and the length of the target curve, where the position of each segmentation point is the position of the selected waypoint. And then the coordinates of the selected waypoints can be determined, the radian coordinates of the waypoints are determined according to the conversion formula of the radian coordinates in the step 102 and the corresponding coordinate values in the two-dimensional coordinate system, and then the radian coordinates of the waypoints are converted into longitude and latitude to obtain the positions of the selected waypoints.
Step 404, determining a first waypoint relatively forward in the reference waypoint sequence of the two waypoints, and sequentially adding each selected waypoint between the two waypoints in the reference waypoint sequence based on the distance between each selected waypoint and the first waypoint on the target curve and the distance between the reference waypoint and the first waypoint on the target curve.
In practice, after determining the locations corresponding to the waypoints added to the reference waypoint sequence, the order of the added individual waypoints in the reference waypoint sequence may also be determined. The first of the two waypoints, which is relatively forward in the reference waypoint sequence, may be determined first, and the distance of each waypoint to be added to the reference waypoint sequence from the first waypoint on the target curve and the distance of the reference waypoint from the first waypoint on the target curve may be determined, respectively. For each corresponding waypoint with a distance smaller than the distance between the reference waypoint and the first waypoint on the target curve, adding each waypoint between the first waypoint and the reference waypoint in the reference waypoint sequence according to the sequence from the smaller corresponding distance to the larger corresponding distance; for each waypoint with a corresponding distance greater than the distance between the reference waypoint and the first waypoint on the target curve, the waypoints may be added between the reference waypoint and a second waypoint in the reference waypoint sequence in order of the corresponding distance from small to large, wherein the second waypoint is a relatively later waypoint in the reference waypoint sequence in two waypoints adjacent to the reference waypoint. As shown in fig. 6, waypoint D, waypoint E, and waypoint F are selected on the target curve, respectively. As can be seen from fig. 6, the distance AD between the waypoint D and the first waypoint a is smaller than the distance AE between the waypoint E and the first waypoint a, the distance AE is greater than the distance AB between the first waypoint a and the reference waypoint B, and is smaller than the distance AF between the waypoint F and the first waypoint a. After adding waypoint D, waypoint E, and waypoint F to the reference waypoint sequence, the order in the reference waypoint sequence may be a first waypoint a, waypoint D, reference waypoint B, waypoint E, waypoint F, and a second waypoint C.
Alternatively, the present application also provides a method for determining a curve, by which a curve can be determined uniquely by three reference points, wherein one of the three reference points is located on a midpoint perpendicular to which the other two reference points are connected, and the curve determined by the three reference points passes through the other two reference points. For a reference point on the midpoint of the line connecting the other two reference points, it may also be referred to as a curve setpoint in this application. For example, the three reference points may be reference point a, reference point B and reference point C in fig. 7, respectively, where reference point B is located on a middle vertical line (not shown in the figure) connecting reference point a and reference point C. As shown in fig. 7, the method for determining the curve by three reference points includes:
selecting a moving point x from the line segment AB, and selecting a moving point y from the line segment BC, wherein the initial position of x is the position of the reference point A, and the initial position of y is the position of the reference point B. The moving point x may then be moved along line segment AB to reference point B and the moving point y may be moved along line segment BC to reference point C. In the moving process, the ratio of the lengths of the line segment Ax and the line segment AB is required to be always equal to the ratio of the lengths of the line segment By and the line segment BC. Meanwhile, the moving point x and the moving point y can be connected, the moving point z is selected from the line segment xy, and the initial position of the moving point z can be the position of the reference point A. In the process of moving the moving points x, y and z, the length ratio of the line segment Ax to the line segment AB, the length ratio of the line segment By to the line segment BC and the length ratio of the line segment xz to the line segment xy are kept equal. In fig. 7, the positions of the corresponding moving points y (positions d, e, f in fig. 7) and the positions of the corresponding moving points z (positions g, h, i in fig. 7) when the moving point x moves to the positions a, b, c, respectively, are shown. The moving track of z is a curve S determined by three reference points, and the perpendicular bisector of the connecting line of the reference point A and the reference point C is the symmetry axis of the curve S.
Based on the method for determining the curve, the processing for determining the target curve of the reference waypoint and the two waypoints adjacent to the reference waypoint is as follows:
two waypoints adjacent to the reference waypoint may be determined as two of the three reference points that lie on the determined curve, reference point a and reference point C in fig. 7. The reference waypoint is a point on the target curve that two waypoints adjacent to the reference waypoint locate with another unknown curve that is determined in the manner shown in fig. 7. Can now be rootedThe location of the curve anchor point is determined according to known conditions (two waypoints adjacent to the reference waypoint, the reference waypoint being a point on the target curve, and the line connecting the two waypoints adjacent to the reference waypoint being the axis of symmetry of the target curve). And then determining a target curve according to the two waypoints adjacent to the reference waypoint at the obtained curve locating point. Wherein the coordinates (x) of the curve anchor points can be calculated according to the following equation set 0 ,y 0 )。
As shown in fig. 8, x0 and y0 are coordinates of a curve positioning point, x1 and y1 are coordinates of a reference waypoint, x2 and y2 are coordinates of a first waypoint, which is relatively forward in a reference waypoint sequence, of two waypoints, x3 and y3 are coordinates of a second waypoint, which is relatively backward in the reference waypoint sequence, of the two waypoints, x4 and y4 are coordinates of a first intersection point of a target straight line passing through the reference waypoint and a first line segment, x5 and y5 are coordinates of a second intersection point of the target straight line and the second line segment, wherein two end points of the first line segment are the first waypoint and the curve positioning point, and two end points of the second line segment are the second waypoint and the curve positioning point, respectively.
The first two equations in the equation set are used to represent that the ratio of the first distance between the first waypoint and the first intersection point to the second distance between the first waypoint and the curve setpoint is equal to the ratio of the third distance between the curve setpoint and the second intersection point to the fourth distance between the curve setpoint and the second waypoint is equal to the ratio of the fifth distance between the first intersection point and the third mobile point to the sixth distance between the first intersection point and the second intersection point.
The third equation in the equation set is used for expressing that the first intersection point is on the connecting line of the first navigation point and the curve locating point; the fourth equation in the equation set is used for expressing that the second intersection point is on the connecting line of the second navigation point and the curve locating point; the fifth equation in the equation set is used for expressing that the reference waypoint is on the connecting line of the first intersection point and the second intersection point; the sixth equation in the equation set is used for expressing that the curve locating point is on the midpoint of the connecting line of the first navigation point and the second navigation point.
After the coordinate values of the curve locating points are obtained through the equation set, corresponding target curves can be determined according to the curve locating points, the first waypoints and the second waypoints, and the corresponding processing is as follows:
(1) Selecting a first moving point on a first line segment, wherein the initial position of the first moving point is the same as the navigation point position of a first navigation point, selecting a second moving point on a second line segment, wherein the initial position of the second moving point is the same as the position of a curve locating point, and selecting a third moving point on a third line segment, wherein two end points of the third line segment are the first moving point and the second moving point respectively, and the initial position of the third moving point is the same as the initial position of the first moving point.
(2) And respectively controlling the first moving point to move to the curve locating point, the second moving point to move to the second navigation point, the third moving point to move to the second moving point, determining the first distance between the first moving point and the first navigation point, the second distance between the second moving point and the second navigation point, and the third distance between the third moving point and the first moving point.
(3) In the moving process of the first moving point, the second moving point and the third moving point, a first ratio of the distance between the first navigation point and the curve locating point to the first distance, a second ratio of the distance between the second navigation point and the curve locating point to the second distance and a third ratio of the distance between the first moving point and the second moving point to the third distance are kept to be equal.
(4) And stopping the movement of the first moving point, the second moving point and the third moving point when the first moving point moves to the curve locating point, and determining the movement track of the third moving point as a target curve.
Optionally, corresponding to the above manner of determining the target curve based on the reference waypoint and two waypoints adjacent to the reference waypoint, the present application further provides a method for determining the waypoint on the target curve, as follows:
as can be seen from fig. 7, the target curve is a moving track of the moving point z, and the moving point z satisfies a distance ratio of the line segment xz to the line segment xy, which is equal to a distance ratio of the line segment Ax to the line segment AB and a distance ratio of the line segment By to the line segment BC. The moving point x moves on the line segment AB, and the ratio K of the line segment Ax to the line segment AB is found to be in the range of (0, 1). That is, the ratio K ε (0, 1) of line segment xz to line segment xy. Therefore, the position of the moving point x on the curve can be determined according to the value of K, so that the point to be added can be selected on the curve through the value of K, and the position corresponding to the point to be added is determined as the waypoint added between two adjacent waypoints of the reference waypoint. For example, according to the determined target number of the added waypoints between two adjacent waypoints of the reference waypoint, uniformly selecting the target number of the numerical values in the range of 0 to 1, determining the corresponding numerical values as different numerical values of K, and then determining the position of the added point in the target curve according to each numerical value corresponding to K. For example, when it is determined that the target number of waypoints added between two waypoints adjacent to the reference waypoint is 3, then the position of the moving point z may be determined and the determined position may be taken as the position of the waypoint to be added when it is determined that the values of K may be 0.25, 0.5, and 0.75, respectively, and then the values of K may be 0.25, 0.5, and 0.75, respectively.
According to the method for controlling the navigation of the aircraft, whether the steering angle corresponding to the plurality of waypoints in the navigation data is larger than the angle threshold value can be sequentially determined, and if the corresponding steering angle is larger than the angle threshold value, the waypoints can be added between two adjacent waypoints of the waypoints, so that the steering angle corresponding to the waypoints is reduced. Therefore, by adopting the method and the device, the steering angle corresponding to each waypoint can be smaller than the set angle threshold value, so that dangerous situations such as overturning caused by overlarge steering angle in the course of the aircraft in the course of the journey can be avoided, and the safety of the aircraft in the course of the journey is improved.
Any combination of the above-mentioned optional solutions may be adopted to form an optional embodiment of the present disclosure, which is not described herein in detail.
Fig. 9 is a device for controlling navigation of an aircraft according to an embodiment of the present application, which may be a terminal in the foregoing embodiment, as shown in fig. 9, and includes:
an obtaining module 910, configured to set a waypoint sequence of a target aircraft as a reference waypoint sequence, where a second waypoint is obtained in the reference waypoint sequence and is used as a reference waypoint, where the waypoint sequence includes a plurality of waypoints arranged according to a navigation sequence;
An adding module 920, configured to determine a steering angle of the reference waypoint, and if the steering angle is greater than an angle threshold, add at least one waypoint between two waypoints in the reference waypoint sequence based on the reference waypoint, two waypoints adjacent to the reference waypoint in the reference waypoint sequence, the steering angle, and the angle threshold, set a reference waypoint sequence after adding the waypoint as a reference waypoint sequence, and if the steering angle is less than or equal to the angle threshold, keep the reference waypoint sequence unchanged;
a judging module 930, configured to, if the reference waypoint is not the last-to-last waypoint in the reference waypoint sequence, set a next waypoint of the reference waypoint to be the reference waypoint in the reference waypoint sequence, and go to executing the determining of the steering angle of the reference waypoint; and if the reference waypoint is the penultimate waypoint in the reference waypoint sequence, controlling the target aircraft to navigate based on the reference waypoint sequence.
Optionally, the adding module 920 is configured to:
determining a target curve of the two waypoints adjacent to the reference waypoint;
Determining a target number of added waypoints between the two waypoints based on the steering angle and the angle threshold;
uniformly selecting the target number of waypoints on the target curve;
determining a first waypoint relatively forward in the reference waypoint sequence of the two waypoints, and adding each selected waypoint between the two waypoints in the reference waypoint sequence based on the distance between each selected waypoint and the first waypoint on the target curve and the distance between the reference waypoint and the first waypoint on the target curve.
Optionally, the adding module 920 is configured to:
determining a target ratio of the steering angle to the angle threshold;
and determining the target number of the added waypoints between the two waypoints based on the target ratio and the corresponding relation between the preset ratio and the number.
Optionally, the adding module 920 is configured to:
determining a curve locating point based on the following equation set, wherein the curve locating point is a reference point for determining the target curve;
wherein x0 and y0 are coordinates of a curve locating point, x1 and y1 are coordinates of the reference waypoint, x2 and y2 are coordinates of the first waypoint, x3 and y3 are coordinates of a second waypoint which is relatively backward in the reference waypoint sequence in the two waypoints, x4 and y4 are coordinates of a first intersection point of a target straight line passing through the reference waypoint and a first line segment, x5 and y5 are coordinates of a second intersection point of the target straight line and the second line segment, wherein two end points of the first line segment are the first waypoint and the curve locating point respectively, and two end points of the second line segment are the second waypoint and the curve locating point respectively;
The target curve is determined based on the curve locating point, the first waypoint and the second waypoint.
Optionally, the adding module 920 is configured to:
selecting a first moving point on the first line segment, wherein the initial position of the first moving point is the same as the navigation point position of the first navigation point, selecting a second moving point on the second line segment, wherein the initial position of the second moving point is the same as the curve locating point, and selecting a third moving point on the third line segment, wherein two end points of the third line segment are the first moving point and the second moving point respectively, and the initial position of the third moving point is the same as the initial position of the first moving point;
respectively controlling the first moving point to move to the curve locating point, the second moving point to move to the second navigation point, the third moving point to move to the second moving point, determining a first distance between the first moving point and the first navigation point, a second distance between the second moving point and the second navigation point, and a third distance between the third moving point and the first moving point;
maintaining a first ratio of a distance between the first waypoint and the curve setpoint to the first distance, a second ratio of a distance between the second waypoint and the curve setpoint to the second distance, and a third ratio of a distance between the first and second moving points to the third distance equal during movement of the first, second, and third moving points;
And stopping the movement of the first moving point, the second moving point and the third moving point when the first moving point moves to the curve locating point, and determining the movement track of the third moving point as a target curve.
It should be noted that: the device for controlling the navigation of the aircraft provided in the above embodiment is only exemplified by the division of the above functional modules when controlling the navigation of the aircraft, and in practical application, the above functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the device for controlling the navigation of the aircraft provided in the above embodiment and the method embodiment for controlling the navigation of the aircraft belong to the same concept, and the detailed implementation process of the device is shown in the method embodiment, and will not be repeated here.
Fig. 10 shows a block diagram of a computer device 1000 provided in an exemplary embodiment of the present application. The computer device 1000 may be a terminal in the above embodiment, such as: a smart phone, a tablet computer, an MP3 player (moving picture experts group audio layer III, motion picture expert compression standard audio plane 3), an MP4 (moving picture experts group audio layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. The computer device 1000 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the computer device 1000 includes: a processor 1001 and a memory 1002.
The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1001 may be implemented in at least one hardware form of DSP (digital signal processing ), FPGA (field-programmable gate array, field programmable gate array), PLA (programmable logic array ). The processor 1001 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (central processing unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (graphics processing unit, image processor) for taking care of rendering and drawing of content that the display screen needs to display. In some embodiments, the processor 1001 may also include an AI (artificial intelligence ) processor for processing computing operations related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. Memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1002 is used to store at least one instruction for execution by processor 1001 to implement the method of controlling aircraft voyage provided by the method embodiments herein.
In some embodiments, the computer device 1000 may further optionally include: a peripheral interface 1003, and at least one peripheral. The processor 1001, the memory 1002, and the peripheral interface 1003 may be connected by a bus or signal line. The various peripheral devices may be connected to the peripheral device interface 1003 via a bus, signal wire, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, a display 1005, a camera assembly 1006, audio circuitry 1007, a positioning assembly 1008, and a power supply 1009.
Peripheral interface 1003 may be used to connect I/O (input/output) related at least one peripheral to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1001, memory 1002, and peripheral interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
Radio frequency circuit 1004 is used to receive and transmit RF (radio frequency) signals, also known as electromagnetic signals. Radio frequency circuitry 1004 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. Radio frequency circuitry 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (wireless fidelity ) networks. In some embodiments, the radio frequency circuitry 1004 may also include NFC (near field communication ) related circuitry, which is not limited in this application.
The display screen 1005 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1005 is a touch screen, the display 1005 also has the ability to capture touch signals at or above the surface of the display 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this time, the display 1005 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 1005 may be one, disposed on the front panel of the computer device 1000; in other embodiments, the display 1005 may be at least two, respectively disposed on different surfaces of the computer device 1000 or in a folded design; in other embodiments, the display 1005 may be a flexible display disposed on a curved surface or a folded surface of the computer device 1000. Even more, the display 1005 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 1005 may be made of LCD (liquid crystal display ), OLED (organic light-emitting diode) or other materials.
The camera assembly 1006 is used to capture images or video. Optionally, camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera, and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and VR (virtual reality) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing, or inputting the electric signals to the radio frequency circuit 1004 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, each disposed at a different location of the computer device 1000. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 1007 may also include a headphone jack.
The location component 1008 is used to locate the current geographic location of the computer device 1000 to enable navigation or LBS (location based service, location-based services). The positioning component 1008 may be a positioning component based on the united states GPS (global positioning system ), the beidou system of china, or the galileo system of russia.
The power supply 1009 is used to power the various components in the computer device 1000. The power source 1009 may be alternating current, direct current, disposable battery or rechargeable battery. When the power source 1009 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the computer device 1000 also includes one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyroscope sensor 1012, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
The acceleration sensor 1011 may detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the computer apparatus 1000. For example, the acceleration sensor 1011 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1001 may control the display screen 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect a body direction and a rotation angle of the computer device 1000, and the gyro sensor 1012 may collect a 3D motion of the user on the computer device 1000 in cooperation with the acceleration sensor 1011. The processor 1001 may implement the following functions according to the data collected by the gyro sensor 1012: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 1013 may be disposed at a side frame of the computer device 1000 and/or an underlying layer of the display 1005. When the pressure sensor 1013 is provided at a side frame of the computer apparatus 1000, a grip signal of the computer apparatus 1000 by a user can be detected, and the processor 1001 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 1013. When the pressure sensor 1013 is provided at the lower layer of the display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 1014 may be disposed on the front, back, or side of the computer device 1000. When a physical key or vendor Logo is provided on the computer device 1000, the fingerprint sensor 1014 may be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the display screen 1005 based on the ambient light intensity collected by the optical sensor 1015. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 1005 is turned up; when the ambient light intensity is low, the display brightness of the display screen 1005 is turned down. In another embodiment, the processor 1001 may dynamically adjust the shooting parameters of the camera module 1006 according to the ambient light intensity collected by the optical sensor 1015.
A proximity sensor 1016, also referred to as a distance sensor, is typically provided on the front panel of the computer device 1000. The proximity sensor 1016 is used to capture the distance between the user and the front of the computer device 1000. In one embodiment, when the proximity sensor 1016 detects a gradual decrease in the distance between the user and the front of the computer device 1000, the processor 1001 controls the display 1005 to switch from the bright screen state to the off screen state; when the proximity sensor 1016 detects a gradual increase in the distance between the user and the front of the computer device 1000, the processor 1001 controls the display 1005 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is not limiting as to the computer device 1000, and may include more or fewer components than shown, or may combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, a computer readable storage medium, such as a memory comprising instructions executable by a processor in a terminal to perform the method of controlling an aircraft voyage in the above embodiment, is also provided. The computer readable storage medium may be non-transitory. For example, the computer readable storage medium may be a ROM (read-only memory), a RAM (random access memory ), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to limit the invention to the particular embodiments of the present application, but to limit the scope of the invention to the particular embodiments of the present application.