A method for calibrating the attitude of an aircraft, an aircraft, a program product and a medium
Through the combination of extended Kalman filter estimation and pre-stored magnetic interference, the problem of UAV geomagnetic sensors affected by dynamic hard magnetic interference is solved, and accurate calibration of aircraft attitude data and flight safety are achieved.
Patent Information
- Application Number
- CN202410939875.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-15
AI Technical Summary
Geomagnetic sensors in UAVs are easily affected by dynamic hard magnetic interference, resulting in inaccurate attitude data and affecting the flight safety of the aircraft.
The extended Kalman filter (EKF) is used to estimate the first magnetic interference amount to calibrate the geomagnetic measurement data, and combine the pre-stored second magnetic interference amount for offline and online calibration to eliminate dynamic hard magnetic interference and ensure the accuracy of the aircraft attitude data.
Through the combination of online estimation and offline calibration, it can quickly converge and improve the accuracy of the flight attitude, avoid the "washing" phenomenon and flight safety risks, and provide strong attitude calibration guarantee.
Smart Images

Figure CN118500388B
Abstract
Description
Technical Field
[0001] The present application relates to the field of aircraft technology, and in particular to an aircraft attitude calibration method, an aircraft, a program product and a medium. Background Art
[0002] With the widespread use of drones, airborne small inertial navigation systems have gradually become a research hotspot. The inertial navigation system is mainly composed of a three-axis gyroscope, an accelerometer and a geomagnetic sensor. It is the main source of the drone's flight controller (also known as flight control) to obtain its own attitude information and a guarantee of stable flight. It is widely used in consumer and industrial drones. Among them, the geomagnetic sensor is used to measure the strength and direction of the magnetic field and provide absolute yaw information. Its accuracy determines the accuracy of the flight control attitude solution and directly affects the further position solution results. Therefore, it has an important impact on drone flight. However, the geomagnetic sensor is easily disturbed by the measurement environment, which makes it difficult to provide accurate attitude data to the flight control. This has become a technical problem that needs to be solved urgently in this field. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an attitude calibration method for an aircraft, an aircraft, a program product and a medium, so as to achieve the technical effect of providing accurate attitude information of the aircraft.
[0004] A first aspect of an embodiment of the present application provides a method for calibrating the attitude of an aircraft, wherein the aircraft is equipped with a geomagnetic sensor; the method comprises:
[0005] Acquire geomagnetic measurement data collected by the geomagnetic sensor at the current moment;
[0006] Acquire a first state estimated based on an extended Kalman filter (EKF) at the current moment; the first state includes attitude data and a first magnetic interference amount;
[0007] Calibrate the geomagnetic measurement data based on the first magnetic interference amount to obtain geomagnetic calibration data;
[0008] Based on the attitude data and the geomagnetic calibration data, the flight attitude of the aircraft at the current moment is determined.
[0009] In the above implementation process, the first magnetic interference amount estimated based on EKF changes with time, which can reflect the dynamic hard magnetic interference. Calibration of geomagnetic measurement data using the first magnetic interference amount estimated online can eliminate the influence of dynamic hard magnetic interference on geomagnetic sensors. Therefore, the flight attitude determined based on the estimated attitude information and geomagnetic measurement data is accurate, thereby providing accurate attitude information to the flight control.
[0010] Furthermore, the aircraft pre-stores a second magnetic interference amount, and the second magnetic interference amount is determined by a preset calibration movement; and the geomagnetic measurement data is calibrated based on the second magnetic interference amount.
[0011] In the above implementation process, the geomagnetic sensor is calibrated offline and online using the pre-stored second magnetic interference amount and the online estimated first magnetic interference amount. This helps to quickly converge the online calibration and further improve the accuracy of the flight attitude.
[0012] Furthermore, the aircraft is also equipped with an acceleration sensor, and the aircraft pre-stores a prediction equation based on EKF, an acceleration update equation, and a geomagnetic update equation; the obtaining of the first state estimated based on the extended Kalman filter EKF at the current moment includes:
[0013] Acquire acceleration measurement data collected by the acceleration sensor at the current moment;
[0014] estimating a second state at a current moment based on the acceleration measurement data, the prediction equation and the acceleration update equation;
[0015] The second state is calibrated based on the geomagnetic measurement data and the geomagnetic update equation to obtain the first state.
[0016] In the above implementation process, the estimation of the first state based on the prediction equation, the acceleration update equation and the geomagnetic update equation is completed.
[0017] Furthermore, the aircraft is also equipped with a gyroscope; the prediction equation, the acceleration update equation and the geomagnetic update equation are pre-established by the following steps:
[0018] Establishing a state equation for characterizing the change of state quantity over time; wherein the state quantity includes: attitude data, gyroscope zero bias, geomagnetic data of the reference coordinate system, and magnetic interference quantity with the body coordinate system;
[0019] Establishing an acceleration measurement equation and a geomagnetic measurement equation; wherein the acceleration measurement equation is used to characterize the change of the acceleration observation quantity of the body coordinate system with the state quantity; the geomagnetic measurement equation is used to characterize the change of the geomagnetic observation quantity of the body coordinate system with the state quantity;
[0020] Based on the state equation, the acceleration measurement equation and the geomagnetic measurement equation, the prediction equation, the acceleration update equation and the geomagnetic update equation are established.
[0021] In the above implementation process, the prediction equation, acceleration update equation and geomagnetic update equation are established based on the acceleration measurement equation and the geomagnetic measurement equation.
[0022] Further, determining the flight attitude of the aircraft at the current moment based on the attitude data and the geomagnetic calibration data includes:
[0023] Determining a roll angle and a pitch angle of the aircraft based on the attitude data;
[0024] A heading angle of the aircraft is determined based on the calibration data.
[0025] In the above implementation process, the first state estimated by EKF is used to eliminate the influence of dynamic hard magnetic interference on the geomagnetic sensor, so as to provide the accurate flight attitude of the aircraft at every moment.
[0026] Furthermore, the method further comprises:
[0027] Determining a target attitude quaternion based on the roll angle, the pitch angle, and the heading angle;
[0028] The position and attitude of the aircraft is controlled based on the target attitude quaternion.
[0029] In the above implementation process, the position and attitude of the aircraft are controlled by converting the Euler angles into the target attitude quaternion, thereby ensuring the flight safety of the aircraft and avoiding the "pan-brushing" phenomenon or even the occurrence of aircraft explosion.
[0030] Furthermore, the method further comprises:
[0031] When the first magnetic interference amount is greater than a preset threshold, outputting a magnetic interference calibration prompt to the user;
[0032] During the process of the aircraft performing a preset calibration movement, the first magnetic interference amount when the calibration end condition is met is stored as the second magnetic interference amount.
[0033] In the above implementation process, two methods, offline calibration and online calibration, are provided to ensure the high accuracy of the flight attitude and provide a strong and effective guarantee for flight safety.
[0034] A second aspect of an embodiment of the present application provides an aircraft, including:
[0035] A geomagnetic sensor for collecting geomagnetic measurement data;
[0036] processor;
[0037] a memory for storing processor-executable instructions;
[0038] Wherein, when the processor calls the executable instruction, it implements the operation of any method described in the first aspect.
[0039] A third aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.
[0040] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of any method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] FIG. 1( a ) is a graph showing a change trend of magnetic induction intensity calculated based on actual measurement output of a geomagnetic sensor provided in an embodiment of the present application;
[0043] FIG1( b ) is a graph showing a change trend of magnetic induction intensity calculated based on calibrated magnetic field data provided in an embodiment of the present application;
[0044] Figure 2 A change trend diagram of the heading angle calculated based on the calibrated magnetic field data provided in an embodiment of the present application;
[0045] Figure 3 A graph showing the change trend of the motor speed percentage and the magnetic induction intensity before calibration provided in an embodiment of the present application;
[0046] Figure 4 A comparison diagram of the magnetic induction intensity before and after calibration when installing a motor provided in an embodiment of the present application;
[0047] Figure 5 A comparison chart of the magnetic induction intensity before and after calibration when installing a megaphone provided in an embodiment of the present application;
[0048] Figure 6 A schematic diagram of a flow chart of an attitude calibration method for an aircraft provided in an embodiment of the present application;
[0049] Figure 7 A graph showing a change trend of the magnetic interference amount of the machine body coordinate system estimated based on EKF when installing a motor provided in an embodiment of the present application;
[0050] Figure 8 A graph showing a trend of gyroscope bias changes based on EKF estimation when installing a motor according to an embodiment of the present application;
[0051] Fig. 9 A comparison diagram of geomagnetic measurement data and magnetic induction intensity after calibration by two calibration methods when installing a motor provided in an embodiment of the present application;
[0052] Fig.10 A comparison diagram of the heading angles after calibration by two calibration methods when installing a motor provided in an embodiment of the present application;
[0053] Fig.11 A comparison chart of the magnetic induction intensity before and after calibration when installing a megaphone provided in an embodiment of the present application;
[0054] Fig.12 A graph showing a trend of changes in the amount of magnetic interference in the body coordinate system estimated based on EKF when a megaphone is installed according to an embodiment of the present application;
[0055] Fig.13 A graph showing a trend of the heading angle of the aircraft coordinate system estimated based on EKF when a megaphone is installed according to an embodiment of the present application;
[0056] Fig.14 A hardware structure diagram of an aircraft provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0058] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0059] Flight vehicles, including various devices with flight functions, such as drones, airplanes, and aircraft, are usually equipped with geomagnetic sensors to measure the strength and direction of the magnetic field. The earth's magnetic field strength is about 400mGs~650mGs, which is a weak magnetic field, and the measured value is easily interfered by the measurement environment. Aircraft, especially small drones, use highly integrated hardware circuits and structural design solutions, and their complex electrical environment can easily interfere with geomagnetic sensors. Under an ideal magnetic field environment, the three-axis geomagnetism measured by the rotating geomagnetic sensor at the same location is distributed on a spherical surface with the origin as the center and the geomagnetic strength of the point as the radius. However, soft magnetic interference and hard magnetic interference will cause the measured spherical model to deform into an ellipsoid.
[0060] In related technologies, the ellipsoidal surface parameters are generally fitted by least squares to calibrate the ellipsoidal surface to a spherical surface with the center at the origin, and the soft magnetic interference calibration parameters and hard magnetic interference parameters of the geomagnetic sensor can be further derived. However, this calibration method generally requires rotating the three coordinate axes of the drone in sequence, and the calibration process is time-consuming and laborious.
[0061] In addition, a combination of geomagnetic sensors, GPS (Global Positioning System) and IMU (Inertial Measurement Unit) can be used for calibration. However, GPS signals are easily blocked, which may lead to calibration failure.
[0062] In addition, the geomagnetic sensor is generally calibrated with soft magnetic interference calibration parameters K and hard magnetic interference calibration parameters B for calibration before leaving the factory. Among them, the soft magnetic interference calibration parameter K is mainly formed by the non-orthogonality of the coordinate axes of the geomagnetic sensor itself and the scale factor error. The hard magnetic interference calibration parameter B is mainly formed by the external environment, such as permanent magnets, high-power current-carrying wires, motors, iron, steel, nickel, cobalt and other ferromagnetic materials. Specifically, the actual measurement output of the three-axis geomagnetic sensor is After calibration of the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B, the ideal geomagnetic field vector can be obtained. , also called calibrated magnetic field data m.
[0063] The heading angle ψ of the drone can be calculated using the calibrated magnetic field data m, as shown in Formula 1:
[0064] Formula 1
[0065] Among them, ψ a is the local magnetic declination, which can be obtained in real time by establishing a global geomagnetic model. It can be seen that the main factor affecting the heading angle ψ of the drone is m x and m y proportional relationship.
[0066] Since the soft magnetic interference of the magnetic compass itself and the fixed hard magnetic interference (magnets and ferromagnetic materials) on the aircraft can be removed through factory calibration, the soft magnetic interference calibration parameter K generally does not change easily. However, in addition to the fixed hard magnetic interference, there are many hard magnetic interferences that change in real time on the aircraft. For example, on the one hand, the batteries and motors on the aircraft will produce real-time changing hard magnetic interference. On the other hand, since the aircraft is always in dynamic flight, all hard magnetic interferences in the environment outside the aircraft are changing in real time. These dynamic hard magnetic interference problems cannot be eliminated through the above calibration.
[0067] If a geomagnetic sensor is used alone as a heading sensor for an aircraft, it is necessary to install the geomagnetic sensor away from the motor and battery. However, for small aircraft, such as small drones with a wheelbase of less than 50 cm, the installation location is limited. The batteries and motors on the drone can easily cause the aircraft to be unable to fly in a straight line. In order to better understand the original intention of the invention of this application, the following uses a drone as an example to analyze the impact of dynamic magnetic interference on the geomagnetic sensor from three perspectives: battery, motor and loudspeaker.
[0068] 1) Analysis of the impact of batteries on geomagnetic sensors
[0069] Place the drone horizontally and load 9 batteries into the drone one by one for data collection. Each time the data is collected, it is fixed in the same position and the nose is facing the same direction. Each set of experiments records the actual measurement output m0 of the geomagnetic sensor, the magnetic field data m and the heading angle ψ after calibration based on the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B. The following three sets of comparative experiments are designed:
[0070] ① The drone is not equipped with a battery. The flight control mainboard is powered by a USB cable. A geomagnetic sensor calibration is performed and the first set of experimental data test1 is recorded.
[0071] ② Install the battery in the drone, but do not turn on the battery power supply. Use the USB cable to power the flight control mainboard and record the second set of experimental data test2;
[0072] ③Turn on the battery power supply of the drone and record the third set of experimental data test3.
[0073] The corresponding magnetic induction intensity r0 is calculated using the actual measured output m0 of the geomagnetic sensor. For the specific calculation process, please refer to the relevant calculation.
[0074] Collect a stable period of data and calculate the average value of magnetic induction intensity and standard deviation σ. The statistical results are shown in Table 1. In addition, Figure 1 (a) shows the magnetic induction intensity r0 calculated based on the actual measurement output m0 of the geomagnetic sensor (hereinafter referred to as the magnetic induction intensity before calibration), and Figure 1 (b) shows the magnetic induction intensity r calculated based on the calibrated magnetic field data m (hereinafter referred to as the magnetic induction intensity after calibration). Figure 2 The heading angle ψ calculated based on the calibrated magnetic field data m is shown.
[0075] Table 1
[0076]
[0077] From Table 1, Figure 1(a), Figure 1(b) and Figure 2It can be seen that the battery has already produced obvious magnetic interference to the geomagnetic sensor when it is not powered. This is because the battery core materials in the battery include cobalt and nickel, and the battery shell is made of steel. These materials are ferromagnetic materials that cause hard magnetic interference to the geomagnetic sensor. In addition, the magnetic interference after the battery is powered does not change significantly. This is because the drone is not unlocked and the battery power supply is relatively stable at this time. By comparing Figure 1 (a) with Figure 1 (b), it can be seen that the calibration of the geomagnetic sensor based on the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B cannot solve the real-time interference of the battery to the geomagnetic sensor. In addition, by comparing the mean square error of the magnetic induction intensity r0 before calibration, it is further explained that the magnetic interference after the battery is powered will cause the data fluctuation to increase significantly.
[0078] 2) Analysis of the impact of motor on geomagnetic sensor
[0079] First, calibrate the drone's geomagnetic sensor, then fix it on the stand and power it, and test the propeller push and pull throttle. Figure 3 The figure shows the change trend of the motor speed percentage and the magnetic induction intensity r0 before calibration over time. It can be seen that the trend of the motor speed and the magnetic induction intensity r0 before calibration over time is consistent and has a strong correlation. In addition, from Figure 4 The magnetic induction intensity r0 before calibration and the magnetic induction intensity r after calibration show that the calibration of the geomagnetic sensor based on the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B cannot solve the real-time interference of the motor to the geomagnetic sensor.
[0080] 3) Analysis of the impact of the megaphone on the geomagnetic sensor
[0081] When the drone is not equipped with a megaphone, the geomagnetic sensor is calibrated once. The calibration parameters ignore soft magnetic interference, and hard magnetic interference B=[80.994 -247.484 52.096] T After installing the megaphone, perform another calibration on the geomagnetic sensor. Among them, hard magnetic interference B = [933.069 -192.619 363.909] T It can be seen that the magnet on the megaphone caused great interference to the geomagnetic sensor.
[0082] also, Figure 5 The figure shows the magnetic induction intensity r0 before calibration after the installation of the megaphone, and the magnetic induction intensity r after calibration. It can be seen that the megaphone will cause the measurement data collected by the geomagnetic sensor to fluctuate greatly and the noise will increase significantly. This will cause the drone to "scrub" after takeoff, or even explode. The huge noise will also prevent the drone from flying in a straight line.
[0083] Through the above analysis of the impact of dynamic magnetic interference on the geomagnetic sensor from the three perspectives of battery, motor and loudspeaker, it can be seen that the calibration of the geomagnetic sensor based on the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B cannot solve the problem of dynamic hard magnetic interference. The measurement data of the geomagnetic sensor has an important impact on the flight of the aircraft. If the geomagnetic sensor is difficult to provide accurate attitude data to the flight control, it will seriously affect the flight safety of the aircraft. Therefore, how to solve the impact of dynamic hard magnetic interference on the geomagnetic sensor is a technical problem that needs to be solved urgently in this field.
[0084] To this end, the present application provides an attitude calibration method for an aircraft, which is applied to an aircraft, for example, in the flight control of an aircraft. The aircraft is equipped with an inertial navigation system, which includes a gyroscope, an acceleration sensor, and a geomagnetic sensor. The acceleration sensor is, for example, an accelerometer, and the geomagnetic sensor is, for example, an electronic magnetic compass. Figure 6 As shown, the posture calibration method includes steps S1 to S4.
[0085] Step S1: Acquire geomagnetic measurement data collected by the geomagnetic sensor at the current moment;
[0086] For example, it can be recorded that at the current time k, the geomagnetic measurement data collected by the geomagnetic sensor is .
[0087] Step S2: obtaining a first state estimated based on an extended Kalman filter (EKF) at the current moment; wherein the first state includes posture data and a first magnetic interference amount.
[0088] For example, the first state estimated based on EKF will change over time, so the first state at the current time k can be recorded as The first state Based on geomagnetic data Estimated.
[0089] The first state The method comprises attitude data and a first magnetic interference amount. The attitude data is used to characterize the attitude. For example, the attitude data may be an attitude quaternion and / or an Euler angle. The attitude includes a pitch angle, a roll angle, and a yaw angle.
[0090] For example, the first magnetic interference amount may be a zero bias of a geomagnetic sensor in a body coordinate system. changes with time, so the first magnetic interference amount also changes with time. Then the first magnetic interference amount can also be called online magnetic interference amount. For example, the first magnetic interference amount at the current time k can be recorded as .
[0091] Step S3: calibrating the geomagnetic measurement data based on the first magnetic interference amount to obtain geomagnetic calibration data.
[0092] For example, the geomagnetic measurement data Subtract the first magnetic interference , and obtain the geomagnetic calibration data.
[0093] Step S4: Determine the flight attitude of the aircraft at the current moment based on the attitude data and the geomagnetic calibration data.
[0094] Finally, the flight attitude of the aircraft at the current time k can be determined using the attitude data estimated based on EKF and the geomagnetic calibration data.
[0095] It can be seen that in an attitude calibration method for an aircraft provided in the present application, the first magnetic interference amount estimated based on EKF changes over time, which can reflect the dynamic hard magnetic interference. Calibration of geomagnetic measurement data using the first magnetic interference amount estimated online can eliminate the influence of dynamic hard magnetic interference on the geomagnetic sensor. Therefore, the flight attitude determined based on the estimated attitude information and the geomagnetic measurement data is accurate, thereby providing accurate attitude information to the flight control.
[0096] In addition, the present application also quantifies the dynamic hard magnetic interference, so that corresponding reminder processing can be performed based on the quantified hard magnetic interference.
[0097] The following is a detailed description of steps S1 to S4.
[0098] In some embodiments, the aircraft is pre-stored with a second magnetic interference amount. For example, the second magnetic interference amount can be pre-stored in a non-volatile memory of the flight control motherboard, such as an EEPROM (Electrically Erasable Programmable ReadOnly Memory), or pre-stored in a chip built-in Flash. Since the second magnetic interference amount is a preset value, the second magnetic interference amount can also be called an offline magnetic interference amount, denoted as m bias The second magnetic interference quantity m bias It is determined by a preset calibration movement. That is, after the aircraft performs a preset calibration movement, an offline second magnetic interference amount can be determined and stored in the aircraft. The specific calibration movement will be described below.
[0099] Based on this, the geomagnetic measurement data collected by the geomagnetic sensor , is based on the second magnetic interference quantity m biasCalibrated. That is, in step S1, the geomagnetic sensor can obtain the original measurement data during the acquisition. Then, the pre-stored second magnetic interference amount m bias The original measurement data is calibrated offline, and the result is used as the geomagnetic measurement data output by the geomagnetic sensor. Then use the first magnetic interference value estimated in step S2 Geomagnetic measurement data Perform online calibration to obtain geomagnetic calibration data.
[0100] It can be seen that this embodiment uses the pre-stored second magnetic interference amount and the online estimated first magnetic interference amount to perform offline calibration and online calibration on the geomagnetic sensor in succession, which on the one hand helps to quickly converge the online calibration, and on the other hand can further improve the accuracy of the flight attitude.
[0101] The process of estimating the first state based on EKF is described in detail below.
[0102] In order to better understand the present application, the design idea of the EKF-based magnetic interference estimation algorithm is first introduced.
[0103] 1) Selection of state quantities and observation quantities
[0104] The general description of the discretized EKF state equation is shown in Equation 2:
[0105] , Formula 2
[0106] The general description of the discretized EKF measurement equation is shown in Equation 3:
[0107] , Formula 3
[0108] Among them, x k represents the state quantity at time k; z k represents the observed value at time k; u k-1 represents the input at time k-1; w k-1 represents process noise and follows a Gaussian distribution with a mean of 0 and a variance of Q; v k Represents measurement noise and follows a Gaussian distribution with a mean of 0 and a variance of R.
[0109] Selection of state quantity:
[0110] ① Since attitude quaternion does not have the gimbal lock problem of Euler angle, attitude quaternion is selected as one of the state quantities of attitude solution.
[0111] ②Miniature Inertial Measurement Unit (MIMU) is an important MEMS micro-electro-mechanical system (MEMS). As a low-cost sensor, MIMU is widely used in the small civil drone industry. MIMU integrates a micro gyroscope and a micro accelerometer. With the continuous advancement of technology, the accuracy is gradually improved, but the gyroscope zero drift problem still exists, especially in the highly integrated on-board IMU, the zero drift caused by the surrounding circuit temperature is more obvious. The zero drift noise of the gyroscope does not conform to the Gaussian distribution, so the gyroscope zero bias is selected as one of the state quantities.
[0112] ③ Selecting geomagnetic data of a reference coordinate system as one of the state quantities. The reference coordinate system may include but is not limited to a North East Down (NED) coordinate system, etc.
[0113] ④ Since the zero bias of the geomagnetic sensor of the body coordinate system does not conform to the Gaussian distribution, the zero bias of the geomagnetic sensor of the body coordinate system is selected as one of the state quantities, that is, the magnetic interference quantity of the body coordinate system.
[0114] In summary, the selected state quantity is shown in Formula 4:
[0115] Formula 4
[0116] in, Represents the attitude quaternion at time k; represents the gyroscope zero bias at time k; Represents the geomagnetic data of the reference coordinate system at time k; Represents the magnetic interference amount of the body coordinate system at time k.
[0117] Selection of observations:
[0118] ① Since there is a serious cumulative error in the attitude estimation using a simple gyroscope, the acceleration sensor is selected as the observation quantity, that is, the acceleration observation quantity of the body coordinate system.
[0119] ② Select the geomagnetic sensor as the observation quantity, that is, the geomagnetic observation quantity of the body coordinate system.
[0120] In summary, the selected observations are shown in Formula 5:
[0121] Formula 5
[0122] in, represents the observed acceleration of the body coordinate system at time k; Represents the geomagnetic observation of the body coordinate system at time k.
[0123] 2) Determination of the initial value of the state quantity
[0124] Based on the initial acceleration measurement data collected by the acceleration sensor, the initial geomagnetic measurement data collected by the geomagnetic sensor, and the preset first coordinate transformation relationship, the initial value of the state quantity can be determined. The first coordinate transformation relationship is a transformation relationship from the body coordinate system to the reference coordinate system.
[0125] Initial acceleration measurement data refers to the acceleration measurement data collected by the acceleration sensor at the initial moment, denoted as a body0 The initial geomagnetic measurement data refers to the geomagnetic measurement data collected by the geomagnetic sensor at the initial time, denoted as m body0 Taking the NED coordinate system as the reference coordinate system as an example, the first coordinate transformation relationship can be expressed as .
[0126] For example, ① based on the initial acceleration measurement data a body0 Determine the initial attitude quaternion q0. ② Based on the initial geomagnetic measurement data m body0 , and the first coordinate transformation relationship Determine the initial geomagnetic data of the reference coordinate system . And the initial gyro bias can be determined Initial magnetic interference with the body coordinate system is zero.
[0127] Specifically, ① based on the initial acceleration measurement data a body0 Determine the initial attitude quaternion q0, including: based on the initial acceleration measurement data a body0 Determine the initial roll angle ϕ0 and the initial pitch angle θ0; based on the initial roll angle ϕ0 and the initial pitch angle θ0, determine the initial geomagnetic data The component in the x direction and the component in the y direction ; Based on the weight With the amount Determine an initial heading angle ψ0; convert the initial Euler angle into an initial attitude quaternion q0, where the initial Euler angle includes an initial roll angle φ0, an initial pitch angle θ0, and an initial heading angle ψ0.
[0128] Among them, the conversion relationship between acceleration measurement data and Euler angles, the conversion relationship between Euler angles and geomagnetic data, and the conversion relationship between Euler angles and attitude quaternions can be found in the relevant technology, which will not be expanded in this application.
[0129] ② Based on the initial geomagnetic measurement data m body0 , and the first coordinate transformation relationship Determine the initial geomagnetic data of the reference coordinate system , including: using the first coordinate transformation relationship The initial geomagnetic measurement data m body0 Initial geomagnetic data converted to the reference coordinate system .
[0130] For the specific conversion process, please refer to the related art. First coordinate conversion relationship Based on the attitude quaternion q k Get the first coordinate transformation relationship and the attitude quaternion q k For the relationship between them, please refer to the related art.
[0131] 3) Determination of process noise and measurement noise
[0132] Assuming that the noise of each axis is independent of each other, define w q is the noise of the attitude quaternion, is the noise of the gyroscope zero bias, is the noise of the geomagnetic data in the reference coordinate system, is the noise of magnetic interference in the body coordinate system, v a is the measurement noise of the acceleration sensor, v m is the measurement noise of the geomagnetic sensor. From this, the process noise matrix Q as shown in Formula 6 and the measurement noise matrix R as shown in Formula 7 can be determined.
[0133] Formula 6
[0134] Formula 7
[0135] 4) Establishment of the equation of state
[0136] ① Discrete attitude quaternion q k The update formula is shown in Formula 8:
[0137] Formula 8
[0138] in, is the attitude quaternion state transfer matrix, T represents the update cycle, Represents gyroscope measurements. As shown in Formula 9:
[0139] Formula 9
[0140] ② Gyro bias The update formula is shown in Formula 10:
[0141] Formula 10
[0142] ③ Geomagnetic data of reference coordinate system The update formula is shown in Formula 11:
[0143] Formula 11
[0144] ④Magnetic interference of the body coordinate system The update formula is shown in Formula 12:
[0145] Formula 12
[0146] In summary, without considering the input, the final state equation is shown in formula 13:
[0147] Formula 13
[0148] Among them, F k is the state transfer matrix at time k, the state transfer matrix F k In is a zero matrix, and the state transfer matrix F k In is the unit matrix. The state equation is used to characterize the state quantity x k Changes over time.
[0149] 5) Establishment of measurement equation
[0150] ① Acceleration measurement equation
[0151] The acceleration measurement equation is used to characterize the acceleration observed in the body coordinate system. With state quantity changes.
[0152] Considering that the acceleration sensor not only measures gravity acceleration, but also motion acceleration, in order to improve accuracy, motion acceleration can be compensated by other sensors. In this way, the acceleration measurement equation is shown in Formula 14-Formula 15:
[0153] Formula 14
[0154] Formula 15
[0155] ② Geomagnetic measurement equation
[0156] The geomagnetic measurement equation is used to characterize the geomagnetic observation quantity m in the body coordinate system. bodyk With state quantity changes.
[0157] Taking the NED coordinate system as the reference coordinate system as an example, the geomagnetic measurement equation can be shown as Formula 16-Formula 17:
[0158] Formula 16
[0159] Formula 17
[0160] in, It is the transformation relationship from the reference coordinate system to the body coordinate system, which can also be called the second coordinate transformation relationship. and They are transposed matrices of each other, that is, the first coordinate transformation relationship and the second coordinate transformation relationship are transposed matrices of each other.
[0161] 6) Establish prediction equations, acceleration update equations and geomagnetic update equations based on EKF
[0162] After establishing the state equation as shown in Formula 13, the acceleration measurement equation as shown in Formula 14-15, and the geomagnetic measurement equation as shown in Formula 16-17, the prediction equation, the acceleration update equation and the geomagnetic update equation can be established based on these three equations. The specific process is as follows:
[0163] As the state equation of formula 13, the state quantity The partial derivative A k As shown in formula 18:
[0164] Formula 18
[0165] in, is the attitude quaternion q k About Gyro Bias The state transfer matrix is as shown in formula 19:
[0166] Formula 19
[0167] The acceleration measurement equations shown in Formula 14-15 are used for the state quantity The partial derivative of As shown in formula 20:
[0168] Formula 20
[0169] in, is the observed acceleration in the body coordinate system Relative to the attitude quaternion q k The observation state transfer matrix is as shown in formula 21:
[0170] Formula 21
[0171] For example, the geomagnetic measurement equations of formula 16-formula 17 are used to calculate the state quantity The partial derivative of As shown in Formula 22:
[0172] Formula 22
[0173] in, The geomagnetic observation quantity of the body coordinate system Relative to the attitude quaternion q k The observation state transfer matrix is as shown in Formula 23:
[0174] Formula 23
[0175] The geomagnetic observation quantity of the body coordinate system Geomagnetic data relative to a reference coordinate system The observation state transfer matrix is equal to the second coordinate transformation relationship .
[0176] Based on this, the prediction equation can be determined as shown in Formula 24:
[0177] Formula 24
[0178] in, Represents the estimated value of the state from time k-1 to time k; represents the estimated value of the state at time k-1; F k-1 Represents the state transfer matrix at time k-1; represents the state covariance from time k-1 to time k; P k-1 Represents the state covariance at time k-1; the state equation for the state quantity The partial derivative A k-1 As shown in formula 18; Q k-1 is the process noise matrix.
[0179] In addition, the acceleration update equation can be determined as shown in Formula 25:
[0180] Formula 25
[0181] Among them, K k Represents the Kalman gain at time k; the acceleration measurement equation for the state quantity The partial derivative of As shown in formula 20; R a represents the acceleration measurement noise; is the estimated value of the state at time k, i.e., the second state below; is the state covariance corresponding to the second state; Represents the acceleration measurement data collected by the acceleration sensor at time k; the acceleration observation in the body coordinate system Relative to the attitude quaternion q k The observed state transfer matrix As shown in Formula 21.
[0182] In addition, the geomagnetic update equation can be determined as shown in formula 26:
[0183] Formula 26
[0184] Among them, the geomagnetic measurement equation for the state quantity The partial derivative of As shown in formula 22; R m Represents the geomagnetic measurement noise. Geomagnetic observations in the body coordinate system Relative to the attitude quaternion q k The observed state transfer matrix As shown in Formula 23.
[0185] At this point, the EKF-based magnetic interference estimation algorithm is completed, and the prediction equation such as Formula 24, the acceleration update equation such as Formula 25 and the geomagnetic update equation such as Formula 26 can be obtained, and these three equations are pre-stored in the aircraft, for example, in the flight control motherboard of the aircraft.
[0186] Then, in executing step S2, estimating the first state When, the following steps S21-S23 may be included.
[0187] Step S21: Acquire acceleration measurement data collected by the acceleration sensor at the current moment.
[0188] For example, the acceleration measurement data at the current time k is obtained .
[0189] Step S22: Estimate the second state at the current moment based on the acceleration measurement data, the prediction equation and the acceleration update equation.
[0190] For example, according to the prediction equation shown in Formula 24, the state estimation value from time k-1 to time k can be determined: , and the state covariance from time k-1 to time k . Then , , Substituting into the acceleration update equation shown in Formula 25, the second state at the current time k can be estimated , and the state covariance corresponding to the second state can be estimated .
[0191] Step S23: Calibrate the second state based on the geomagnetic measurement data and the geomagnetic update equation to obtain the first state.
[0192] For example, the second state estimated in Formula 25 is and its corresponding state covariance , and geomagnetic measurement data Substituting into the geomagnetic update equation shown in Formula 26, the second state can be calibrated, and the result after calibration is the first state .
[0193] This completes the introduction to the estimation of the first state based on EKF.
[0194] Regarding determining the flight attitude based on the attitude data and the geomagnetic calibration data in step S4, in some embodiments, it specifically includes steps S41 and S42.
[0195] Step S41: Determine the roll angle and pitch angle of the aircraft based on the attitude data.
[0196] Exemplarily, the first state The attitude data in is the attitude quaternion q k In this way, the attitude quaternion q k Converted to roll angle φ k With the pitch angle θ k Among them, the conversion relationship between attitude quaternion and Euler angle can be found in the related art.
[0197] At the same time, the roll angle φ determined based on the attitude data k With the pitch angle θ k is accurate, but the heading angle determined based on the attitude data is inaccurate. Therefore, it is necessary to determine the accurate heading angle by executing step S42.
[0198] Step S42: Determine the heading angle of the aircraft based on the calibration data.
[0199] For example, the calibration data can be substituted into Formula 1 to calculate the heading angle ψ k That is, from the first state Get the first magnetic interference value , used to calibrate the geomagnetic measurement data collected by the geomagnetic sensor at the current time k Finally, the accurate heading angle ψ is calculated using the obtained calibration data k .
[0200] At this point, the roll angle φ is obtained k , pitch angle θ kand heading angle ψ k is the flight attitude of the aircraft at the current time k. Therefore, the influence of dynamic hard magnetic interference on the geomagnetic sensor can be eliminated by the first state estimated by EKF, so that the accurate flight attitude of the aircraft at each moment can be provided.
[0201] In some embodiments, after executing step S41 - step S42 , step S43 - step S44 may be further executed.
[0202] Step S43: determining a target attitude quaternion based on the roll angle, the pitch angle and the heading angle;
[0203] Step S44: Controlling the position and attitude of the aircraft based on the target attitude quaternion.
[0204] For example, after the accurate flight attitude, i.e., the accurate Euler angle, is determined through steps S41 and S42, in order to avoid the problem of Euler angle universal joint deadlock, the Euler angle (φ k ,θ k With ψ k ) is converted into a target attitude quaternion. Then the target attitude quaternion is an accurate attitude quaternion that can accurately represent the flight attitude of the aircraft. Subsequently, the position and attitude of the aircraft can be controlled based on the accurate target attitude quaternion.
[0205] It can be seen that this embodiment controls the aircraft's posture by converting Euler angles into target attitude quaternions, thereby ensuring the flight safety of the aircraft and avoiding the "pan-brushing" phenomenon or even the occurrence of aircraft crashes.
[0206] In some embodiments, the above method may further include the following steps:
[0207] When the first magnetic interference amount is greater than a preset threshold, outputting a magnetic interference calibration prompt to the user;
[0208] During the process of the aircraft performing a preset calibration movement, the first magnetic interference amount when the calibration end condition is met is stored as the second magnetic interference amount.
[0209] For example, from the first state The first magnetic interference value at the current time k can be obtained If the first magnetic interference If the value is greater than a preset threshold, it indicates that the current dynamic hard magnetic interference is strong, so the user can be prompted to re-calibrate the magnetic interference. Exemplarily, the aircraft can send a magnetic interference calibration prompt to the control device in the communication connection. The control device can output the magnetic interference calibration prompt in the human-computer interaction interface. The control device can include but is not limited to a remote control, a center console, and the like.
[0210] After the user is informed of the magnetic interference calibration prompt, the user can control the aircraft to perform a preset calibration movement. For example, the aircraft can be controlled to perform a calibration movement after entering the calibration mode. The calibration movement can be an 8-shaped movement, rotation around three axes, etc. The calibration movement can be performed by the user manually holding the aircraft, or can be controlled by a control device.
[0211] During the calibration process of the aircraft, the aircraft will continuously estimate the first state at each moment based on the EKF. and its state covariance P k When the preset calibration end condition is met, the first magnetic interference amount can be stored as the second magnetic interference amount, that is, the offline magnetic interference amount mentioned in the above embodiment. The preset calibration end condition can be the convergence of the EKF-based magnetic interference estimation algorithm, that is, the state covariance P k is smaller than the preset covariance threshold.
[0212] Taking the figure-8 motion as an example, the user can hold the drone to be calibrated and control it to make a figure-8 shake. In this process, the magnetic interference estimation algorithm will converge quickly. k When the first magnetic interference value is less than the preset covariance threshold, the calibration ends. As the second magnetic disturbance quantity m bias Stored in the EEPROM of the flight control mainboard or the built-in FLASH of the chip.
[0213] It is understandable that the geomagnetic calibration data is obtained only after the original measurement data of the geomagnetic sensor is calibrated offline and online in sequence. If the user calibrates the aircraft according to the magnetic interference calibration prompt, the offline second magnetic interference amount will be updated. Then the aircraft can quickly complete the online calibration of the attitude every time, improving the calibration efficiency. If the user does not calibrate the aircraft, the aircraft can also obtain accurate flight attitude through online calibration, which will not affect the flight of the aircraft. That is, this embodiment provides both offline calibration and online calibration, ensuring the high accuracy of the flight attitude and providing a strong and effective guarantee for flight safety.
[0214] In addition, the aircraft is detachably equipped with a payload. The payload may include, but is not limited to, a gimbal camera, an optoelectronic sensor, an infrared sensor, a laser radar, and a loudspeaker. Based on this, in some embodiments, in response to the aircraft being equipped with a payload or replacing a payload, a magnetic interference calibration prompt is output to the user.
[0215] Since various aircraft loads will generate dynamic hard magnetic interference to a greater or lesser extent, a magnetic interference calibration prompt is output to the user each time the aircraft is equipped with a load or replaced with a load. This allows the aircraft to perform a flight mission after calibration and update the second magnetic interference amount. In this way, the aircraft can quickly complete online calibration during flight, improving the efficiency of attitude calibration.
[0216] Taking a drone as an example, the following is an experimental verification of attitude calibration based on the attitude calibration method of the present application.
[0217] 1) Motor magnetic interference estimation verification
[0218] First, calibrate the geomagnetic sensor of the drone, then fix the drone on the stand and power it, and perform a propeller push and pull throttle test.
[0219] Figure 7 The magnetic disturbance of the body coordinate system estimated by EKF is shown . Figure 8 The gyro bias estimated based on the EKF is shown in . Fig. 9 The geomagnetic measurement data and magnetic induction intensity calculated after the geomagnetic sensor is calibrated by two calibration methods. Among them, the "based on K, B calibration" curve is the geomagnetic measurement data and magnetic induction intensity after calibration based on the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B; the "based on EKF calibration" curve is the geomagnetic measurement data and magnetic induction intensity after calibration based on the calibration method provided in this application. It can be seen that after adopting the EKF magnetic interference estimation algorithm, the magnetic induction intensity is not affected by the acceleration of the motor, it is basically a straight line, and the noise is significantly smaller. Fig.10 The following figure shows the heading angle calculated after the geomagnetic sensor is calibrated by two calibration methods. Among them, the "based on K, B calibration" curve is the heading angle calculated based on the geomagnetic measurement data and magnetic induction intensity after calibration with the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B; the "based on EKF calibration" curve is the heading angle calculated based on the geomagnetic measurement data and magnetic induction intensity after calibration with the calibration method provided in this application. It can be seen that after adopting the EKF magnetic interference estimation algorithm, the estimated heading is basically not affected by motor acceleration.
[0220] 2) Verification of the estimation of the magnetic interference of the megaphone
[0221] Before the drone was equipped with a megaphone, a three-sided ellipsoid calibration was performed. The drone was then placed on the ground and the megaphone was installed at 23 seconds. Fig.11 The curve of the change of magnetic induction intensity before calibration ("before calibration" curve) and the curve of the change of magnetic induction intensity after calibration based on the soft magnetic interference calibration parameter K and the hard magnetic interference calibration parameter B ("based on K, B calibration" curve) are shown; Fig.12The magnetic disturbance of the body coordinate system estimated by EKF is shown The change curve of Fig.13 The curve of the heading angle of the body coordinate system estimated based on EKF is shown. Fig.11 It can be seen that after the loudspeaker was installed 23 seconds later, the magnetic induction intensity increased rapidly; Fig.12 It can be seen that the magnetic interference Also increases at the same time; from Fig.13 It can be seen that the heading angle drifts rapidly. At this time, the control device of the aircraft will output a magnetic interference calibration prompt, such as a voice announcement "Please calibrate the magnetic compass".
[0222] During the process from 23 seconds to 60 seconds, the user has not calibrated the drone yet, but after online calibration through the EKF magnetic interference estimation algorithm, the estimation of the magnetic interference amount becomes more and more accurate, but the heading angle becomes more and more accurate more slowly.
[0223] At 60 seconds, the user uses the 8-character calibration method to quickly calibrate the drone, and the heading angle converges quickly. From 80 seconds to 100 seconds, the heading angle is still drifting slowly. At 100 seconds, the 8-character calibration method is used again to quickly calibrate the drone, and at 122 seconds, the heading is stabilized at 14.1° (about 0.24rad). This is 0.4° different from the ideal heading, proving that the EKF-based magnetic interference estimation algorithm can effectively improve the accuracy of heading estimation.
[0224] Based on the attitude calibration method of an aircraft described in any of the above embodiments, the present application also provides the following Fig.14 A schematic diagram of the structure of an aircraft is shown in FIG. Fig.14 At the hardware level, the aircraft includes a geomagnetic sensor, a processor, an internal bus, a memory, and a non-volatile memory, and may also include hardware required for other services. The geomagnetic sensor is used to collect geomagnetic measurement data, and the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement an attitude calibration method for an aircraft described in any of the above embodiments.
[0225] Based on the attitude calibration method of an aircraft described in any of the above embodiments, the present application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. When the computer program is executed by a processor, the attitude calibration method of an aircraft described in any of the above embodiments is implemented.
[0226] The present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute an attitude calibration method for an aircraft described in any of the above embodiments.
[0227] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0228] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0229] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0230] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0231] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0232] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for calibrating the attitude of an aircraft, It is characterized in that The aircraft is equipped with a geomagnetic sensor and an acceleration sensor; the aircraft pre-stores an EKF-based prediction equation, an acceleration update equation, and a geomagnetic update equation, wherein the prediction equation, the acceleration update equation, and the geomagnetic update equation are all established based on a state equation, and the state equation is used to characterize the change of a state quantity over time, and the state quantity includes an attitude quaternion, a gyroscope zero bias, geomagnetic data of a reference coordinate system, and a magnetic interference quantity of a body coordinate system; the method includes: Acquire geomagnetic measurement data collected by the geomagnetic sensor and acceleration measurement data collected by the acceleration sensor at the current moment; estimating a second state at a current moment based on the acceleration measurement data, the prediction equation and the acceleration update equation; The second state is calibrated based on the geomagnetic measurement data and the geomagnetic update equation to obtain a first state; the first state includes an attitude quaternion and a first magnetic interference amount; Calibrate the geomagnetic measurement data based on the first magnetic interference amount to obtain geomagnetic calibration data; Determine the roll angle and pitch angle of the aircraft based on the attitude quaternion, and determine the heading angle of the aircraft based on the geomagnetic calibration data; A target attitude quaternion is determined based on the roll angle, the pitch angle, and the heading angle, and the position and posture of the aircraft is controlled based on the target attitude quaternion.
2. The method according to claim 1, It is characterized in that The aircraft has a second magnetic interference amount pre-stored therein, and the second magnetic interference amount is determined by a preset calibration movement; and the geomagnetic measurement data is calibrated based on the second magnetic interference amount.
3. The method according to claim 1, It is characterized in that The aircraft is also equipped with a gyroscope; the prediction equation, the acceleration update equation and the geomagnetic update equation are pre-established by the following steps: Establish a state equation for characterizing the change of state quantity over time; Establishing an acceleration measurement equation and a geomagnetic measurement equation; wherein the acceleration measurement equation is used to characterize the change of the acceleration observation quantity of the body coordinate system with the state quantity; the geomagnetic measurement equation is used to characterize the change of the geomagnetic observation quantity of the body coordinate system with the state quantity; Based on the state equation, the acceleration measurement equation and the geomagnetic measurement equation, the prediction equation, the acceleration update equation and the geomagnetic update equation are established.
4. The method according to claim 1, It is characterized in that The method further comprises: When the first magnetic interference amount is greater than a preset threshold, outputting a magnetic interference calibration prompt to the user; During the process of the aircraft performing a preset calibration movement, the first magnetic interference amount when the calibration end condition is met is stored as the second magnetic interference amount.
5. An aircraft, It is characterized in that include: A geomagnetic sensor for collecting geomagnetic measurement data; processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instructions, it implements the operation of any method described in claims 1-4.
6. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium, It is characterized in that Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of any method described in claims 1-4 are implemented.
