A method, device and equipment for preventing geomagnetic interference of a UAV and a storage medium
By collecting data using UAV sensor components and using a magnetic field anomaly monitoring algorithm to determine geomagnetic interference, a course reset strategy is implemented, which solves the problem of course deviation and attitude instability caused by geomagnetic interference in complex environments, thereby improving flight stability and mission reliability.
Patent Information
- Application Number
- CN202511137383.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-08-14
AI Technical Summary
During flight, drones are subject to geomagnetic interference, which can cause heading deviations and attitude instability. Existing technologies are unable to effectively cope with dynamically changing magnetic field environments, affecting flight accuracy and safety.
Data is collected by the drone's sensor components, geomagnetic interference is detected using a magnetic field anomaly monitoring algorithm, and the flight state variables are intervened in the heading through a reset strategy to ensure that the drone escapes the interference.
It improves the flight stability and safety of UAVs in complex electromagnetic environments, reduces the probability of flight accidents caused by geomagnetic interference, and enhances mission reliability and safety.
Smart Images

Figure CN120742950B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicles, and in particular to a method and device for preventing geomagnetic interference of an unmanned aerial vehicle, an unmanned aerial vehicle, and a storage medium. BACKGROUND
[0002] With the wide application of unmanned aerial vehicle technology in many fields such as surveying, inspection, agriculture, and security, the industry has increasingly stringent requirements for the flight accuracy and attitude stability of unmanned aerial vehicles. Currently, most commercial and industrial unmanned aerial vehicles use a magnetic compass (geomagnetic sensor) as an important reference in the navigation and attitude sensing process, and cooperate with an inertial measurement unit (IMU) to achieve stable flight. However, in actual flight scenarios, geomagnetic interference problems occur frequently, which seriously affects the operation reliability and accuracy of unmanned aerial vehicles.
[0003] The sources of geomagnetic interference are extremely diverse, including fixed interference sources such as high-voltage transmission lines, large steel structures, and urban building groups, as well as dynamic interference sources such as vehicles, temporary metal obstacles, and other electronic devices. These interferences can cause abnormal readings of the geomagnetic sensor, and further cause problems such as heading deviation and flight control errors. In extreme cases, it can even cause attitude instability and loss of control of the unmanned aerial vehicle, posing a great safety hazard.
[0004] Currently, common countermeasures mainly include magnetic field calibration, installation of sensors away from interference sources, and use of magnetic interference filtering. However, these methods often rely on manual operation or require static environment support, and are difficult to adapt to dynamic changes in the magnetic field environment during flight, especially in urban or industrial environments, and their effectiveness is very limited. Therefore, the industry urgently needs a geomagnetic interference prevention method based on the sensing and response mechanism of the unmanned aerial vehicle itself to enhance the anti-interference ability and task reliability of the unmanned aerial vehicle system. SUMMARY
[0005] Embodiments of the present application provide a method, device, computer device, and storage medium for preventing geomagnetic interference of an unmanned aerial vehicle, aiming to overcome the problem of geomagnetic interference and improve the flight stability of the unmanned aerial vehicle.
[0006] In a first aspect, embodiments of the present application provide a method for preventing geomagnetic interference of an unmanned aerial vehicle, comprising:
[0007] acquiring sensor data through a sensor component configured on the unmanned aerial vehicle;
[0008] obtaining a flight state variable of the unmanned aerial vehicle according to the sensor data;
[0009] judging whether there is geomagnetic interference based on the flight state variable through a magnetic field anomaly monitoring algorithm;
[0010] If it is determined that there is geomagnetic interference, the flight state variable of the UAV is intervened in heading reset through a reset strategy, so that the UAV is separated from the geomagnetic interference.
[0011] In a second aspect, an embodiment of the present application provides a device for preventing geomagnetic interference of a UAV, comprising:
[0012] a data acquisition unit configured to acquire sensor data through a sensor component configured on the UAV;
[0013] a variable acquisition unit configured to acquire a flight state variable of the UAV according to the sensor data;
[0014] an interference judgment unit configured to judge whether there is geomagnetic interference based on the flight state variable through a magnetic field anomaly monitoring algorithm;
[0015] a reset intervention unit configured to, if it is determined that there is geomagnetic interference, intervene in heading reset of the flight state variable of the UAV through a reset strategy, so that the UAV is separated from the geomagnetic interference.
[0016] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for preventing geomagnetic interference of a UAV according to the first aspect when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executable on a processor to implement the method for preventing geomagnetic interference of a UAV according to the first aspect.
[0018] The embodiment of the present application provides a method, device, computer equipment and storage medium for preventing geomagnetic interference of a UAV, which comprises the following steps: collecting sensor data through a sensor component configured on the UAV; obtaining a flight state variable of the UAV according to the sensor data; determining whether there is geomagnetic interference based on the flight state variable through a magnetic field anomaly monitoring algorithm; and if it is determined that there is geomagnetic interference, performing heading reset intervention on the flight state variable of the UAV through a reset strategy, so that the UAV is separated from the geomagnetic interference. The embodiment of the present application collects data through the sensor component configured on the UAV, obtains a flight state variable according to the sensor data, then determines whether there is geomagnetic interference through a magnetic field anomaly monitoring algorithm, and if there is, performs heading reset intervention on the flight state variable through a reset strategy, so that the UAV is separated from the geomagnetic interference. In this way, the geomagnetic interference in the flight process of the UAV can be accurately identified, and when the interference is detected, the heading in the flight state variable of the UAV is timely and accurately reset intervened, so that the deviation caused by the geomagnetic interference on the heading of the UAV is effectively overcome, the stability of the flight direction of the UAV is greatly improved, the UAV can also maintain stable flight in various complex electromagnetic environments, the probability of flight accidents caused by geomagnetic interference is reduced, and the reliability and safety of the UAV in performing tasks are improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0020] Figure 1 A flowchart of a method for preventing geomagnetic interference of a UAV is provided for the embodiment of the present application.
[0021] Figure 2 A sub-flowchart of a method for preventing geomagnetic interference of a UAV is provided for the embodiment of the present application.
[0022] Figure 3 Another sub-flowchart of a method for preventing geomagnetic interference of a UAV is provided for the embodiment of the present application.
[0023] Figure 4 A schematic block diagram of a device for preventing geomagnetic interference of a UAV is provided for the embodiment of the present application.
[0024] Figure 5 A sub-schematic block diagram of a device for preventing geomagnetic interference of a UAV is provided for the embodiment of the present application.
[0025] Figure 6Another sub-schematic block diagram of the device for preventing geomagnetic interference of the unmanned aerial vehicle provided by the embodiment of the present application. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0027] It should be understood that, when used in the specification and the appended claims, the terms "comprise" and "include" indicate the presence of described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0028] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms, unless the context clearly indicates otherwise.
[0029] It should be further understood that the term "and / or" used in the specification and the appended claims of the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0030] Please see Figure 1 The method for preventing geomagnetic interference of the unmanned aerial vehicle provided by the embodiment of the present application specifically includes steps S101-S104.
[0031] Step S101, collecting sensor data by a sensor component configured by the unmanned aerial vehicle;
[0032] Step S102, obtaining a flight state variable of the unmanned aerial vehicle according to the sensor data;
[0033] Step S103, judging whether there is geomagnetic interference based on the flight state variable by a magnetic field anomaly monitoring algorithm;
[0034] Step S104, if it is determined that there is geomagnetic interference, performing heading reset intervention on the flight state variable of the unmanned aerial vehicle by a reset strategy, so that the unmanned aerial vehicle is separated from the geomagnetic interference.
[0035] The embodiment collects data by using the sensor assembly of the unmanned aerial vehicle, acquires flight state variables according to the sensor data, and then judges whether there is a geomagnetic interference by using a magnetic field anomaly monitoring algorithm. If there is, the flight state variables are reset and intervened in the heading direction, so that the unmanned aerial vehicle can get rid of the geomagnetic interference. In this way, the geomagnetic interference in the flight process of the unmanned aerial vehicle can be accurately identified, and when the interference is detected, the heading in the flight state variables of the unmanned aerial vehicle can be reset and intervened in a timely and accurate manner. Therefore, the deviation of the unmanned aerial vehicle caused by the geomagnetic interference can be effectively overcome, the stability of the flight direction of the unmanned aerial vehicle can be greatly improved, the unmanned aerial vehicle can maintain stable flight in various complex electromagnetic environments, the probability of flight accidents caused by geomagnetic interference can be reduced, and the reliability and safety of the unmanned aerial vehicle in performing tasks can be improved.
[0036] In an embodiment, the step S101 comprises:
[0037] Different dimensions of sensor data are collected by a plurality of different sensors; wherein the sensors include a position sensor, a geomagnetic sensor, a visual sensor, and a barometric pressure sensor;
[0038] The sensor data is health detected, and a health flag is set and a data reset recovery process is performed based on the result of the health detection.
[0039] The sensors described in the embodiment can be position sensors, geomagnetic sensors, visual sensors, barometric pressure sensors, and the like. Different dimensions of sensor data can be collected by these sensors, such as global positioning information obtained by GPS, heading reference obtained by a compass, visual inertial navigation obtained by a visual sensor (CAMERA), and relative height estimation without RTK (real-time dynamic differential positioning technology) precise positioning obtained by a barometer (BARO). In actual application, all kinds of sensor data are accessed to fusion at a fixed frequency to lay a foundation for subsequent state estimation. Of course, in other embodiments, more other types of sensors can be used to collect other dimensions of sensor data, so that the subsequent flight state variables can include more different types of sensor data.
[0040] At the same time, all sensor data are health monitored in real time. The monitoring content includes but is not limited to whether the sensor signal is missing, whether the data update frequency is abnormal, whether the value range is beyond the trusted limit, and the like. These monitoring results form a set of health flags (health flags) for subsequent use. Here, if an error occurs in a sensor, the sensor can be reset and recovered.
[0041] In an embodiment, the step S102 comprises:
[0042] select target sensor data of a corresponding dimension based on a health detection result of the sensor data;
[0043] perform fusion estimation on the target sensor data, and output a corresponding flight state variable based on a result of the fusion estimation.
[0044] The embodiment selects target sensor data suitable for the current environment according to the health state of the sensor, and then performs state estimation according to the target sensor data. For example, a built-in mode state machine can be used to automatically select a state estimation algorithm mode suitable for the current environment, such as a standard mode of GPS + Compass, a magnetic interference avoidance mode of GPS + CAMERA (magnetometer weight is turned off or weakened), a pure vision mode of only CAMERA + IMU, and a fault protection mode of entering a failsafe when the sensor is unavailable, and the like. At the same time, the state machine has a hysteresis mechanism, which can avoid frequent switching.
[0045] In actual application, an extended Kalman filter (EKF) or similar algorithm can be used to perform fusion estimation on the position, speed, and attitude of the unmanned aerial vehicle, and update the corresponding state variable (such as pose, yaw angle, etc.) according to different input sources, and the dimension and weight of the state space can also be adjusted according to the switched fusion mode.
[0046] In an embodiment, the step S103 comprises:
[0047] based on the flight state variable, performing magnetic interference judgment on a preset interference index according to a preset index threshold; wherein the interference index includes magnetic intensity, magnetic direction change, magnetic force data, and heading estimation change;
[0048] When the interference index exceeds the preset index threshold, it is determined that the current is in a magnetic interference state.
[0049] The embodiment compares the preset interference index with the index threshold based on the magnetic field anomaly monitoring algorithm, and if the interference index exceeds the preset index threshold, it is determined that there is magnetic interference. For example, the interference index specifically includes magnetic intensity, magnetic direction change, magnetic force data, and heading estimation change, etc., so when it is monitored that the magnetic intensity deviates significantly from the geomagnetic model, the magnetic direction changes sharply, the magnetic sensor and the IMU and the vision data output are seriously inconsistent, the heading estimation changes suddenly, etc., it can be determined that the current is in a magnetic interference state.
[0050] In an embodiment, as shown in Figure 2 The step S103 further comprises steps S201-S204.
[0051] Step S201, acquiring a theoretical geomagnetic field total intensity, and comparing the theoretical geomagnetic field total intensity with a preset intensity range;
[0052] Step S202, when the theoretical geomagnetic field total intensity is in a preset intensity range, acquiring measured magnetic field data of the body coordinate system, and performing normalization processing on the measured magnetic field data, and then converting to the North-East-Ground coordinate system;
[0053] Step S203, based on the North-East-Ground coordinate system, acquiring a difference value between the vertical component of the theoretical geomagnetic field total intensity and the vertical component of the measured magnetic field data;
[0054] Step S204, calculating a ratio of the difference value to the theoretical geomagnetic field total intensity, and determining that there is geomagnetic interference when the ratio reaches a preset threshold.
[0055] In addition to judging geomagnetic interference according to the interference index, the embodiment also compares the vertical component difference between the measured magnetic field and the geomagnetic model, and determines that there is geomagnetic interference when the difference exceeds the threshold. Specifically, assuming that geo_mag.F is the theoretical geomagnetic field total intensity, geo_mag.X, Y, Z are the three components of the theoretical geomagnetic field in the North-East-Ground coordinate system (NED coordinate system, which is a right-handed rectangular coordinate system with the origin north, east, and downward as the XYZ axes), and mag_body is the unmanned aerial vehicle magnetometer. First, real-time data is acquired, and if geo_mag.F is close to 0, it is considered that the geomagnetic model is not applicable to this place. If not, the original 3D data is normalized, the purpose of which is to unify the value of the measured magnetic field data to the theoretical geomagnetic field intensity and eliminate the influence of the magnetometer gain error, and also to unify the comparison reference. Here, the theoretical geomagnetic field total intensity geo_mag.F can be obtained according to the geomagnetic model, for example, the magnetic field at the current position is calculated according to the latitude and longitude, and common open-source geomagnetic models include IGRF, WMM, etc. The original 3D data is the data acquired by the magnetometer, and the magnetometer can acquire three-axis magnetic field, so it is called 3D data.
[0056] Then the measured magnetic field data in the body coordinate system is converted to the North-East-Ground coordinate system, which maintains the same coordinate system as the theoretical model, i.e. mag_body is changed to mag_ned. The vertical component difference between the theoretical geomagnetic field total intensity and the measured magnetic field data is compared, i.e. | mag_ned.z-geo_mag.Z |, and the absolute value is obtained as mag_diff. The reason for selecting the vertical component for comparison is: ① the vertical component is relatively stable and is not easily affected by horizontal magnetic interference; ② the anomaly of the vertical component usually indicates strong magnetic interference or magnetometer failure; ③ it can reduce the influence of the estimation error of the horizontal attitude on the detection. Finally, the degree of influence of the interference is obtained according to the ratio of mag_diff to geo_mag.F, for example, when the ratio reaches 30%, it can be considered that there is geomagnetic interference.
[0057] In an embodiment, as shown in FIG. 3, the step S104 comprises steps S301-S305. Figure 3
[0058] Step S301, constructing a zero yaw rotation matrix and obtaining a magnetic field vector in a body coordinate system;
[0059] This step keeps the attitude angle unchanged when constructing a rotation matrix for the yaw angle, and only resets the heading angle, thereby constructing a zero yaw rotation matrix. Specifically, it can be realized through a 321 Euler angle sequence:
[0060] R_321=R_z(ψ)×R_y(θ)×R_x(φ);
[0061] Here, the 321 sequence means rotating the Z axis first, then rotating the Y axis, and finally rotating the X axis. The 321 Euler angle=Yaw-Pitch-Roll (Z-Y-X) rotation sequence.
[0062] Step S302, converting the magnetic field vector in the body coordinate system into a magnetic field vector in the geographic coordinate system based on the zero yaw rotation matrix;
[0063] This step performs coordinate system conversion based on the zero yaw rotation matrix to obtain the magnetic field vector in the geographic coordinate system;
[0064] Step S303, obtaining a magnetic declination and calculating a new yaw angle in combination with the magnetic field vector in the geographic coordinate system;
[0065] This step specifically includes:
[0066] The new yaw angle yaw is calculated according to the following formula:
[0067] mag_earth = body2nav (roll, pitch, 0) × mag_body;
[0068] yaw = -atan (mag_earth_y, mag_earth_x) + magnetic_declination;
[0069] Wherein, mag_earth represents the magnetic field vector in the geographic coordinate system, mag_body represents the magnetic field vector in the body coordinate system, body2nav (roll, pitch, 0) represents a zero yaw rotation matrix that keeps the pitch and roll unchanged and the yaw angle is 0, magnetic_declination represents the magnetic declination, which is used to compensate for the deviation of magnetization and geographic north.
[0070] Step S304, reconstruct the zero yaw rotation matrix based on the new yaw angle, and reset the covariance matrix through the reconstructed rotation matrix;
[0071] This step realizes state updating and rotation matrix reconstruction, that is, according to the new yaw angle obtained in the last step, a new quaternion is obtained from the rotation matrix, and the forward and reverse transformation matrices are maintained. Then the covariance matrix is reset, because the heading reset is a discontinuous change, which violates the smooth evolution assumption, so it needs to be reset.
[0072] Here, the Euler angles, i.e. roll, pitch and yaw, can be extracted from the rotation matrix first, then the new yaw angle is replaced with the previous yaw angle, and a new rotation matrix is reconstructed, and then a new quaternion is obtained according to the rotation matrix. The inverse matrix is the transpose of the forward matrix. If the forward matrix is to convert the aircraft body data to geographic coordinates (NED), then the inverse matrix is to project the velocity or acceleration in the geographic coordinate system back to the aircraft body.
[0073] Step S305, heading reset intervention is performed on the flight state variables of the unmanned aerial vehicle through the reconstructed rotation matrix and the reset covariance matrix.
[0074] This step realizes the heading reset intervention on the unmanned aerial vehicle through the reconstructed rotation matrix and the reset covariance matrix.
[0075] Further, after the reset intervention, the magnetometer state is reinitialized:
[0076] mag_measured=mag_true+B_mag+n_mag;
[0077] Wherein, mag_measured is the calculated magnetic field, mag_true is the true magnetic field (sensor acquisition), B_mag is the magnetometer bias (reset to 0), and n_mag is the measurement noise.
[0078] At the same time, the state buffer is updated as the historical state for observation fusion.
[0079] In this embodiment, when the geomagnetic interference is detected, the "heading reset judgment logic" is entered to realize the heading reset intervention. In actual application, when the unmanned aerial vehicle takes off, the yaw angle is first calculated according to the roll, pitch and 3D original value of the magnetometer and other data of the initial state, and then when the unmanned aerial vehicle rises to a certain height, the yaw angle is reset to avoid geomagnetic interference, so as to ensure the flight stability of the unmanned aerial vehicle.
[0080] Preferably, when the heading is reset, a multi-level heading reset mechanism can be adopted, i.e. segmented reset in the take-off stage. For example, when the UAV is at a height of 1.5 m, the first reset is performed to leave the ground magnetic interference; when the UAV is at a height of 3.0 m, the second reset is performed to further leave the interference; when the UAV is at a height of 5.0 m, the third reset is performed to completely leave the ground interference, and the reference heading is saved.
[0081] In general, the method for preventing geomagnetic interference of the UAV provided by the embodiment has the following advantages:
[0082] (1) Improved anti-interference capability
[0083] When the geomagnetic interference, yaw drift or abnormal failure of the magnetometer occurs, the heading can still be dynamically corrected to avoid the "direction sense disorder" of the aircraft caused by the geomagnetic anomaly, and even fly out of the expected route;
[0084] (2) Ensure positioning and navigation accuracy
[0085] The heading angle is a key navigation parameter that affects path planning, speed control and position fusion. The embodiment can quickly restore the correct direction reference of the positioning fusion (such as EKF) by resetting the heading angle, thereby improving the overall state estimation accuracy.
[0086] (3) Maintain stable flight control attitude control
[0087] Heading errors can cause abnormal flight control matrix (such as horizontal control failure, misfiring yaw), and the embodiment can keep the closed-loop logic of the aircraft attitude control running effectively by resetting the heading.
[0088] (4) Extend the task reliability and fault tolerance
[0089] When encountering local sensor failure, poor magnetic environment (such as steel structure, electromagnetic source), the failsafe can be avoided, thereby improving the continuity of the task in complex scenarios, such as bridge inspection, urban low-altitude flight, etc.
[0090] (5) Seamless docking of flight control system
[0091] The heading reset can be used as an internal mechanism of the state estimation layer, and the upper flight control task and navigation algorithm do not need to be perceived. The reset process has little effect on trajectory smoothness, and the task is not interrupted.
[0092] Figure 4 A schematic block diagram of a device 400 for preventing geomagnetic interference of a UAV provided by the embodiment of the application is provided, and the device 400 comprises:
[0093] The data acquisition unit 401 is configured to acquire sensor data through the sensor components of the UAV.
[0094] The variable acquisition unit 402 is used to acquire the flight state variables of the UAV based on the sensor data;
[0095] Interference judgment unit 403 is used to determine whether geomagnetic interference exists based on the flight state variables and a magnetic field anomaly monitoring algorithm;
[0096] The reset intervention unit 404 is used to reset the flight state variables of the UAV by means of a reset strategy if geomagnetic interference is determined to exist, so as to enable the UAV to get rid of geomagnetic interference.
[0097] In one embodiment, the data acquisition unit 401 includes:
[0098] The dimension acquisition unit is used to acquire sensor data of different dimensions through multiple different sensors; wherein, the sensors include a position sensor, a geomagnetic sensor, a vision sensor, and a barometric pressure sensor;
[0099] The health detection unit is used to perform health detection on the sensor data, and set health flags and perform data reset and recovery processing based on the health detection results.
[0100] In one embodiment, the variable acquisition unit 402 includes:
[0101] The data selection unit is used to select target sensor data of the corresponding dimension based on the health detection results of the sensor data.
[0102] The variable output unit is used to perform fusion estimation on the target sensor data and output the corresponding flight state variables based on the fusion estimation results.
[0103] In one embodiment, the interference determination unit 403 includes:
[0104] The indicator judgment unit is used to judge the geomagnetic interference of preset interference indicators based on the flight state variables and according to preset indicator thresholds; wherein, the interference indicators include geomagnetic intensity, geomagnetic direction change, magnetic data and heading estimation change;
[0105] The first determination unit is used to determine that the current state is under geomagnetic interference when the interference index exceeds a preset index threshold.
[0106] In one embodiment, such as Figure 5 As shown, the interference determination unit 403 further includes:
[0107] The intensity comparison unit 501 is used to obtain the theoretical total intensity of the geomagnetic field and compare the theoretical total intensity of the geomagnetic field with a preset intensity range.
[0108] The coordinate transformation unit 502 is used to acquire the measured magnetic field data of the body coordinate system when the total intensity of the theoretical geomagnetic field is within a preset intensity range, and to normalize the measured magnetic field data and then transform it to the northeast coordinate system.
[0109] The difference calculation unit 503 is used to obtain the difference value between the vertical component of the theoretical total geomagnetic field intensity and the vertical component of the measured magnetic field data based on the northeast coordinate system.
[0110] The second determination unit 504 is used to calculate the ratio of the difference value to the theoretical total intensity of the geomagnetic field, and to determine that there is geomagnetic interference when the ratio reaches a preset threshold.
[0111] In one embodiment, such as Figure 6 As shown, the reset intervention unit 404 includes:
[0112] Matrix construction unit 601 is used to construct a zero-yaw rotation matrix and obtain the magnetic field vector in the body coordinate system;
[0113] The vector transformation unit 602 is used to convert the magnetic field vector in the body coordinate system into the magnetic field vector in the geographic coordinate system based on the zero yaw rotation matrix.
[0114] The first calculation unit 603 is used to obtain the magnetic declination and calculate the new yaw angle by combining it with the magnetic field vector in the geographic coordinate system.
[0115] The matrix reconstruction unit 604 is used to reconstruct the zero yaw rotation matrix based on the new yaw angle, and reset the covariance matrix through the reconstructed rotation matrix;
[0116] The variable reset unit 605 is used to perform heading reset intervention on the flight state variables of the UAV through the reconstructed rotation matrix and the reset covariance matrix.
[0117] In one embodiment, the first computing unit 603 includes:
[0118] The second calculation unit is used to calculate the new yaw angle according to the following formula:
[0119] mag_earth = body2nav (roll,pitch,0) × mag_body;
[0120] yaw = -atan (mag_earth_y, mag_earth_x) + magnetic_declination;
[0121] Wherein, mag_earth represents a magnetic field vector in a geographic coordinate system, mag_body represents a magnetic field vector in a body coordinate system, body2nav (roll, pitch, 0) represents a zero yaw rotation matrix that keeps the pitch and roll unchanged and the yaw angle is 0, and magnetic_declination represents a magnetic declination.
[0122] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and are not described here.
[0123] The embodiments of the present application also provide a computer readable storage medium, which has a computer program stored thereon, and the computer program can implement the steps provided by the above embodiments when executed. The storage medium can include a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium that can store program codes.
[0124] The embodiments of the present application also provide a computer device, which can include a memory and a processor, the memory has a computer program stored therein, and the processor can implement the steps provided by the above embodiments when calling the computer program in the memory. Of course, the computer device can also include various network interfaces, power supplies and other components.
[0125] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified, and these improvements and modifications also fall within the protection scope of the claims of the present application.
[0126] It is further noted that the terminology "first", "second" and the like used in the specification are merely used for differentiating one entity or action from another, and do not necessarily imply any actual physical or logical relationship or order between such entities or actions. Moreover, the use of the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements is not required to comprise only those elements but can include other elements not expressly listed or inherent to such process, method, article or apparatus. An element preceded by "comprises a..." does not, without further restriction, preclude the existence of additional elements of the same nature as those recited.
Claims
1. A method for preventing geomagnetic interference of a UAV, characterized in that, The method comprises: acquiring sensor data through a sensor component configured on the UAV; obtaining a flight state variable of the UAV according to the sensor data; judging whether there is geomagnetic interference based on the flight state variable through a magnetic field anomaly monitoring algorithm; if it is determined that there is geomagnetic interference, performing heading reset intervention on the flight state variable of the UAV through a reset strategy to make the UAV escape from the geomagnetic interference; if it is determined that there is geomagnetic interference, performing heading reset intervention on the flight state variable of the UAV through a reset strategy to make the UAV escape from the geomagnetic interference, comprising: constructing a zero yaw rotation matrix and obtaining a magnetic field vector in a body coordinate system; based on the zero yaw rotation matrix, converting the magnetic field vector in the body coordinate system into a magnetic field vector in a geographic coordinate system; obtaining a magnetic declination and calculating a new yaw angle in combination with the magnetic field vector in the geographic coordinate system; reconstructing the zero yaw rotation matrix based on the new yaw angle and resetting a covariance matrix through the reconstructed rotation matrix; performing heading reset intervention on the flight state variable of the UAV through the reconstructed rotation matrix and the reset covariance matrix; the obtaining a magnetic declination and calculating a new yaw angle in combination with the magnetic field vector in the geographic coordinate system, comprising: calculating the new yaw angle yaw according to the following formula: mag_earth = body2nav (roll, pitch, 0) × mag_body; yaw = -atan (mag_earth_y, mag_earth_x) + magnetic_declination; wherein mag_earth represents the magnetic field vector in the geographic coordinate system, mag_body represents the magnetic field vector in the body coordinate system, body2nav (roll, pitch, 0) represents a zero yaw rotation matrix that keeps the pitch and roll unchanged and the yaw angle is 0, and magnetic_declination represents the magnetic declination. 2.The method for preventing geomagnetic interference of the UAV according to claim 1, wherein, The method comprises: acquiring sensor data through a sensor component configured on the UAV; performing health detection on the sensor data and setting a health flag and performing data reset recovery processing based on the result of the health detection. 3.The method for preventing geomagnetic interference of the UAV of claim 2, wherein, The method comprises: based on the health detection result of the sensor data, selecting target sensor data of a corresponding dimension; performing fusion estimation on the target sensor data and outputting a corresponding flight state variable based on the result of the fusion estimation. 4.The method for preventing geomagnetic interference of the UAV according to claim 1, wherein, The method comprises: based on the flight state variable, performing geomagnetic interference judgment on a preset interference index according to a preset index threshold; wherein the interference index comprises geomagnetic intensity, geomagnetic direction change, magnetic force data and heading estimation change. When the interference index exceeds a preset index threshold, it is determined that the current is in a geomagnetic interference state. 5.The method for preventing geomagnetic interference of the UAV of claim 1, wherein, The method further includes: acquiring a theoretical geomagnetic field total intensity, and comparing the theoretical geomagnetic field total intensity with a preset intensity range; when the theoretical geomagnetic field total intensity is in the preset intensity range, acquiring measured magnetic field data of a body coordinate system, and performing normalization processing on the measured magnetic field data, and then converting to a north-east-ground coordinate system; based on the north-east-ground coordinate system, acquiring a difference value between a vertical component of the theoretical geomagnetic field total intensity and a vertical component of the measured magnetic field data; calculating a ratio of the difference value to the theoretical geomagnetic field total intensity, and determining that there is geomagnetic interference when the ratio reaches a preset threshold.
6. A device for preventing geomagnetic interference of a UAV, characterized in that, The method includes: a data acquisition unit configured to acquire sensor data through a sensor component of the UAV; a variable acquisition unit configured to acquire a flight state variable of the UAV according to the sensor data; an interference judgment unit configured to determine whether there is geomagnetic interference based on the flight state variable through a magnetic field anomaly monitoring algorithm; a reset intervention unit configured to, if it is determined that there is geomagnetic interference, perform heading reset intervention on the flight state variable of the UAV through a reset strategy, so that the UAV escapes from the geomagnetic interference; the reset intervention unit includes: a matrix construction unit configured to construct a zero yaw rotation matrix, and acquire a magnetic field vector in a body coordinate system; a vector conversion unit configured to convert the magnetic field vector in the body coordinate system into a magnetic field vector in a geographic coordinate system based on the zero yaw rotation matrix; a first calculation unit configured to acquire a magnetic declination, and calculate a new yaw angle in combination with the magnetic field vector in the geographic coordinate system; a matrix reconstruction unit configured to reconstruct the zero yaw rotation matrix based on the new yaw angle, and reset a covariance matrix through the reconstructed rotation matrix; a variable reset unit configured to perform heading reset intervention on the flight state variable of the UAV through the reconstructed rotation matrix and the reset covariance matrix; the first calculation unit includes: a second calculation unit configured to calculate the new yaw angle yaw according to the following formula: mag_earth = body2nav (roll, pitch, 0) × mag_body; yaw = -atan (mag_earth_y, mag_earth_x) + magnetic_declination; wherein mag_earth represents the magnetic field vector in the geographic coordinate system, mag_body represents the magnetic field vector in the body coordinate system, body2nav (roll, pitch, 0) represents a zero yaw rotation matrix that keeps the pitch and roll unchanged and the yaw angle is 0, and magnetic_declination represents the magnetic declination.
7. A computer device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for preventing geomagnetic interference of the unmanned aerial vehicle according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for preventing geomagnetic interference of the unmanned aerial vehicle according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for controlling unmanned plane to fly stably
CN105511484A
Aircraft attitude calibration method, aircraft, program product and medium
CN118500388A