Unmanned aerial vehicle flight height measurement method and device, electronic equipment and storage medium
By combining laser and barometer data, and monitoring the validity and anomalies of laser data, the inaccuracy of laser measurement of UAV flight altitude was solved, enabling an accurate description of the actual flight status and altitude.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZEROTECH (SHENZHEN) INTELLIGENCE ROBOT CO LTD
- Filing Date
- 2023-01-09
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, when using lasers to measure the flight altitude of drones, the results are easily affected by the plane below, leading to inaccurate measurement results that cannot truly reflect the actual flight status of the drone.
Altitude measurement is performed by combining laser data and barometer data. By monitoring the validity and anomalies of the laser data, the altitude difference is updated when the laser data is normal, and the update is stopped when anomalies occur. The flight altitude is then obtained based on the barometer data to achieve accuracy compensation.
This ensures that the measurement results accurately reflect the actual flight status of the UAV and accurately describe its flight altitude, thus improving the accuracy and stability of the measurement.
Smart Images

Figure CN115930901B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicles (UAVs), specifically to a method, device, electronic equipment, and storage medium for measuring the flight altitude of an UAV. Background Technology
[0002] During flight, drones often need to have their altitude measured, which is the relative height between the drone and the plane below. Many technologies use a method of emitting a laser downwards and then detecting the reflected laser light to measure the drone's altitude. While this method provides high accuracy, the laser data is highly susceptible to the influence of the plane below. Therefore, in some cases, this method can produce an abnormal altitude reading that does not accurately reflect the drone's actual flight status, resulting in an inaccurate representation of the drone's actual flight condition. Summary of the Invention
[0003] One objective of this application is to provide a method, device, electronic device, and storage medium for measuring the flight altitude of a drone. The flight altitude obtained by the embodiments of this application can accurately reflect the actual flight state of the drone and accurately describe the flight altitude of the drone.
[0004] According to one aspect of the embodiments of this application, a method for measuring the flight altitude of a UAV is disclosed, the method comprising:
[0005] The system monitors a first altitude measured based on laser data and a second altitude measured based on barometer data.
[0006] The system detects whether the laser data is valid, and if the laser data is valid, it detects whether the first height is abnormal.
[0007] When the first altitude is detected to be normal, the first altitude is used as the flight altitude of the drone, and the altitude difference between the first altitude and the second altitude is updated and recorded.
[0008] When the first altitude anomaly is detected, the altitude difference is stopped from being updated, and the flight altitude is obtained based on the difference between the second altitude and the latest altitude before the update was stopped.
[0009] According to one aspect of the embodiments of this application, a drone flight altitude measuring device is disclosed, the device comprising:
[0010] The monitoring module is configured to monitor a first altitude measured based on laser data and a second altitude measured based on barometer data.
[0011] An anomaly detection module is configured to detect whether the laser data is valid, and if the laser data is valid, to detect whether the first height is abnormal.
[0012] The first flight altitude acquisition module is configured to, when the first altitude is detected to be normal, use the first altitude as the flight altitude of the UAV and update the altitude difference between the first altitude and the second altitude.
[0013] The second flight altitude acquisition module is configured to stop updating the altitude difference when the first altitude is detected to be abnormal, and to acquire the flight altitude based on the difference between the second altitude and the latest altitude before the record was stopped.
[0014] According to one aspect of the embodiments of this application, an electronic device is disclosed, comprising: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement any of the above embodiments.
[0015] According to one aspect of the embodiments of this application, a computer program medium is disclosed, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform any of the above embodiments.
[0016] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.
[0017] In this embodiment, when the laser data is valid and a normal first altitude measured based on the laser data is detected, the first altitude is used as the drone's flight altitude, and the altitude difference between the first and second altitudes is updated and recorded. When an abnormal first altitude is detected, updating the recorded altitude difference stops, and the drone's flight altitude is obtained based on the second altitude and the latest altitude difference before the update stops. Since the altitude difference recorded when the first altitude is normal can compensate for the accuracy of the second altitude when the first altitude is abnormal, the flight altitude obtained in this embodiment accurately reflects the actual flight state of the drone and accurately describes its flight altitude.
[0018] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0019] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0020] The above and other objectives, features and advantages of this application will become more apparent from a detailed description of exemplary embodiments thereof with reference to the accompanying drawings.
[0021] Figure 1 A schematic diagram of a drone in flight according to an embodiment of this application is shown.
[0022] Figure 2 A flowchart of a method for measuring the flight altitude of a drone according to an embodiment of this application is shown.
[0023] Figure 3 A detailed flowchart of a method for measuring the flight altitude of a drone according to an embodiment of this application is shown.
[0024] Figure 4 A block diagram of a drone flight altitude measuring device according to an embodiment of this application is shown.
[0025] Figure 5 A hardware diagram of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0026] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided to make the description of this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The drawings are merely illustrative of this application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0027] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more exemplary embodiments. Numerous specific details are provided in the following description to give a full understanding of exemplary embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced with one or more of the specific details omitted, or other methods, components, steps, etc., can be employed. In other instances, well-known structures, methods, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0028] Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0029] This application provides a method for measuring the flight altitude of a drone, primarily used to measure the relative height between the drone in flight and the plane below it. Considering that measuring the drone's flight altitude using laser data offers higher accuracy compared to using barometer data, this application incorporates a laser measurement module on the drone to determine its flight altitude based on the laser data collected by the module. Specifically, the laser measurement module emits a laser beam downwards, which is reflected upon contact with the plane below. After detecting the reflected laser beam, the module calculates the drone's flight altitude based on the time taken for the laser to travel from emission to reflection, combined with the laser's velocity.
[0030] However, at the same time, this application recognizes that although the flight altitude measured by laser data has a fairly high accuracy, the laser data is easily affected by the plane below. Therefore, in some cases, the flight altitude measured by laser data may show an abnormal state that does not conform to the actual flight state of the UAV.
[0031] For details, see Figure 1 The diagram shown illustrates the flight of a drone. In one embodiment, the drone A in flight measures its altitude by emitting a laser downwards and then detecting the reflected laser light.
[0032] 1. Due to the uneven terrain between G1 and G2, when UAV A flies over G1 to G2, even if UAV A is flying stably, the flight altitude measured by laser data will frequently change, exhibiting an unstable and abnormal state.
[0033] II. Besides drone A, there are other drones flying in the air, such as drone B shown in the diagram. When drone B flies under drone A, the laser emitted by drone A will be reflected back after reaching the surface of drone B. This causes an abrupt change in the flight altitude measured by drone A using laser data, compared to the moment when drone B has not yet flown under drone A.
[0034] Third, the section from G3 to G4 is a body of water, such as a lake. Since water has a lower reflectivity to lasers than the ground, the flight altitude measured by UAV A using laser data will exhibit a sudden and anomalous change when entering the water area between G3 and G4, compared to when flying over the ground at G3.
[0035] Obviously, under the above circumstances, the flight altitude obtained by measuring the drone using laser data will exhibit an abnormal state that does not conform to the actual flight state of the drone. To overcome this defect, this application provides a method for measuring the flight altitude of a drone.
[0036] Figure 2 A flowchart of the UAV flight altitude measurement method provided in this application is shown. An exemplary execution subject of this method is a UAV, and the method includes:
[0037] Step S110: Monitor the first altitude measured based on laser data, and monitor the second altitude measured based on barometer data;
[0038] Step S120: Detect whether the laser data is valid, and if the laser data is valid, detect whether the first height is abnormal;
[0039] Step S130: When the first altitude is detected to be normal, the first altitude is used as the flight altitude of the UAV, and the altitude difference between the first altitude and the second altitude is updated and recorded.
[0040] Step S140: When an abnormal first altitude is detected, stop updating the recorded altitude difference and obtain the flight altitude based on the second altitude and the latest altitude difference before stopping the record update.
[0041] Specifically, the drone in this embodiment is equipped with at least a laser measurement module and a barometer measurement module. During flight, the drone measures its first altitude relative to the plane below based on laser data collected by the laser measurement module, and simultaneously measures its second altitude relative to the plane below based on barometer data collected by the barometer measurement module.
[0042] The process of obtaining the first altitude based on laser data measurement will not be described in detail here. The process of obtaining the second altitude based on barometer data can optionally involve: using barometer data from the UAV's takeoff location as the reference barometer data; during the UAV's flight, subtracting the real-time barometer data from the reference barometer data, and then converting the difference into an altitude value to obtain the second altitude.
[0043] To ensure the reliability of the laser data, its validity is checked. After confirming the validity of the laser data, the initial height measured based on the laser data is checked for any anomalies.
[0044] Because laser data is more accurate than barometer data, it is directly used as the drone's flight altitude when a normal initial altitude is detected. However, if an abnormal initial altitude is detected, it indicates that the initial altitude does not reflect the drone's actual flight status, making it unsuitable for directly describing the drone's flight altitude. Similarly, while the second altitude, based on barometer data which is unaffected by the real-time lower plane, can accurately reflect the drone's actual flight status, its inherent accuracy is insufficient, rendering it unsuitable for direct description.
[0045] In response to this situation, this application recognizes that when the first altitude is normal, by subtracting the first altitude from the second altitude, a portion of the precision of the laser data can be transferred to the resulting altitude difference. Therefore, when the first altitude is abnormal, this altitude difference can be used to compensate for the precision of the second altitude, so that the compensated second altitude can accurately reflect both the actual flight status of the UAV and accurately describe its flight altitude.
[0046] Therefore, in this embodiment, when the first altitude is detected to be normal, the altitude difference between the first and second altitudes is also updated and recorded. Once an abnormality is detected in the first altitude, the recording of the altitude difference is stopped to ensure that the altitude difference accurately reflects the deviation between the laser data and the barometer data; simultaneously, the flight altitude is obtained based on the second altitude and the latest altitude difference before the recording was stopped. As described above, since the accuracy of the second altitude can be compensated by using this altitude difference, even if the first altitude is abnormal, the flight altitude obtained in this embodiment can still accurately reflect the actual flight state of the UAV and accurately describe the flight altitude of the UAV.
[0047] In summary, this embodiment of the application, when the laser data is valid and a normal first altitude measured based on the laser data is detected, uses the first altitude as the drone's flight altitude and updates the recorded altitude difference between the first and second altitudes. When an abnormal first altitude is detected, updating the recorded altitude difference stops, and the drone's flight altitude is obtained based on the second altitude and the latest altitude difference before the update stopped. Since the recorded altitude difference when the first altitude is normal can compensate for the accuracy of the second altitude when the first altitude is abnormal, the flight altitude obtained by this embodiment accurately reflects both the actual flight state of the drone and accurately describes its flight altitude.
[0048] In one embodiment, the first altitude measured based on laser data is denoted as H_laser; the second altitude measured based on barometer data is denoted as H_air; when the first altitude H_laser is detected to be normal, the recorded altitude difference between the first altitude H_laser and the second altitude H_air is updated to Dh. Where Dh = H_laser - H_air.
[0049] When an anomaly is detected in the first altitude H_laser, the second altitude H_air can be directly added to the latest altitude difference Dh before the record updates stopped to obtain the drone's flight altitude H, i.e., H = H_air + Dh. Alternatively, a preset coefficient W can be used to adjust the latest altitude difference Dh before the record updates stopped, and then added to the second altitude H_air to obtain the drone's flight altitude H, i.e., H = H_air + W * Dh.
[0050] In one embodiment, the UAV flight altitude measurement method provided in this application further includes:
[0051] When invalid laser data is detected, the update of the recorded altitude difference is stopped, and the flight altitude is obtained based on the difference between the second altitude and the latest altitude before the update was stopped.
[0052] In this embodiment, considering that the first altitude cannot be used to accurately describe the flight altitude of the drone when the laser data is invalid, the same processing is applied when the first altitude is detected to be abnormal. When the laser data is detected to be invalid, the altitude difference between the first altitude and the second altitude is stopped from being updated, and the flight altitude of the drone is obtained based on the difference between the second altitude and the latest altitude before the update was stopped.
[0053] In one embodiment, detecting whether laser data is valid includes:
[0054] Obtain the data measurement range of the laser measurement module and obtain the preset intensity threshold for the signal intensity of the laser data;
[0055] The validity of laser data is determined based on the data measurement range and intensity threshold.
[0056] In this embodiment, the data measurement range of the laser measurement module refers to the range of data that the laser measurement module can effectively measure. If the laser data exceeds this data measurement range, the laser data is invalid.
[0057] The signal strength of the laser data measures its reliability. The higher the signal strength, the more reliable the laser data. There is a preset intensity threshold for the signal strength; if the signal strength of the laser data is lower than this threshold, the laser data is invalid.
[0058] Therefore, if the laser data exceeds the data measurement range of the laser measurement module, or if the signal strength of the laser data is lower than the preset intensity threshold, the laser data is confirmed to be invalid; if the laser data does not exceed the data measurement range of the laser measurement module, and the signal strength of the laser data is higher than or equal to the intensity threshold, the laser data is confirmed to be valid.
[0059] In one embodiment, detecting whether the first height is abnormal includes:
[0060] The drone's lower plane is detected to have any height changes based on the first altitude, and if no height changes are detected, the lower plane is detected to be flat based on the first altitude.
[0061] Once the lower plane is detected to be flat, the initial height is confirmed to be normal.
[0062] When a sudden change in height or an unevenness in the lower plane is detected, the first height anomaly is confirmed.
[0063] As mentioned above, there are two main types of abnormal phenomena in the first altitude measured based on laser data: First, the first altitude may change abruptly due to other drones flying overhead or changes in the reflectivity of objects below. Second, the first altitude may change frequently due to uneven terrain below. In this embodiment, the first type of abnormal phenomenon is summarized as abrupt changes in altitude on the plane below the drone; the second type of abnormal phenomenon is summarized as an uneven plane below the drone.
[0064] Therefore, in this embodiment, the system first detects whether there is a sudden change in altitude on the plane below the drone based on the first altitude. If there is a sudden change in altitude, the first altitude is confirmed to be abnormal; if there is no sudden change in altitude, the system then detects whether the plane below the drone is flat based on the first altitude. If it is not flat, the first altitude is confirmed to be abnormal; if it is flat, the first altitude is confirmed to be normal.
[0065] By first detecting whether there are height abrupt changes, and then detecting whether the surface is flat when there are no height abrupt changes, the first height anomaly can be confirmed without detecting whether the surface is flat when there are height abrupt changes, saving computation and improving detection efficiency.
[0066] In one embodiment, while detecting whether there is a sudden change in altitude on the lower plane of the drone based on the first altitude, it also detects whether the lower plane is flat based on the first altitude. If no sudden change in altitude is detected on the lower plane and the lower plane is flat, the first altitude is confirmed to be normal; if a sudden change in altitude is detected on the lower plane, or the lower plane is not flat, the first altitude is confirmed to be abnormal.
[0067] In one embodiment, detecting whether there is a sudden change in altitude on the lower plane of the drone based on a first altitude includes:
[0068] Monitor the fluctuation value of the first altitude within the target time period, and monitor the altitude fluctuation value measured by each non-laser data within the target time period;
[0069] When the fluctuation value of the first height is not detected to exceed the first distance threshold, it is confirmed that there is no sudden change in height on the lower plane;
[0070] When the detected height fluctuation value exceeds the first distance threshold, and the height fluctuation values obtained from all non-laser data measurements do not exceed the corresponding distance threshold, it is confirmed that there is a height change in the lower plane;
[0071] If the fluctuation value of the first height exceeds the first distance threshold, and the height fluctuation values measured by all non-laser data exceed the corresponding distance threshold, then if the absolute value of the difference between the fluctuation value of the first height and the height fluctuation value measured by each non-laser data exceeds the preset fluctuation value threshold, then it is confirmed that there is a sudden change in height on the lower plane.
[0072] Understandably, the reason why the initial altitude measured by laser data may exhibit anomalies such as sudden altitude changes is because laser data is affected in real time by the plane below. Non-laser data (e.g., barometer data), on the other hand, is not affected by the plane below in real time. Therefore, in this embodiment, non-laser data is used as an auxiliary reference for determining whether there are sudden altitude changes.
[0073] Specifically, in this embodiment, the fluctuation value of the first altitude within a target time period (e.g., within the first 2 seconds of the current moment) is monitored, as well as the altitude fluctuation value measured by non-laser data within that target time period. The fluctuation value of the first altitude within the target time period can be the absolute value of the difference between the first altitude at the beginning and end of the target time period, or the absolute value of the difference between the maximum and minimum first altitude within the target time period. Similarly, the altitude fluctuation value measured by non-laser data can be the absolute value of the difference between the altitude measured by non-laser data at the beginning and end of the target time period, or the absolute value of the difference between the maximum and minimum altitude measured by non-laser data within the target time period.
[0074] If the fluctuation value of the first height does not exceed the first distance threshold, it indicates that the first height has not fluctuated significantly. Since laser data is more reliable than non-laser data, it can be directly determined in this case that there are no abrupt changes in the height of the lower plane.
[0075] If the fluctuation value of the first altitude exceeds the first distance threshold, it indicates that the first altitude has fluctuated significantly. In this case, there are two possibilities: First, the significant fluctuation in the first altitude is caused by a sudden change in altitude on the lower plane; second, there is no sudden change in altitude on the lower plane, but the significant fluctuation in the first altitude is caused by the drone's rapid ascent or descent.
[0076] If the significant fluctuation in the initial height measured by laser data is due to a sudden change in the height of the lower plane, considering that non-laser data is not affected by the lower plane in real time, the height measured by non-laser data should not show significant fluctuations. Therefore, if the initial height measured by laser data shows significant fluctuations, and the heights measured by all non-laser data do not show significant fluctuations, then a sudden change in height of the lower plane is confirmed. That is, if the fluctuation value of the initial height exceeds the first distance threshold, and the fluctuation values of the heights measured by all non-laser data do not exceed the corresponding distance thresholds, then a sudden change in height of the lower plane is confirmed.
[0077] However, when both the initial altitude measured by laser data and the altitudes measured by each non-laser data show significant fluctuations, it can only confirm that the drone experienced a rapid ascent or descent, but not whether there were abrupt changes in altitude on the lower plane. Considering that in this situation, if there were abrupt changes in altitude on the lower plane, the degree of fluctuation in the initial altitude measured by laser data would differ to some extent from the degree of fluctuation in the altitudes measured by each non-laser data. Therefore, it is necessary to further calculate the absolute value of the difference between the fluctuation value of the initial altitude and the fluctuation value of the altitude measured by each non-laser data.
[0078] If the absolute values of the calculated differences all exceed the preset fluctuation threshold, it indicates that the fluctuation of the first altitude measured by laser data differs to some extent from the fluctuation of the altitude measured by each non-laser data measurement. This suggests that while the drone was rapidly ascending or descending, there was a sudden change in altitude on the plane below, thus confirming the existence of a sudden change in altitude on the plane below.
[0079] Conversely, if the absolute values of the calculated differences do not exceed the fluctuation threshold, it indicates that the fluctuation degree of the first altitude measured by laser data is basically consistent with the fluctuation degree of the altitude measured by each non-laser data. This shows that while the drone was rapidly ascending or descending, there was no sudden change in altitude on the plane below, thus confirming that there was no sudden change in altitude on the plane below.
[0080] In one embodiment, when the non-laser data includes barometer data, the altitude fluctuation value includes: the fluctuation value of the second altitude.
[0081] When non-laser data includes ground acceleration data, the height fluctuation value includes: the distance obtained by integrating the ground velocity calculated based on the ground acceleration data.
[0082] In this embodiment, non-laser data includes, but is not limited to: barometer data and ground acceleration data.
[0083] When the non-laser data is barometer data, the height fluctuation value measured from the non-laser data within the target time period is the fluctuation value of the second height within the target time period.
[0084] When the non-laser data is acceleration data, the height fluctuation value measured from the non-laser data within the target time period is the distance obtained by integrating the groundward velocity calculated based on the groundward acceleration data within the target time period. Here, the groundward acceleration data describes the groundward acceleration of the drone (i.e., the acceleration of the drone vertically downward), which can be obtained in real time through the inertial sensor unit IMU mounted on the drone. Based on the groundward acceleration data, the groundward velocity can be calculated, that is, the velocity of the drone vertically downward. Then, by integrating the groundward velocity within the target time period, the height fluctuation value measured from the groundward acceleration data within the target time period can be obtained.
[0085] Denote the fluctuation value of the first height measured from the laser data as dH_laser, and the first distance threshold as H1. Denote the fluctuation value of the second height measured from the barometer data as dH_air, and the corresponding distance threshold as the second distance threshold H2. Denote the distance obtained by integrating the groundward velocity calculated based on the groundward acceleration data as dH_acc, and the corresponding distance threshold as the third distance threshold H3. The fluctuation value threshold is H4.
[0086] If all the following conditions are met within the target time period, it can be confirmed that there is a sudden change in height in the lower plane:
[0087] dH_>H1
[0088] dH_<H2
[0089] dH_<H3
[0090] Alternatively, if all the following conditions are met within the target time period, it can be confirmed that there is a sudden change in height in the lower plane:
[0091] dH_>H1
[0092] dH_>H2
[0093] dH_>H3
[0094] |_laser - dH_|>H4
[0095] |_laser - dH_|>H4
[0096] Where, dH_acc is calculated through the following formula:
[0097]
[0098]
[0099] Specifically, the time unit is a frame. Vd j Vd_pre represents the ground velocity of the j-th frame within a target time period of m frames; Vd_pre represents the ground velocity of a previous n-frame historical frame; acc i This is the ground acceleration of the i-th frame, calculated from this historical frame.
[0100] In one embodiment, detecting whether the lower plane is flat based on a first height includes:
[0101] Monitor the instantaneous deviation between the instantaneous physical quantity corresponding to the first altitude and the instantaneous physical quantity measured by each non-laser data at the same moment;
[0102] If, within the target time threshold, the instantaneous deviation value corresponding to at least one non-laser data never exceeds the corresponding deviation threshold, the lower plane is confirmed to be flat.
[0103] If, within the target time threshold, all instantaneous deviation values corresponding to non-laser data exceed the corresponding deviation threshold, it is confirmed that the lower plane is not flat.
[0104] In this embodiment, non-laser data is used as an auxiliary reference for determining whether the surface is flat.
[0105] Specifically, the instantaneous deviation between the instantaneous physical quantity corresponding to the first height measured by laser data and the instantaneous physical quantity measured by each non-laser data is monitored at the same moment.
[0106] If, within the target time threshold (e.g., within the first 2 seconds of the current moment), the instantaneous deviation value corresponding to at least one non-laser data point never exceeds the deviation threshold set for that instantaneous deviation value, it indicates that at least one non-laser data point remains synchronized with the laser data within the target time threshold. Since non-laser data is not affected by the lower plane in real time, when at least one non-laser data point remains synchronized with the laser data within the target time threshold, it means that the laser data is not significantly affected by any additional instability imposed by the lower plane in real time within the target time threshold. Therefore, in this case, it can be determined that the lower plane is flat.
[0107] If, within the target time threshold, the instantaneous deviation values corresponding to all non-laser data exceed the deviation threshold set for the corresponding instantaneous deviation value, it indicates that all non-laser data within the target time threshold are not always synchronized with the laser data. This means that the laser data within the target time threshold is subjected to additional unstable influences from the lower plane in real time. Therefore, in this case, it can be determined that the lower plane is not flat.
[0108] In one embodiment, when the instantaneous physical quantity includes a height value, the instantaneous deviation value includes: the height deviation value between the first height and the second height.
[0109] When the instantaneous physical quantity includes velocity, the instantaneous deviation value includes: the velocity deviation between the first ground velocity calculated based on the first altitude and the second ground velocity calculated based on ground acceleration data.
[0110] In this embodiment, instantaneous physical quantities include, but are not limited to: instantaneous height value and instantaneous velocity value.
[0111] When the instantaneous physical quantity is the instantaneous height value, the instantaneous physical quantity corresponding to the first height is the first height, and the instantaneous physical quantity obtained by non-laser data measurement is the second height obtained by barometer data measurement. The instantaneous deviation value at the same moment is the height deviation value between the first height and the second height at the same moment.
[0112] When the instantaneous physical quantity is the instantaneous velocity value, the instantaneous physical quantity corresponding to the first altitude is the first ground velocity calculated based on the first altitude (i.e., the vertical downward velocity of the UAV calculated based on the first altitude), and the instantaneous physical quantity obtained by non-laser data measurement is the second ground velocity calculated based on ground acceleration data (i.e., the vertical downward velocity of the UAV calculated based on ground acceleration data). The instantaneous deviation value at the same moment is the velocity deviation value between the first ground velocity and the second ground velocity at the same moment.
[0113] Let H_laser be the first altitude measured by laser data, and H_air be the second altitude measured by barometer data. Let the deviation threshold for the altitude deviation be altitude threshold H5. Let Vh1 be the first ground velocity calculated based on the first altitude, and Vh2 be the second ground velocity calculated based on ground acceleration data. Let Vh6 be the deviation threshold for the velocity deviation.
[0114] If any of the following conditions are consistently met within the target time threshold, the lower plane can be confirmed to be flat:
[0115] |H_laser-H_air|<5
[0116] |Vh1-Vh2|<6
[0117] If all of the following conditions are met at some point within the target time threshold, it can be confirmed that the plane below is not flat:
[0118] |H_laser-H_air|≥H5
[0119] |Vh1-Vh2|≥V6
[0120] Vh1 and Vh2 can be calculated using the following formula:
[0121] Vh1=(__-H__) / (_-t_)
[0122]
[0123] Where H_cur_laser is the first altitude measured by laser data at the current time t_cur, and H_pre_laser is the first altitude measured by laser data at a historical time t_pre. Using frames as the timing unit, Vh2_pre is the second ground velocity of a historical frame n frames prior, and acc... i This is the ground acceleration of the i-th frame, calculated from this historical frame.
[0124] Figure 3 A detailed flowchart of a method for measuring the flight altitude of a drone according to an embodiment of this application is shown.
[0125] See Figure 3 In one embodiment, the UAV collects laser data and barometer data in real time, and measures a first altitude H_laser based on the laser data and a second altitude H_air based on the barometer data.
[0126] When the laser data is valid, monitor for any sudden changes in altitude on the lower plane. If no sudden changes in altitude are detected, monitor whether the lower plane is flat. If the lower plane is flat, use the first altitude H_laser as the drone's flight altitude H, and update the altitude difference Dh between the first altitude H_laser and the second altitude H_air, where Dh = H_laser - H_air.
[0127] When the laser data is invalid, or when a sudden change in altitude is detected on the lower plane, or when an uneven lower plane is detected, the update of the recorded altitude difference Dh is stopped, and the second altitude H_air is added to the latest altitude difference Dh before the update is stopped to obtain the UAV's flight altitude H.
[0128] Figure 4 A block diagram of a drone flight altitude measuring device according to an embodiment of this application is shown, the device comprising:
[0129] The monitoring module 210 is configured to monitor a first altitude measured based on laser data and a second altitude measured based on barometer data.
[0130] The anomaly detection module 220 is configured to detect whether the laser data is valid, and when the laser data is valid, to detect whether the first height is abnormal.
[0131] The first flight altitude acquisition module 230 is configured to, when the first altitude is detected to be normal, use the first altitude as the flight altitude of the UAV and update the altitude difference between the first altitude and the second altitude.
[0132] The second flight altitude acquisition module 240 is configured to stop updating the altitude difference when the first altitude is detected to be abnormal, and to acquire the flight altitude based on the difference between the second altitude and the latest altitude before the record was stopped.
[0133] In one exemplary embodiment of this application, the device is configured as follows:
[0134] When the laser data is detected to be invalid, the update of the altitude difference is stopped, and the flight altitude is obtained based on the difference between the second altitude and the latest altitude before the update is stopped.
[0135] In an exemplary embodiment of this application, the anomaly detection module is configured as follows:
[0136] Obtain the data measurement range of the laser measurement module, and obtain the preset intensity threshold for the signal intensity of the laser data;
[0137] Based on the data measurement range and the intensity threshold, the validity of the laser data is determined.
[0138] In an exemplary embodiment of this application, the anomaly detection module is configured as follows:
[0139] Based on the first height, detect whether there is a height change in the lower plane of the drone, and when no height change is detected in the lower plane, detect whether the lower plane is flat based on the first height;
[0140] When the lower plane is detected to be flat, the first height is confirmed to be normal;
[0141] When a sudden change in height or an unevenness in the lower plane is detected, the first height is confirmed to be abnormal.
[0142] In an exemplary embodiment of this application, the anomaly detection module is configured as follows:
[0143] Monitor the fluctuation value of the first altitude within the target time period, and monitor the altitude fluctuation value obtained by each non-laser data measurement within the target time period;
[0144] When the fluctuation value of the first height is detected to be within the first distance threshold, it is confirmed that there is no sudden change in height of the lower plane;
[0145] When the fluctuation value of the first height is detected to exceed the first distance threshold, and the height fluctuation values obtained by all non-laser data measurements do not exceed the corresponding distance threshold, it is confirmed that there is a height change in the lower plane;
[0146] When the fluctuation value of the first height exceeds the first distance threshold, and the height fluctuation values obtained by all non-laser data measurements exceed the corresponding distance threshold, if the absolute value of the difference between the fluctuation value of the first height and the height fluctuation value obtained by each non-laser data measurement exceeds the preset fluctuation value threshold, then it is confirmed that there is a height change in the lower plane.
[0147] In an exemplary embodiment of this application, when the non-laser data includes the barometer data, the altitude fluctuation value includes: the fluctuation value of the second altitude;
[0148] When the non-laser data includes ground acceleration data, the height fluctuation value includes: the distance obtained by integrating the ground velocity calculated based on the ground acceleration data.
[0149] In an exemplary embodiment of this application, the anomaly detection module is configured as follows:
[0150] Monitor the instantaneous deviation between the instantaneous physical quantity corresponding to the first height and the instantaneous physical quantity measured by each non-laser data at the same moment;
[0151] If, within the target time threshold, the instantaneous deviation value corresponding to at least one non-laser data never exceeds the corresponding deviation threshold, the lower plane is confirmed to be flat.
[0152] If, within the target time threshold, the instantaneous deviation value corresponding to all non-laser data exceeds the corresponding deviation threshold, it is confirmed that the lower plane is not flat.
[0153] In an exemplary embodiment of this application, when the instantaneous physical quantity includes a height value, the instantaneous deviation value includes: the height deviation value between the first height and the second height;
[0154] When the instantaneous physical quantity includes a velocity value, the instantaneous deviation value includes: the velocity deviation between the first ground velocity calculated based on the first height and the second ground velocity calculated based on ground acceleration data.
[0155] The following is for reference. Figure 5 To describe the electronic device 30 according to an embodiment of this application. Figure 5 The electronic device 30 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0156] like Figure 5As shown, the electronic device 30 is presented in the form of a general-purpose computing device. The components of the electronic device 30 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, and a bus 330 connecting different system components (including storage unit 320 and processing unit 310).
[0157] The storage unit stores program code that can be executed by the processing unit 310, causing the processing unit 310 to perform the steps described in the exemplary method description section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 310 can perform actions such as... Figure 2 The steps shown are as follows.
[0158] Storage unit 320 may include readable media in the form of volatile storage units, such as random access memory (RAM) 3201 and / or cache memory 3202, and may further include read-only memory (ROM) 3203.
[0159] Storage unit 320 may also include a program / utility 3204 having a set (at least one) program module 3205, such program module 3205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0160] Bus 330 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0161] Electronic device 30 can also communicate with one or more external devices 400 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 30, and / or with any device that enables electronic device 30 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 350. Input / output (I / O) interface 350 is connected to display unit 340. Furthermore, electronic device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 360. As shown, network adapter 360 communicates with other modules of electronic device 30 via bus 330. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0162] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of this application.
[0163] In an exemplary embodiment of this application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the methods described in the above method embodiments.
[0164] According to one embodiment of this application, a program product for implementing the methods in the above-described method embodiments is also provided. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of this invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0165] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0166] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0167] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0168] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0169] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0170] Furthermore, although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0171] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0172] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the appended claims.
Claims
1. A method for measuring the flight altitude of a UAV, characterized in that, The method includes: The system monitors a first altitude measured based on laser data and a second altitude measured based on barometer data. The system detects whether the laser data is valid, and if the laser data is valid, it detects whether the first height is abnormal; wherein, valid laser data means that the laser data is within the data range that the laser measurement module can effectively measure; When the first altitude is detected to be normal, the first altitude is used as the flight altitude of the drone, and the altitude difference between the first altitude and the second altitude is updated and recorded; wherein, the first altitude being normal includes no abrupt changes in altitude on the plane below the drone and the plane below the drone being flat; When the first altitude anomaly is detected, the altitude difference is stopped from being updated, and the flight altitude is obtained based on the second altitude and the latest altitude difference before the update was stopped; wherein, the first altitude anomaly includes either a sudden change in altitude on the plane below the drone or an uneven plane below the drone.
2. The method according to claim 1, characterized in that, The method further includes: When the laser data is detected to be invalid, the update of the altitude difference is stopped, and the flight altitude is obtained based on the difference between the second altitude and the latest altitude before the update is stopped.
3. The method according to claim 1, characterized in that, Detecting whether the laser data is valid includes: Obtain the data measurement range of the laser measurement module, and obtain the preset intensity threshold for the signal intensity of the laser data; Based on the data measurement range and the intensity threshold, the validity of the laser data is determined.
4. The method according to claim 1, characterized in that, Detecting whether the first height is abnormal includes: Based on the first height, detect whether there is a height change in the lower plane of the drone, and when no height change is detected in the lower plane, detect whether the lower plane is flat based on the first height; When the lower plane is detected to be flat, the first height is confirmed to be normal; When a sudden change in height or an unevenness in the lower plane is detected, the first height is confirmed to be abnormal.
5. The method according to claim 4, characterized in that, Based on the first altitude, detect whether there is a sudden change in altitude on the plane below the drone, including: Monitor the fluctuation value of the first altitude within the target time period, and monitor the altitude fluctuation value obtained by each non-laser data measurement within the target time period; When the fluctuation value of the first height is detected to be within the first distance threshold, it is confirmed that there is no sudden change in height of the lower plane; When the fluctuation value of the first height is detected to exceed the first distance threshold, and the height fluctuation values obtained by all non-laser data measurements do not exceed the corresponding distance threshold, it is confirmed that there is a height change in the lower plane; When the fluctuation value of the first height exceeds the first distance threshold, and the height fluctuation values obtained by all non-laser data measurements exceed the corresponding distance threshold, if the absolute value of the difference between the fluctuation value of the first height and the height fluctuation value obtained by each non-laser data measurement exceeds the preset fluctuation value threshold, then it is confirmed that there is a height change in the lower plane.
6. The method according to claim 5, characterized in that, When the non-laser data includes the barometer data, the altitude fluctuation value includes: the fluctuation value of the second altitude; When the non-laser data includes ground acceleration data, the height fluctuation value includes: the distance obtained by integrating the ground velocity calculated based on the ground acceleration data.
7. The method according to claim 4, characterized in that, Detecting whether the lower plane is flat based on the first height includes: Monitor the instantaneous deviation between the instantaneous physical quantity corresponding to the first height and the instantaneous physical quantity measured by each non-laser data at the same moment; If, within the target time threshold, the instantaneous deviation value corresponding to at least one non-laser data never exceeds the corresponding deviation threshold, the lower plane is confirmed to be flat. If, within the target time threshold, the instantaneous deviation value corresponding to all non-laser data exceeds the corresponding deviation threshold, it is confirmed that the lower plane is not flat.
8. The method according to claim 7, characterized in that, When the instantaneous physical quantity includes a height value, the instantaneous deviation value includes: the height deviation value between the first height and the second height; When the instantaneous physical quantity includes a velocity value, the instantaneous deviation value includes: the velocity deviation between the first ground velocity calculated based on the first height and the second ground velocity calculated based on ground acceleration data.
9. A drone flight altitude measuring device, characterized in that, The device includes: The monitoring module is configured to monitor a first altitude measured based on laser data and a second altitude measured based on barometer data. An anomaly detection module is configured to detect whether the laser data is valid, and if the laser data is valid, to detect whether the first height is abnormal; wherein, valid laser data means that the laser data is within the data range that the laser measurement module can effectively measure; The first flight altitude acquisition module is configured to, when the first altitude is detected to be normal, use the first altitude as the flight altitude of the UAV and update the altitude difference between the first altitude and the second altitude; wherein, the first altitude being normal includes no abrupt changes in altitude on the plane below the UAV and the plane below the UAV being flat; The second flight altitude acquisition module is configured to stop updating the altitude difference when the first altitude anomaly is detected, and to acquire the flight altitude based on the second altitude and the latest altitude difference before the record is stopped; wherein, the first altitude anomaly includes either a sudden change in altitude on the plane below the drone or an uneven plane below the drone.
10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the processor of a computer, cause the computer to perform the method described in any one of claims 1 to 8.