Height measurement compensation method of barometer and unmanned aerial vehicle

文档序号:1510286 发布日期:2020-02-07 浏览:2次 中文

阅读说明:本技术 气压计的高度测量补偿方法以及无人机 (Height measurement compensation method of barometer and unmanned aerial vehicle ) 是由 陶永康 于 2018-07-27 设计创作,主要内容包括:一种气压计的高度测量补偿方法以及无人机,方法包括:在无人机的运动状态改变时,获取无人机的飞行速度(S201),然后根据预先确定的飞行速度与高度补偿值之间的对应关系,确定无人机的飞行速度对应的飞行高度补偿值(S202),在无人机的运动状态改变的过程中,根据飞行高度补偿值,实时对无人机的气压计检测得到的飞行高度进行补偿(S203),从而提高气压计检测飞行高度的准确性,避免出现无人机的运动状态改变引起掉高或升高的现象。(A method for compensating height measurement of a barometer and an unmanned aerial vehicle are provided, and the method comprises the following steps: when the motion state of unmanned aerial vehicle changes, acquire unmanned aerial vehicle 'S flying speed (S201), then according to the corresponding relation between predetermined flying speed and the altitude compensation value, confirm the altitude compensation value (S202) that unmanned aerial vehicle' S flying speed corresponds, in the in-process that unmanned aerial vehicle 'S motion state changes, according to the altitude compensation value, compensate (S203) the altitude that unmanned aerial vehicle' S barometer detected and obtained in real time, thereby improve the accuracy that the barometer detected the altitude, avoid appearing the motion state change of unmanned aerial vehicle and arouse the phenomenon that the height falls or risees.)

1. A method of compensating for a height measurement of a barometer, comprising:

when the motion state of the unmanned aerial vehicle changes, acquiring the flight speed of the unmanned aerial vehicle;

determining a flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle according to a predetermined corresponding relationship between the flight speed and the altitude compensation value;

and in the process that the motion state of the unmanned aerial vehicle changes, compensating the flying height detected by the barometer of the unmanned aerial vehicle according to the flying height compensation value.

2. The method of claim 1, wherein before determining the altitude compensation value corresponding to the flying speed of the drone according to the predetermined correspondence between the flying speed and the altitude compensation value, further comprising:

selecting N selected flight speeds from the minimum flight speed to the maximum flight speed of the unmanned aerial vehicle, wherein N is an integer greater than 1;

for each selected airspeed of the N selected airspeeds, controlling the drone to fly at the selected airspeed; controlling the unmanned aerial vehicle to change the motion state during the flight at the selected flying speed; when the motion state of the unmanned aerial vehicle changes, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle, and a second flight height is obtained through a barometer in the unmanned aerial vehicle; obtaining an altitude compensation value corresponding to the selected flying speed according to the first flying altitude and the second flying altitude;

and obtaining the corresponding relation between the predetermined flying speed and the altitude compensation value according to the N selected flying speeds and the altitude compensation value corresponding to the N selected flying speeds.

3. The method of claim 2, wherein obtaining the predetermined correspondence between flying speeds and altitude compensation values according to the N selected flying speeds and the altitude compensation values corresponding to the N selected flying speeds comprises:

and fitting the N selected flight speeds and the altitude compensation values corresponding to the N selected flight speeds to obtain the corresponding relation between the predetermined flight speeds and the altitude compensation values.

4. The method according to claim 3, wherein the fitting the N selected flight speeds and the altitude compensation values corresponding to the N selected flight speeds to obtain the predetermined correspondence between flight speeds and altitude compensation values comprises:

aiming at every two adjacent selected flight speeds in the N selected flight speeds, carrying out linear interpolation processing according to the two adjacent selected flight speeds and two altitude compensation values corresponding to the two adjacent selected flight speeds to obtain the corresponding relation between the two adjacent selected flight speeds and the altitude compensation values;

and obtaining the predetermined corresponding relation between the flight speeds and the altitude compensation values according to the corresponding relation between every two adjacent selected flight speeds and the altitude compensation values in the N selected flight speeds.

5. The method according to any of claims 2-4, wherein said selecting N selected flight speeds from a minimum flight speed to a maximum flight speed of the drone comprises:

dividing the minimum flying speed to the maximum flying speed into N flying speed sections;

the N selected airspeeds are obtained by selecting one selected airspeed from each airspeed segment.

6. The method according to any one of claims 1-5, wherein the predetermined correspondence between flying speed and altitude compensation value comprises:

the corresponding relation between the magnitude of the predetermined flying speed and the altitude compensation value is set in each of the four preset flying directions;

wherein, four preset flight directions include unmanned aerial vehicle's aircraft nose place ahead, aircraft nose rear, aircraft nose left side, aircraft nose right side.

7. The method according to any one of claims 1 to 6, wherein the compensating the flying height detected by the barometer of the drone according to the flying height compensation value during the change of the motion state of the drone comprises:

and in the process of changing the motion state of the unmanned aerial vehicle, superposing the product of the flying height compensation value and the flying height compensation coefficient on the flying height detected by the barometer to obtain the compensated flying height.

8. The method according to any one of claims 1 to 6, wherein the compensating the flying height detected by the barometer of the drone according to the flying height compensation value during the change of the motion state of the drone comprises:

determining a flight altitude compensation coefficient according to the time length of the change of the motion state of the unmanned aerial vehicle in the process of the change of the motion state of the unmanned aerial vehicle;

and superposing the product of the flying height compensation value and the flying height compensation coefficient to the flying height detected by the barometer to obtain the compensated flying height.

9. The method according to any one of claims 1 to 6, wherein the compensating the flying height detected by the barometer according to the flying height compensation value during the change of the motion state of the UAV comprises:

in the process of the front section time of the change of the motion state of the unmanned aerial vehicle, the product of a first flying height compensation coefficient and the flying height compensation value is superposed on the flying height detected by the barometer to obtain the compensated flying height;

in the process of the later period of time when the motion state of the unmanned aerial vehicle changes, the product of a second flying height compensation coefficient and the flying height compensation value is superposed on the flying height detected by the barometer to obtain the compensated flying height;

wherein the first flying height compensation factor is different from the second flying height compensation factor.

10. The method of any of claims 1-9, wherein the airspeed comprises: the flying speed of the unmanned aerial vehicle before the change of the motion state.

11. The method of claim 10, wherein the airspeed further comprises: the flying speed of the unmanned aerial vehicle after the change of the motion state.

12. The method of any of claims 1-11, wherein the airspeed comprises: the direction of the flight speed and the magnitude of the flight speed.

13. The method of any one of claims 1-12, further comprising:

and when the motion state of the unmanned aerial vehicle stops changing, the flying height detected by the barometer is stopped being compensated.

14. An unmanned aerial vehicle, comprising: a processor and a barometer;

the barometer is used for detecting and obtaining the flying height of the unmanned aerial vehicle;

the processor is used for acquiring the flight speed of the unmanned aerial vehicle when the motion state of the unmanned aerial vehicle changes; determining a flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle according to a predetermined corresponding relationship between the flight speed and the altitude compensation value; and in the process of changing the motion state of the unmanned aerial vehicle, compensating the flying height detected by the barometer according to the flying height compensation value.

15. The drone of claim 14, wherein the processor is further configured to:

before determining a flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle according to a predetermined corresponding relationship between the flight speed and the altitude compensation value, selecting N selected flight speeds from the minimum flight speed to the maximum flight speed of the unmanned aerial vehicle, wherein N is an integer greater than 1;

for each selected airspeed of the N selected airspeeds, controlling the drone to fly at the selected airspeed; controlling the unmanned aerial vehicle to change the motion state during the flight at the selected flying speed; when the motion state of the unmanned aerial vehicle changes, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle, and a second flight height is obtained through a barometer in the unmanned aerial vehicle; obtaining an altitude compensation value corresponding to the selected flying speed according to the first flying altitude and the second flying altitude;

and obtaining the corresponding relation between the predetermined flying speed and the altitude compensation value according to the N selected flying speeds and the altitude compensation value corresponding to the N selected flying speeds.

16. The drone of claim 15, wherein the processor is specifically configured to: and fitting the N selected flight speeds and the altitude compensation values corresponding to the N selected flight speeds to obtain the corresponding relation between the predetermined flight speeds and the altitude compensation values.

17. The drone of claim 16, wherein the processor is specifically configured to: aiming at every two adjacent selected flight speeds in the N selected flight speeds, carrying out linear interpolation processing according to the two adjacent selected flight speeds and two altitude compensation values corresponding to the two adjacent selected flight speeds to obtain the corresponding relation between the two adjacent selected flight speeds and the altitude compensation values; and obtaining the predetermined corresponding relation between the flying speeds and the altitude compensation values according to the corresponding relation between every two adjacent selected flying speeds and the altitude compensation values in the N selected flying speeds.

18. A drone according to any one of claims 15 to 17, wherein the processor is specifically configured to: dividing the minimum flying speed to the maximum flying speed into N flying speed sections; and obtaining the N selected flight speeds by selecting one selected flight speed from each flight speed section.

19. A drone according to any of claims 14-18, characterised in that the correspondence between the predetermined flight speed and altitude compensation value comprises:

the corresponding relation between the magnitude of the predetermined flying speed and the altitude compensation value is set in each of the four preset flying directions;

wherein, four preset flight directions include unmanned aerial vehicle's aircraft nose place ahead, aircraft nose rear, aircraft nose left side, aircraft nose right side.

20. A drone according to any one of claims 14 to 19, wherein the processor is specifically configured to: and in the process of changing the motion state of the unmanned aerial vehicle, superposing the product of the flying height compensation value and the flying height compensation coefficient on the flying height detected by the barometer to obtain the compensated flying height.

21. A drone according to any one of claims 14 to 19, wherein the processor is specifically configured to: determining a flight altitude compensation coefficient according to the time length of the change of the motion state of the unmanned aerial vehicle in the process of the change of the motion state of the unmanned aerial vehicle; and superposing the product of the flying height compensation value and the flying height compensation coefficient to the flying height detected by the barometer to obtain the compensated flying height.

22. A drone according to any one of claims 14 to 19, wherein the processor is specifically configured to:

in the process of the front section time of the change of the motion state of the unmanned aerial vehicle, the product of a first flying height compensation coefficient and the flying height compensation value is superposed on the flying height detected by the barometer to obtain the compensated flying height;

in the process of the later period of time when the motion state of the unmanned aerial vehicle changes, the product of a second flying height compensation coefficient and the flying height compensation value is superposed on the flying height detected by the barometer to obtain the compensated flying height;

wherein the first flying height compensation factor is different from the second flying height compensation factor.

23. A drone according to any one of claims 14 to 22, wherein the flight speed includes: the flying speed of the unmanned aerial vehicle before the change of the motion state.

24. The drone of claim 23, wherein the airspeed further comprises: the flying speed of the unmanned aerial vehicle after the change of the motion state.

25. A drone according to any one of claims 14 to 24, wherein the flight speed includes: the direction of the flight speed and the magnitude of the flight speed.

26. A drone as in any of claims 14-25, wherein the processor is further configured to stop compensating for the flying height detected by the barometer when the state of motion of the drone stops changing.

Technical Field

The embodiment of the invention relates to the technical field of unmanned aerial vehicles, in particular to a height measurement compensation method of a barometer and an unmanned aerial vehicle.

Background

Unmanned aerial vehicle is at the flight in-process, in order to accurately control unmanned aerial vehicle's flight, satisfy unmanned aerial vehicle's limit for height requirement, guarantee unmanned aerial vehicle's flight safety etc. need detect unmanned aerial vehicle's flying height. With the limit for height requirement that satisfies unmanned aerial vehicle as an example, if unmanned aerial vehicle's altitude of flight is too high can influence manned aircraft, the incident takes place easily, so need restrict unmanned aerial vehicle's altitude, consequently unmanned aerial vehicle is at the flight in-process, detect unmanned aerial vehicle's altitude, then when unmanned aerial vehicle's altitude is greater than the height of restriction, inject unmanned aerial vehicle and continue to fly upwards to guarantee that unmanned aerial vehicle's altitude of flight is less than or equal to the height of restriction.

Disclosure of Invention

The embodiment of the invention provides a height measurement compensation method of a barometer and an unmanned aerial vehicle, which can improve the accuracy of detecting the flying height of the barometer and avoid the phenomenon of falling or rising caused by the change of the motion state of the unmanned aerial vehicle.

In a first aspect, an embodiment of the present invention provides a method for compensating a height measurement of a barometer, including:

when the motion state of the unmanned aerial vehicle changes, acquiring the flight speed of the unmanned aerial vehicle;

determining a flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle according to a predetermined corresponding relationship between the flight speed and the altitude compensation value;

and in the process that the motion state of the unmanned aerial vehicle changes, compensating the flying height detected by the barometer of the unmanned aerial vehicle according to the flying height compensation value.

In a second aspect, an embodiment of the present invention provides an unmanned aerial vehicle, including: a processor and a barometer;

the barometer is used for detecting and obtaining the flying height of the unmanned aerial vehicle;

the processor is used for acquiring the flight speed of the unmanned aerial vehicle when the motion state of the unmanned aerial vehicle changes; determining a flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle according to a predetermined corresponding relationship between the flight speed and the altitude compensation value; and in the process of changing the motion state of the unmanned aerial vehicle, compensating the flying height detected by the barometer according to the flying height compensation value.

In a third aspect, an embodiment of the present invention provides a height measurement compensation apparatus (e.g., a chip, an integrated circuit, etc.) for a barometer, including: a memory and a processor. The memory stores code for performing a method of altitude measurement compensation for a barometer. The processor is configured to call the code stored in the memory to perform the method for compensating height measurement of a barometer according to the first aspect of the present invention.

In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium, which stores a computer program, where the computer program includes at least one code segment that is executable by a computer to control the computer to perform a method for compensating a height measurement of a barometer according to embodiments of the present invention in the first aspect.

In a fifth aspect, an embodiment of the present invention provides a computer program, which when executed by a computer, is configured to implement the method for compensating height measurement of a barometer according to the first aspect.

According to the altitude measurement compensation method for the barometer and the unmanned aerial vehicle, provided by the embodiment of the invention, the flight speed of the unmanned aerial vehicle is obtained when the motion state of the unmanned aerial vehicle changes, then the flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle is determined according to the corresponding relation between the predetermined flight speed and the altitude compensation value, and the flight altitude detected by the barometer of the unmanned aerial vehicle is compensated in real time according to the flight altitude compensation value in the process of changing the motion state of the unmanned aerial vehicle, so that the accuracy of detecting the flight altitude by the barometer is improved, and the phenomenon of falling or rising caused by the change of the motion state of the unmanned aerial vehicle is avoided.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.

FIG. 1 is a schematic architectural diagram of an unmanned flight system according to an embodiment of the invention;

FIG. 2 is a flow chart of a method for compensating for a height measurement of a barometer according to an embodiment of the invention;

FIG. 3 is a flow chart of a predetermined correspondence between flight speed and altitude compensation provided in accordance with an embodiment of the present invention;

fig. 4 is a schematic structural diagram of an unmanned aerial vehicle according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When a component is referred to as being "connected" to another component, it can be directly connected to the other component or intervening components may also be present.

Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.

The embodiment of the invention provides a height measurement compensation method of a barometer and an unmanned aerial vehicle. Where the drone may be, for example, a rotorcraft (rotorcraft), such as a multi-rotor aircraft propelled through air by a plurality of propulsion devices, embodiments of the invention are not limited in this regard.

FIG. 1 is a schematic architectural diagram of an unmanned flight system according to an embodiment of the invention. The present embodiment is described by taking a rotor unmanned aerial vehicle as an example.

The unmanned flight system 100 can include a drone 110, a display device 130, and a control terminal 140. The drone 110 may include, among other things, a power system 150, a flight control system 160, a frame, and a pan-tilt 120 carried on the frame. The drone 110 may be in wireless communication with the control terminal 140 and the display device 130.

The airframe may include a fuselage and a foot rest (also referred to as a landing gear). The fuselage may include a central frame and one or more arms connected to the central frame, the one or more arms extending radially from the central frame. The foot rest is connected with the fuselage for play the supporting role when unmanned aerial vehicle 110 lands.

The power system 150 may include one or more electronic governors (abbreviated as electric governors) 151, one or more propellers 153, and one or more motors 152 corresponding to the one or more propellers 153, wherein the motors 152 are connected between the electronic governors 151 and the propellers 153, the motors 152 and the propellers 153 are disposed on the horn of the drone 110; the electronic governor 151 is configured to receive a drive signal generated by the flight control system 160 and provide a drive current to the motor 152 based on the drive signal to control the rotational speed of the motor 152. The motor 152 is used to drive the propeller in rotation, thereby providing power for the flight of the drone 110, which power enables the drone 110 to achieve one or more degrees of freedom of motion. In certain embodiments, the drone 110 may rotate about one or more axes of rotation. For example, the above-mentioned rotation axes may include a Roll axis (Roll), a Yaw axis (Yaw) and a pitch axis (pitch). It should be understood that the motor 152 may be a dc motor or an ac motor. The motor 152 may be a brushless motor or a brush motor.

Flight control system 160 may include a flight controller 161 and a sensing system 162. The sensing system 162 is used to measure attitude information of the drone, i.e., position information and status information of the drone 110 in space, such as three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, three-dimensional angular velocity, and the like. The sensing system 162 may include, for example, at least one of a gyroscope, an ultrasonic sensor, an electronic compass, an Inertial Measurement Unit (IMU), a vision sensor, a global navigation satellite system, and a barometer. For example, the Global navigation satellite system may be a Global Positioning System (GPS). The flight controller 161 is used to control the flight of the drone 110, for example, the flight of the drone 110 may be controlled according to attitude information measured by the sensing system 162. It should be understood that the flight controller 161 may control the drone 110 according to preprogrammed instructions, or may control the drone 110 in response to one or more control instructions from the control terminal 140.

The pan/tilt head 120 may include a motor 122. The pan/tilt head is used to carry the photographing device 123. Flight controller 161 may control the movement of pan/tilt head 120 via motor 122. Optionally, as another embodiment, the pan/tilt head 120 may further include a controller for controlling the movement of the pan/tilt head 120 by controlling the motor 122. It should be understood that the pan/tilt head 120 may be separate from the drone 110, or may be part of the drone 110. It should be understood that the motor 122 may be a dc motor or an ac motor. The motor 122 may be a brushless motor or a brush motor. It should also be understood that the pan/tilt head may be located at the top of the drone, as well as at the bottom of the drone.

The photographing device 123 may be, for example, a device for capturing an image such as a camera or a video camera, and the photographing device 123 may communicate with the flight controller and perform photographing under the control of the flight controller. The image capturing Device 123 of this embodiment at least includes a photosensitive element, such as a Complementary Metal Oxide Semiconductor (CMOS) sensor or a Charge-coupled Device (CCD) sensor. It can be understood that the camera 123 may also be directly fixed to the drone 110, such that the pan/tilt head 120 may be omitted.

The display device 130 is located at the ground end of the unmanned aerial vehicle system 100, can communicate with the unmanned aerial vehicle 110 in a wireless manner, and can be used for displaying attitude information of the unmanned aerial vehicle 110. In addition, an image taken by the imaging device may also be displayed on the display apparatus 130. It should be understood that the display device 130 may be a stand-alone device or may be integrated into the control terminal 140.

The control terminal 140 is located at the ground end of the unmanned aerial vehicle system 100, and can communicate with the unmanned aerial vehicle 110 in a wireless manner, so as to remotely control the unmanned aerial vehicle 110.

In addition, the unmanned aerial vehicle 110 may also have a speaker (not shown in the figure) mounted thereon, and the speaker is used for playing audio files, and the speaker may be directly fixed on the unmanned aerial vehicle 110, or may be mounted on the cradle head 120.

It should be understood that the above-mentioned nomenclature for the components of the unmanned flight system is for identification purposes only, and should not be construed as limiting embodiments of the present invention.

Fig. 2 is a flowchart of a method for compensating height measurement of a barometer according to an embodiment of the present invention, where as shown in fig. 2, the method of this embodiment may be applied to an unmanned aerial vehicle, and the method of this embodiment may include:

s201, when the motion state of the unmanned aerial vehicle changes, acquiring the flight speed of the unmanned aerial vehicle.

In this embodiment, the change of the motion state of the drone may include at least one of: the flight direction of the unmanned aerial vehicle changes, or the flight speed of the unmanned aerial vehicle changes. Wherein, the change of the motion state of the unmanned aerial vehicle can be caused by the internal power output of the unmanned aerial vehicle, for example: the control lever amount that unmanned aerial vehicle received changes, and this can arouse unmanned aerial vehicle's internal power output to change, causes unmanned aerial vehicle's flight direction and/or flying speed's size to change. In addition, the change in state of motion of the drone may be caused by external power to the drone, such as: wind force causes the flight direction of the unmanned aerial vehicle to change, or wind force causes the flight speed of the unmanned aerial vehicle to increase or decrease, and the like. In an application scenario, for example, the unmanned aerial vehicle brake, when the unmanned aerial vehicle brake, the control lever volume that unmanned aerial vehicle received can change, and this can arouse that unmanned aerial vehicle constantly reduces along the size of current flight direction's airspeed, and this motion state that belongs to unmanned aerial vehicle changes.

If unmanned aerial vehicle's motion state changes, then the rotational speed of unmanned aerial vehicle's screw can change, causes the air current environment on every side to change, produces undulantly between the atmospheric pressure value that the barometer in the unmanned aerial vehicle detected and the actual atmospheric pressure value to cause the altitude of unmanned aerial vehicle that the barometer detected inaccurate, so need compensate the altitude of flight that the barometer detected. Therefore, when the motion state of the unmanned aerial vehicle changes, the unmanned aerial vehicle acquires the flight speed of the unmanned aerial vehicle. Alternatively, the airspeed may be a velocity vector, i.e., the airspeed includes the direction of flight of the airspeed and the magnitude of the airspeed.

S202, determining a flying height compensation value corresponding to the flying speed of the unmanned aerial vehicle according to the corresponding relation between the predetermined flying speed and the height compensation value.

In this embodiment, after the unmanned aerial vehicle acquires the flight speed of the unmanned aerial vehicle, the flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle acquired in the above S201 is determined according to the predetermined correspondence between the flight speed and the altitude compensation value.

S203, in the process of changing the motion state of the unmanned aerial vehicle, compensating the flying height detected by the barometer of the unmanned aerial vehicle according to the flying height compensation value.

In this embodiment, unmanned aerial vehicle is after obtaining the flying height compensation value that airspeed corresponds, and in unmanned aerial vehicle's motion state change process, according to this flying height compensation value, the flying height that obtains this unmanned aerial vehicle's barometer detection compensates to when compensating unmanned aerial vehicle's motion state change, cause the flying height that the barometer that the air current environment around the unmanned aerial vehicle changes and arouses and the error between the actual flying height. Alternatively, the flying height compensation value may be a positive value or a negative value.

The altitude measurement compensation method of barometer that this embodiment provided, when changing through the motion state at unmanned aerial vehicle, acquire unmanned aerial vehicle's flying speed, then according to the corresponding relation between predetermined flying speed and the altitude compensation value, confirm the flying height compensation value that unmanned aerial vehicle's flying speed corresponds, at the in-process that unmanned aerial vehicle's motion state changes, according to flying height compensation value is real-time right the flying height that unmanned aerial vehicle's barometer detected and is obtained compensates to improve the accuracy that the barometer detected flying height, avoid appearing the motion state change of unmanned aerial vehicle and arouse the phenomenon that the height falls or risees.

In a possible implementation manner, after the unmanned aerial vehicle obtains the flying height compensation value, in the process of changing the motion state of the unmanned aerial vehicle, the product of the flying height compensation value and the flying height compensation coefficient is superimposed on the flying height detected by the barometer, so as to obtain the compensated flying height. For example: h '(t) ═ H (t) + Δ H × a, where H' (t) is the compensated flying height corresponding to time t, H is the flying height detected by the barometer corresponding to time t, Δ H is the flying height compensation value, and a is the flying height compensation coefficient, and for example, a may be a positive value, or a may be a negative value, and a may be a value fixed in advance. Optionally, whether a is a positive or negative value may be determined according to whether the state of motion of the drone changes to acceleration or deceleration, for example: the flying height compensation value is, for example, a positive value if the motion state of the unmanned aerial vehicle is, for example, deceleration, and a negative value if the motion state of the unmanned aerial vehicle is acceleration. Alternatively, when a is equal to 1, the drone directly superimposes the flight altitude compensation value on the flight altitude detected by the barometer.

In another possible implementation manner, after the unmanned aerial vehicle obtains the flying height compensation value, in the process of changing the motion state of the unmanned aerial vehicle, determining a flying height compensation coefficient according to the time length of the change of the motion state of the unmanned aerial vehicle; and then, the product of the flying height compensation value and the flying height compensation coefficient is superposed on the flying height detected by the barometer to obtain the compensated flying height. In this embodiment, after the unmanned aerial vehicle obtains the flying height compensation value, as the duration that the motion state of unmanned aerial vehicle changes increases, the flying height compensation coefficient can be determined in real time, and this flying height compensation coefficient no longer fixes to a value, but is relevant with the duration that the motion state of unmanned aerial vehicle changes, for example: and determining the time length of the change of the motion state of the unmanned aerial vehicle at the current time, determining the flight altitude compensation coefficient corresponding to the current time according to the time length, and then superposing the product of the flight altitude compensation coefficient corresponding to the current time and the flight altitude value on the flight altitude detected by the barometer. For example: h '(t) ═ H (t) + Δ H a [ t (t) ], where H' (t) is the compensated flying height corresponding to time t, H (t) is the flying height detected by the barometer corresponding to time t, Δ H is the flying height compensation value, t (t) is the time length during which the motion state of the unmanned aerial vehicle corresponding to time t changes, a is the flying height compensation coefficient corresponding to time t, and the value of a is related to t (t).

Optionally, as the duration of the change of the motion state of the unmanned aerial vehicle is continuously increased, the corresponding flying height compensation coefficient is also continuously changed. For example, the flight altitude compensation coefficient has a linear relationship with the time length of the change of the motion state of the unmanned aerial vehicle, and the flight altitude compensation coefficient can be continuously changed from 0 to 1 within 0 to 10 seconds on the assumption that the total time length of the change of the motion state of the unmanned aerial vehicle is 10 seconds; when the time length of the change of the motion state of the unmanned aerial vehicle is 1 second, the corresponding flying height compensation coefficient is 1, and the flying height detected by the air pressure gauge at the moment is compensated according to the flying height compensation coefficient being 1 and the flying height compensation value; when the time length of the change of the motion state of the unmanned aerial vehicle is 5 seconds, the corresponding flying height compensation coefficient is 0.5, and the flying height detected by the air pressure gauge at this time is compensated according to the flying height compensation coefficient of 0.5 and the flying height compensation value.

Optionally, as the duration of the change of the motion state of the unmanned aerial vehicle increases, the flying height may be compensated differently in different time periods, for example, for a duration of the change of the motion state of the unmanned aerial vehicle, the corresponding flying height compensation coefficients are the same. Assuming that the total time length of the change of the motion state of the unmanned aerial vehicle is 10 seconds, and when the time length of the change of the motion state of the unmanned aerial vehicle is within 0-2 seconds, the corresponding flying height compensation coefficient is 1, compensating the flying height detected by the air pressure meter at the time according to the flying height compensation coefficient being 1 and the flying height compensation value within the time period; when the time length of the change of the motion state of the unmanned aerial vehicle is 2-4 seconds, the corresponding flying height compensation coefficient is 0.8, and the flying height detected by the air pressure meter in the period of time is compensated according to the flying height compensation coefficient of 0.8 and the flying height compensation value in the period of time. By analogy, the description is omitted here.

In another possible implementation manner, as the duration of the change of the motion state of the unmanned aerial vehicle is increased, the flying height can be compensated differently in two ways. And in the process of the front section time of the change of the motion state of the unmanned aerial vehicle, superposing the product of the first flying height compensation coefficient and the flying height compensation value on the flying height detected by the barometer to obtain the compensated flying height. And in the process of the later period of time when the motion state of the unmanned aerial vehicle changes, the product of a second flying height compensation coefficient and the flying height compensation value is superposed on the flying height detected by the barometer to obtain the compensated flying height. Wherein the first flying height compensation factor is different from the second flying height compensation factor.

For example: the first flying height compensation coefficient is 1, and the second flying height compensation coefficient is 0.5. In this embodiment, unmanned aerial vehicle can superpose flying height compensation value to the flying height that the barometer detected and obtained in the anterior segment time of unmanned aerial vehicle's motion state, in the back end time that unmanned aerial vehicle's motion state changed, superpose 0.5 times of flying height compensation value to on the flying height that the barometer detected and obtained. Alternatively, the former period of time may be, for example, a preset time (for example, 3 seconds) after the change of the motion state of the drone is started, and the latter period of time may be, for example, a time other than the above-described 3 seconds during which the motion state of the drone changes. Optionally, the previous period of time may be, for example, the first 30% of the time of the change of the motion state of the drone, and the previous period of time may be, for example, the last 70% of the time of the change of the motion state of the drone, and the numerical values herein are merely for illustration and are not limited to the present embodiment.

Therefore, this embodiment is in the process that unmanned aerial vehicle motion state changes, on the flying height that detects with fixed numerical value compensation to barometer all the time, but the different compensation is done in the process that the motion state changes, can compensate the different altitude variation that drop height or rise arouse at the in-process that the motion state of unmanned aerial vehicle changes for unmanned aerial vehicle's flying height after the compensation of motion state change is more close unmanned aerial vehicle's actual flying height.

In some embodiments, if the motion state of the drone stops changing, the compensation for the flying height detected by the barometer is stopped, because the motion state of the drone remains unchanged, the airflow environment around the drone remains unchanged, and the barometer is not disturbed, and the flying height detected by the barometer is very close to the actual flying height, and the flying height detected by the barometer does not need to be compensated. For example: the change of the motion state stop of the drone may be that the flying speed of the drone drops to 0, or that the flying speed of the drone remains unchanged. Optionally, if the scheme of this embodiment is only applied to the flying height compensation in the unmanned aerial vehicle braking process, then the change of the motion state of the unmanned aerial vehicle is the unmanned aerial vehicle braking, and then the motion state of the unmanned aerial vehicle stops changing and can be that the flying speed of the unmanned aerial vehicle drops to 0, or the unmanned aerial vehicle receives the control lever amount in the braking process.

In some embodiments, before performing the above embodiments, the drone further obtains a predetermined correspondence between flight speed and altitude compensation value, for example: the corresponding relation can be predetermined and stored by the unmanned aerial vehicle; or the unmanned aerial vehicle can be preset and determined by other equipment, and then the unmanned aerial vehicle acquires the information from the other equipment and stores the information. The following description is given by taking the case that the unmanned aerial vehicle determines the corresponding relationship in advance, as shown in fig. 3, the specific process may include:

s301, selecting N selected flight speeds from the minimum flight speed to the maximum flight speed of the unmanned aerial vehicle.

In this embodiment, the unmanned aerial vehicle selects N flying speeds as N selected flying speeds from the minimum flying speed to the maximum flying speed of the unmanned aerial vehicle, the N selected flying speeds are different from each other, and each selected flying speed belongs to the range from the minimum flying speed to the maximum flying speed.

In one possible implementation, the drone may divide the minimum flying speed to the maximum flying speed into N flying speed segments, and then obtain the N selected flying speeds by selecting one selected flying speed from each flying speed segment. And if the minimum flying speed of the unmanned aerial vehicle is 0m/s, the maximum flying speed is 20m/s and N is 5, selecting 5 selected flying speeds from 0m/s-20 m/s. The method specifically comprises the following steps: dividing 0m/s-20m/s into 5 flight speed sections, which are respectively as follows: a flight speed range of 0m/s-4m/s, a flight speed range of 4m/s-8m/s, a flight speed range of 8m/s-12m/s, a flight speed range of 12m/s-16m/s, a flight speed range of 16m/s-20m/s, then a selected flight speed (e.g. 2m/s, the middle value in a flight speed range) is selected from the flight speed range of 0m/s-4m/s, a selected flight speed (e.g. 6m/s) is selected from the flight speed range of 4m/s-8m/s, a selected flight speed (e.g. 10m/s) is selected from the flight speed range of 8m/s-12m/s, a selected flight speed (e.g. 10m/s) is selected from the flight speed range of 12m/s-16m/s (e.g., 14m/s), selecting a selected airspeed (e.g., 18m/s) from the 16m/s-20m/s interval to obtain a total of 5 selected airspeeds of 2m/s, 6m/s, 10m/s, 14m/s, 18 m/s.

S302, aiming at each selected flying speed in the N selected flying speeds, controlling the unmanned aerial vehicle to fly at the selected flying speed; controlling the unmanned aerial vehicle to change the motion state during the flight at the selected flying speed; when the motion state of the unmanned aerial vehicle changes, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle, and a second flight height is obtained through a barometer in the unmanned aerial vehicle; and obtaining an altitude compensation value corresponding to the selected flying speed according to the first flying altitude and the second flying altitude.

In this embodiment, for example, the 5 selected flight speeds are used, the unmanned aerial vehicle is controlled to fly at 2m/s, the motion state of the unmanned aerial vehicle is changed in the process of flying at 2m/s, for example, the unmanned aerial vehicle is controlled to start deceleration (for example, braking) or acceleration from 2m/s, when the motion state of the unmanned aerial vehicle is changed, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle, and a second flight height is obtained through a barometer in the unmanned aerial vehicle; and obtaining a height compensation value corresponding to 2m/s according to the first flying height and the second flying height. By adopting the mode, the height compensation value corresponding to 6m/s, the height compensation value corresponding to 10m/s, the height compensation value corresponding to 14m/s and the height compensation value corresponding to 18m/s can be obtained.

S303, obtaining the corresponding relation between the predetermined flying speed and the altitude compensation value according to the N selected flying speeds and the altitude compensation value corresponding to the N selected flying speeds.

In this embodiment, after obtaining the altitude compensation value corresponding to 2m/s, the altitude compensation value corresponding to 6m/s, the altitude compensation value corresponding to 10m/s, the altitude compensation value corresponding to 14m/s, and the altitude compensation value corresponding to 18m/s, the correspondence relationship between the flying speed and the altitude compensation value is obtained according to the altitude compensation value corresponding to 2m/s, the altitude compensation values corresponding to 6m/s and 6m/s, the altitude compensation values corresponding to 10m/s and 10m/s, the altitude compensation values corresponding to 14m/s and 14m/s, and the altitude compensation values corresponding to 18m/s and 18 m/s.

In a possible implementation manner, the unmanned aerial vehicle may perform fitting processing on the N selected flight speeds and the altitude compensation values corresponding to the N selected flight speeds to obtain a correspondence relationship between the flight speeds and the altitude compensation values. For example, the unmanned aerial vehicle may perform fitting processing on altitude compensation values corresponding to 2m/s and 2m/s, altitude compensation values corresponding to 6m/s and 6m/s, altitude compensation values corresponding to 10m/s and 10m/s, altitude compensation values corresponding to 14m/s and 14m/s, and altitude compensation values corresponding to 18m/s and 18m/s to obtain the correspondence relationship between the flying speed and the altitude compensation values.

Alternatively, the process of the fitting process may be: aiming at every two adjacent selected flight speeds in the N selected flight speeds, the unmanned aerial vehicle performs linear interpolation processing according to the two adjacent selected flight speeds and two altitude compensation values corresponding to the two adjacent selected flight speeds to obtain the corresponding relation between the two adjacent selected flight speeds and the altitude compensation values; and obtaining the predetermined corresponding relation between the flight speeds and the altitude compensation values according to the corresponding relation between every two adjacent selected flight speeds and the altitude compensation values in the N selected flight speeds. For example, it may be: the unmanned aerial vehicle performs linear interpolation processing on the altitude compensation values corresponding to 2m/s and 2m/s, the altitude compensation values corresponding to 6m/s and 6m/s to obtain the corresponding relation between the flight speed of 2m/s to 6m/s and the altitude compensation values; performing linear interpolation processing on the altitude compensation values corresponding to 6m/s and 6m/s, the altitude compensation values corresponding to 10m/s and 10m/s to obtain the corresponding relation between the flight speed of 6m/s to 10m/s and the altitude compensation values; performing linear interpolation processing on the altitude compensation values corresponding to 10m/s and 10m/s, and the altitude compensation values corresponding to 14m/s and 14m/s to obtain a corresponding relation between the flight speed of 10m/s to 14m/s and the altitude compensation values; and performing linear interpolation processing on the altitude compensation values corresponding to 14m/s and 14m/s, the altitude compensation values corresponding to 18m/s and 18m/s to obtain the corresponding relation between the flight speed of 14m/s to 18m/s and the altitude compensation values. And then the unmanned aerial vehicle obtains the corresponding relation between the flying speed of 0m/s to 20m/s and the altitude compensation value according to the corresponding relation between the flying speed of 2m/s to 6m/s and the altitude compensation value, the corresponding relation between the flying speed of 6m/s to 10m/s and the altitude compensation value, the corresponding relation between the flying speed of 10m/s to 14m/s and the altitude compensation value and the corresponding relation between the flying speed of 14m/s to 18m/s and the altitude compensation value.

In some embodiments, the airspeed of the drone is a velocity vector that includes the direction of the airspeed (i.e., the direction of flight) and the magnitude of the airspeed.

In some embodiments, the correspondence between the predetermined flying speed and the altitude compensation value includes: the corresponding relation between the magnitude of the predetermined flying speed and the altitude compensation value is set in each of the four preset flying directions; wherein, four preset flight directions include unmanned aerial vehicle's aircraft nose place ahead, aircraft nose rear, aircraft nose left side, aircraft nose right side. The correspondence between the predetermined flying speed and the altitude compensation value in each preset flying direction may be obtained by using the above S301-S303, and a specific implementation process is not described again, where it should be noted that, for each preset flying direction, when S301 is executed, the minimum flying speed and the maximum flying speed corresponding to the preset flying direction are used. The minimum flying speeds corresponding to different preset flying directions may be different, and the maximum flying speeds corresponding to different preset flying directions may be different.

That is, the correspondence relationship between the above-mentioned predetermined flying speed and the altitude compensation value includes: the method comprises the steps of predetermining the corresponding relation between the size of the flying speed of the front of the head of the unmanned aerial vehicle and the height compensation value in the flying direction, predetermining the corresponding relation between the size of the flying speed of the rear of the head of the unmanned aerial vehicle and the height compensation value in the flying direction, predetermining the corresponding relation between the size of the flying speed of the left side of the head of the unmanned aerial vehicle and the height compensation value in the flying direction, and predetermining the corresponding relation between the size of the flying speed of the front of the right head of the unmanned aerial vehicle and the height compensation value in the flying direction.

If the direction of the flight speed of the unmanned aerial vehicle acquired in the above S201 is the head front of the unmanned aerial vehicle, the unmanned aerial vehicle determines the flight altitude compensation value according to the correspondence between the magnitude of the flight speed and the magnitude and altitude compensation value of the flight speed of which the predetermined flight direction is the head front of the unmanned aerial vehicle.

If the direction of the flight speed obtained in the above S201 is the left front of the unmanned aerial vehicle, the unmanned aerial vehicle obtains the magnitude of the flight speed component in front of the aircraft nose of the unmanned aerial vehicle and the magnitude of the flight speed component in left of the aircraft nose of the unmanned aerial vehicle according to the flight speed, then the magnitude of the flight speed component in front of the aircraft nose of the unmanned aerial vehicle and the corresponding relationship between the magnitude of the flight speed in front of the aircraft nose of the unmanned aerial vehicle and the height compensation value are determined according to the magnitude of the flight speed component in front of the aircraft nose of the unmanned aerial vehicle and the predetermined flight speed, the magnitude of the flight speed in left of the aircraft nose of the unmanned aerial vehicle and the corresponding relationship between the height compensation value are determined according to the magnitude of the flight speed component in left of the aircraft nose of the unmanned aerial. The unmanned aerial vehicle obtains a flight altitude compensation value according to the altitude compensation value corresponding to the front of the aircraft nose and the altitude compensation value corresponding to the left of the aircraft nose, for example, the flight altitude compensation value is obtained by adding the altitude compensation value corresponding to the front of the aircraft nose and the altitude compensation value corresponding to the left of the aircraft nose.

In some embodiments, the correspondence between the predetermined flying speed and the altitude compensation value includes: a correspondence between predetermined flying speeds corresponding to flying speed acceleration and altitude compensation values, and a correspondence between predetermined flying speeds corresponding to flying speed deceleration (e.g., braking) and altitude compensation values. Optionally, when the change of the motion state of the drone includes acceleration of the flight speed of the drone, the drone determines the flight altitude compensation value according to the flight speed of the drone and a predetermined correspondence between the flight speed and the altitude compensation value corresponding to the acceleration of the flight speed. Optionally, when the change of the motion state of the unmanned aerial vehicle includes deceleration of the flight speed of the unmanned aerial vehicle, the unmanned aerial vehicle determines the flight altitude compensation value according to the flight speed of the unmanned aerial vehicle and a predetermined correspondence between the flight speed and the altitude compensation value corresponding to the deceleration of the flight speed. Optionally, when the motion state of the drone changes, the method includes: when the unmanned aerial vehicle decelerates towards the first direction flying speed and accelerates towards the second direction flying speed, the unmanned aerial vehicle determines the altitude compensation value corresponding to the first direction according to the flying speed of the first direction and the corresponding relation between the predetermined flying speed corresponding to the decelerating flying speed and the altitude compensation value, determines the altitude compensation value corresponding to the second direction according to the flying speed of the second direction and the corresponding relation between the predetermined flying speed corresponding to the accelerating flying speed and the altitude compensation value, and then determines the flying altitude compensation value according to the altitude compensation value corresponding to the first direction and the altitude compensation value corresponding to the second direction.

In some embodiments, when the motion state of the drone changes, the acquired flight speed of the drone includes a flight speed before the motion state of the drone changes. Correspondingly, when the unmanned aerial vehicle determines the flying height compensation value, the flying height compensation value is determined according to the flying speed of the unmanned aerial vehicle before the motion state changes and the corresponding relation between the predetermined flying speed and the height compensation value.

In some embodiments, if the predetermined correspondence between the flying speed and the altitude compensation value comprises: the corresponding relation between the predetermined flying speed and the altitude compensation value corresponding to the accelerated flying speed and the corresponding relation between the predetermined flying speed and the altitude compensation value corresponding to the decelerated flying speed, then the flying speed of the unmanned aerial vehicle obtained by the unmanned aerial vehicle comprises the flying speed after the change of the motion state of the unmanned aerial vehicle, and the unmanned aerial vehicle can determine that the motion state of the unmanned aerial vehicle is accelerated or decelerated according to the flying speed before the change of the motion state of the unmanned aerial vehicle and the flying speed after the change. And then the unmanned aerial vehicle determines a flying height compensation value according to the flying speed of the unmanned aerial vehicle before the change of the motion state and the corresponding relation between the predetermined flying speed corresponding to the acceleration or deceleration of the flying speed and the height compensation value.

In some embodiments, the obtaining of the predetermined correspondence between the flying speed corresponding to the flying speed acceleration and the altitude compensation value may be performed in S301 to S303, and the specific implementation process is not described again. It should be noted that the above-mentioned change of the motion state in S302 refers to acceleration of the drone, that is, for each selected flight speed of the N selected flight speeds, controlling the drone to fly at the selected flight speed; controlling the unmanned aerial vehicle to accelerate during the flight at the selected flying speed; when the unmanned aerial vehicle accelerates, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle, and a second flight height is obtained through a barometer in the unmanned aerial vehicle; and obtaining an altitude compensation value corresponding to the selected flying speed according to the first flying altitude and the second flying altitude.

In some embodiments, the obtaining of the predetermined correspondence between the flying speed corresponding to the flying speed deceleration and the altitude compensation value may be performed in S301 to S303, and the specific implementation process is not described again. It should be noted that the above-mentioned change of the motion state in S302 refers to deceleration of the drone.

In other embodiments, the above S301 to S303 may be adopted to obtain the predetermined corresponding relationship between the flying speed and the altitude compensation value, and the specific implementation process is not described again. It should be noted that the above-mentioned change of the motion state in S302 refers to deceleration of the drone, that is, for each selected flight speed of the N selected flight speeds, controlling the drone to fly at the selected flight speed; controlling the drone to decelerate (e.g., brake) during the flight at the selected airspeed; when the unmanned aerial vehicle decelerates, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle, and a second flight height is obtained through a barometer in the unmanned aerial vehicle; and obtaining an altitude compensation value corresponding to the selected flying speed according to the first flying altitude and the second flying altitude.

Optionally, in the above S201, if the change of the motion state of the drone includes deceleration of the drone, the drone determines a flying height compensation value according to the flying speed of the drone and the correspondence between the predetermined flying speed and the flying height compensation value, and then compensates the flying height detected by the barometer according to the flying height compensation value and the flying height compensation coefficient corresponding to the deceleration. If the change of the motion state of the unmanned aerial vehicle comprises the acceleration of the unmanned aerial vehicle, the unmanned aerial vehicle determines a flight altitude compensation value according to the flight speed of the unmanned aerial vehicle and the corresponding relation between the same predetermined flight speed and the altitude compensation value, and then compensates the flight altitude detected by the barometer according to the flight altitude compensation value and the corresponding acceleration flight altitude compensation coefficient. For example, the fly-height compensation factor for deceleration is positive and the fly-height compensation factor for acceleration is negative.

In other embodiments, the above S301 to S303 may be adopted to obtain the predetermined corresponding relationship between the flying speed and the altitude compensation value, and the specific implementation process is not described again. It should be noted that the above-mentioned change of the motion state in S302 refers to acceleration of the drone.

Optionally, in the above S201, if the change of the motion state of the drone includes deceleration of the drone, the drone determines a flying height compensation value according to the flying speed of the drone and the correspondence between the predetermined flying speed and the flying height compensation value, and then compensates the flying height detected by the barometer according to the flying height compensation value and the flying height compensation coefficient corresponding to the deceleration. If the change of the motion state of the unmanned aerial vehicle comprises the acceleration of the unmanned aerial vehicle, the unmanned aerial vehicle determines a flight altitude compensation value according to the flight speed of the unmanned aerial vehicle and the corresponding relation between the same predetermined flight speed and the altitude compensation value, and then compensates the flight altitude detected by the barometer according to the flight altitude compensation value and the corresponding acceleration flight altitude compensation coefficient. For example, the fly-height compensation factor for deceleration is negative and the fly-height compensation factor for acceleration is positive.

The embodiment of the present invention further provides a computer storage medium, in which program instructions are stored, and when the program is executed, the program may include some or all of the steps of the height measurement compensation method for the barometer in the above embodiments.

Fig. 4 is a schematic structural diagram of an unmanned aerial vehicle according to an embodiment of the present invention, and as shown in fig. 4, the unmanned aerial vehicle 400 according to this embodiment may include: a barometer 401 and a processor 402. The barometer 401 is communicatively coupled to the processor 402 via a bus. The Processor 402 may be a Central Processing Unit (CPU), and the Processor 402 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

The barometer 401 is used for detecting the flying height of the unmanned aerial vehicle 400.

The processor 402 is configured to obtain the flight speed of the drone 400 when the motion state of the drone 400 changes; determining a flying height compensation value corresponding to the flying speed of the unmanned aerial vehicle 400 according to a predetermined corresponding relationship between the flying speed and the height compensation value; in the process of changing the motion state of the drone 400, the flying height detected by the barometer 401 is compensated according to the flying height compensation value.

Optionally, the processor 402 is further configured to:

before determining a flight altitude compensation value corresponding to the flight speed of the unmanned aerial vehicle 400 according to a predetermined correspondence between the flight speed and the altitude compensation value, selecting N selected flight speeds from the minimum flight speed to the maximum flight speed of the unmanned aerial vehicle 400, wherein N is an integer greater than 1;

for each of the N selected airspeeds, controlling the drone 400 to fly at the selected airspeed; controlling the drone 400 to change state of motion during flight at the selected airspeed; when the motion state of the unmanned aerial vehicle 400 changes, a first flight height is obtained through a height sensor carried by the unmanned aerial vehicle 400, and a second flight height is obtained through a barometer 401; obtaining an altitude compensation value corresponding to the selected flying speed according to the first flying altitude and the second flying altitude;

and obtaining the corresponding relation between the predetermined flying speed and the altitude compensation value according to the N selected flying speeds and the altitude compensation value corresponding to the N selected flying speeds.

Optionally, the processor 402 is specifically configured to: and fitting the N selected flight speeds and the altitude compensation values corresponding to the N selected flight speeds to obtain the corresponding relation between the predetermined flight speeds and the altitude compensation values.

Optionally, the processor 402 is specifically configured to: aiming at every two adjacent selected flight speeds in the N selected flight speeds, carrying out linear interpolation processing according to the two adjacent selected flight speeds and two altitude compensation values corresponding to the two adjacent selected flight speeds to obtain the corresponding relation between the two adjacent selected flight speeds and the altitude compensation values; and obtaining the predetermined corresponding relation between the flying speeds and the altitude compensation values according to the corresponding relation between every two adjacent selected flying speeds and the altitude compensation values in the N selected flying speeds.

Optionally, the processor 402 is specifically configured to: dividing the minimum flying speed to the maximum flying speed into N flying speed sections; and obtaining the N selected flight speeds by selecting one selected flight speed from each flight speed section.

Optionally, the predetermined correspondence between flying speed and altitude compensation value comprises: and under each preset flight direction in the four preset flight directions, the corresponding relation between the magnitude of the predetermined flight speed and the altitude compensation value is obtained. Wherein, four preset flight directions include aircraft nose place ahead, aircraft nose rear, aircraft nose left side, aircraft nose right side of unmanned aerial vehicle 400.

Optionally, the processor 402 is specifically configured to: in the process of changing the motion state of the unmanned aerial vehicle 400, the product of the flying height compensation value and the flying height compensation coefficient is superimposed on the flying height detected by the barometer 401, so as to obtain the compensated flying height.

Optionally, the processor 402 is specifically configured to: in the process of changing the motion state of the unmanned aerial vehicle 400, determining a flight altitude compensation coefficient according to the time length of the change of the motion state of the unmanned aerial vehicle 400; and superposing the product of the flying height compensation value and the flying height compensation coefficient to the flying height detected by the barometer 401 to obtain the compensated flying height.

Optionally, the processor 402 is specifically configured to:

in the process of the front section time of the change of the motion state of the unmanned aerial vehicle 400, the product of the first flying height compensation coefficient and the flying height compensation value is superposed on the flying height detected by the barometer 401 to obtain the compensated flying height;

during the later period of time when the motion state of the unmanned aerial vehicle 400 changes, superimposing the product of the second flying height compensation coefficient and the flying height compensation value on the flying height detected by the barometer 401 to obtain the compensated flying height;

wherein the first flying height compensation factor is different from the second flying height compensation factor.

Optionally, the flying speed comprises: the flying speed of the drone 400 before the change in motion state occurs.

Optionally, the flying speed further comprises: the flying speed of the drone 400 after the change in motion state.

Optionally, the flying speed comprises: the direction of the flight speed and the magnitude of the flight speed.

Optionally, the processor 402 is further configured to stop compensating for the flying height detected by the barometer 401 when the motion state of the drone 400 stops changing.

Optionally, the drone 400 of this embodiment may further include a memory (not shown in the figure), which is configured to store a code for executing the altitude measurement compensation method of the barometer, and when the code is called, the drone 400 is configured to implement the above solutions in this embodiment.

The unmanned aerial vehicle of the embodiment can be used for executing the technical scheme of the unmanned aerial vehicle in the above method embodiments of the present invention, and the implementation principle and the technical effect are similar, which are not described herein again.

Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:控制装置、移动体、控制方法以及程序

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类