CN108180924B - Magnetometer calibration updating method and device - Google Patents

Magnetometer calibration updating method and device Download PDF

Info

Publication number
CN108180924B
CN108180924B CN201711308499.2A CN201711308499A CN108180924B CN 108180924 B CN108180924 B CN 108180924B CN 201711308499 A CN201711308499 A CN 201711308499A CN 108180924 B CN108180924 B CN 108180924B
Authority
CN
China
Prior art keywords
magnetometer
ellipse
data
fitting
fitting ellipse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711308499.2A
Other languages
Chinese (zh)
Other versions
CN108180924A (en
Inventor
陈维亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201711308499.2A priority Critical patent/CN108180924B/en
Publication of CN108180924A publication Critical patent/CN108180924A/en
Application granted granted Critical
Publication of CN108180924B publication Critical patent/CN108180924B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass

Abstract

The invention discloses a method and a device for updating magnetometer calibration, wherein the method comprises the following steps: step S1, according to magnetometer data acquired by the geomagnetic sensor in real time, performing initial calibration on the magnetometer to obtain a fitting ellipse; step S2, dividing the space area with the coordinate of the center position of the fitting ellipse as the center into a plurality of areas, calculating the mean value of the coordinate of the boundary point of the fitting ellipse falling in each area, and storing the mean value as the data of the boundary point; step S3, recalibrating the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitting ellipse; and repeating the steps S2 to S3 on the new fitting ellipse to realize the calibration updating of the magnetometer, so that the problems that the acquired data is inaccurate and the calibration result is influenced because the magnetometer is subjected to new interference in the using process are solved, and the user experience is better.

Description

Magnetometer calibration updating method and device
Technical Field
The present invention relates to the field of magnetometers, and in particular, to a method and an apparatus for updating calibration of a magnetometer.
Background
Magnetometer calibration is particularly important because it is the most susceptible of interference in a nine-axis sensor, and is an important factor in calculating the heading angle. A fitting ellipse is obtained through a series of algorithms in the initial calibration of the magnetometer, after the ellipse fitting is completed, the inclined ellipse with the center not at the origin of coordinates is changed into a circle with the center at the origin of coordinates through geometric transformation through rotation, translation, scaling and other processing, and therefore the geomagnetic calibration for removing soft magnetic and hard magnetic interference is achieved. After the initial magnetometer calibration is completed, the traditional algorithm has no subsequent background automatic updating process. The external environment of the magnetometer during use may also receive new interference, such as a mobile phone and the like, and the algorithm needs to be updated and corrected in real time in the background, otherwise, data interfered by hard iron or soft iron is collected subsequently by the magnetometer, so that the data collected by the magnetometer is inaccurate, and the user experience is poor.
Disclosure of Invention
The present invention provides a method and apparatus for magnetometer calibration update that solves or partially solves the above-mentioned problems.
According to an aspect of the invention, there is provided a method of magnetometer calibration update, the method comprising:
step S1, according to magnetometer data acquired by the geomagnetic sensor in real time, performing initial calibration on the magnetometer to obtain a fitting ellipse;
step S2, dividing the space area with the coordinate of the center position of the fitting ellipse as the center into a plurality of areas, calculating the mean value of the coordinate of the boundary point of the fitting ellipse falling in each area, and storing the mean value as the data of the boundary point;
step S3, recalibrating the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitting ellipse;
repeating steps S2 through S3 for the new fitted ellipse to effect calibration update of the magnetometer.
Alternatively,
the initial calibration of the magnetometer according to magnetometer data acquired by the geomagnetic sensor in real time to obtain a fitting ellipse comprises:
sorting magnetometer data of a preset number, which are acquired by a geomagnetic sensor in real time;
finding an outermost point based on the sorted data points;
and based on the outermost layer points, performing ellipse fitting by using a least square method to obtain a fitting ellipse.
Alternatively,
the dividing the spatial region centered on the center position coordinates of the fitted ellipse into a plurality of regions includes:
calculating to obtain the center position coordinates of the fitting ellipse according to the general equation of the fitting ellipse;
taking the coordinates of the outermost layer points as the coordinates of the boundary points of the fitting ellipse;
and calculating an included angle between a vector formed by the boundary point coordinates and the central position coordinates and a horizontal positive direction vector, and dividing a space area taking the central position coordinates of the fitting ellipse as a center into a plurality of areas according to the included angle.
Alternatively,
the recalibrating the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitting ellipse comprises:
sorting the magnetometer data newly acquired by the geomagnetic sensor in a preset number and the stored boundary point data to obtain mixed data points;
finding an outermost point of the mixed data points;
and carrying out ellipse fitting by using a least square method based on the outermost point in the mixed data points to obtain a new fitting ellipse.
Alternatively,
the number of the divided areas is at least five, at most one boundary data point is stored in each area, and the total number of the stored boundary data points is at least five.
The invention also discloses a device for updating the calibration of the magnetometer, which comprises:
the initial calibration module is used for carrying out initial calibration on the magnetometer according to magnetometer data acquired by the geomagnetic sensor in real time to obtain a fitting ellipse;
the sub-region storage module is used for dividing a space region taking the central position coordinates of the fitting ellipse as the center into a plurality of regions, calculating the mean value of the boundary point coordinates of the fitting ellipse falling in each region, and storing the mean value as boundary point data;
and the recalibration module is used for recalibrating the magnetometer to obtain a new fitting ellipse according to magnetometer data newly acquired by the geomagnetic sensor and the stored boundary point data, and returning the fitting ellipse to the sub-region storage module to realize calibration updating of the magnetometer.
Alternatively,
the initial calibration module is specifically used for sequencing a preset number of magnetometer data acquired by the geomagnetic sensor in real time and finding out the outermost point based on the sequenced data points; based on the outermost layer points, performing ellipse fitting by using a least square method to obtain a fitting ellipse;
the recalibration module is specifically configured to sort the preset number of magnetometer data newly acquired by the geomagnetic sensor and the stored boundary point data to obtain mixed data points, find the outermost point in the mixed data points, and perform ellipse fitting based on the outermost point in the mixed data points by using a least square method to obtain a new fitting ellipse.
Alternatively,
the partition storage module is specifically configured to calculate a coordinate of a central position of the fitting ellipse according to a general equation of the fitting ellipse, use a coordinate of the outermost point as a coordinate of a boundary point of the fitting ellipse, calculate an included angle between a vector formed by the coordinate of the boundary point and the coordinate of the central position and a horizontal positive direction vector, and partition a spatial region centered on the coordinate of the central position of the fitting ellipse into a plurality of regions according to the included angle.
Alternatively,
the number of the divided areas is at least five, at most one boundary data point is stored in each area, and the total number of the stored boundary data points is at least five.
The invention also discloses a device for updating the calibration of the magnetometer, which comprises a memory and a processor, wherein the memory and the processor are in communication connection through an internal bus, the memory stores computer instructions capable of being executed by the processor, and the computer instructions can realize the method for updating the calibration of the magnetometer when being executed by the processor.
The embodiment of the invention has the beneficial effects that: the method comprises the steps of initially calibrating a magnetometer to obtain a fitting ellipse according to magnetometer data acquired by a geomagnetic sensor in real time, dividing a space region with the central position coordinate of the fitting ellipse as the center into a plurality of regions, calculating the mean value of the boundary point coordinates of the fitting ellipse falling in each region, storing the mean value as boundary point data in a partitioned mode, storing at most one boundary point data point in each region, and reducing the calculation amount and optimizing the memory space; recalibrating the magnetometer to obtain a new fitting ellipse according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data; after the new fitting ellipse is stored in a partitioned mode again in a circulating mode, the magnetometer is calibrated for many times according to the new magnetometer data and the stored boundary point data, automatic calibration updating of the background of the magnetometer is completed, the problems that collected data are inaccurate and calibration results are affected due to the fact that the magnetometer is subjected to new interference in the using process are solved, and user experience is good.
Drawings
FIG. 1 is a flowchart of a method for magnetometer calibration update according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of magnetometer data sequencing principles;
FIG. 3 is a diagram illustrating the results of finding the outermost point;
FIG. 4 is a schematic diagram showing an angle between a vector formed by a boundary point and a center position coordinate and a horizontal positive direction vector;
FIG. 5 is a schematic diagram of division of an ellipse into regions;
FIG. 6 is a diagram of an apparatus for magnetometer calibration updating according to an embodiment of the present invention;
FIG. 7 is a diagram of another magnetometer calibration update apparatus according to an embodiment of the present invention.
Detailed Description
The technical conception of the invention is as follows: the boundary point coordinates of the fitting ellipse obtained by initial calibration of the magnetometer are stored in regions, at most one boundary data point is stored in each region to reduce the calculated amount and optimize the memory space, the magnetometer is calibrated again according to the stored boundary point data and newly acquired magnetometer data to obtain a new fitting ellipse, and then the boundary point regional storage and recalibration processes of the newly fitted ellipse are circularly performed, so that the magnetometer is always automatically calibrated and updated, the problems that the acquired data are inaccurate due to new interference in the use process of the magnetometer and the calibration result is influenced are solved, and the user experience is better.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Fig. 1 is a flowchart of a method for updating calibration of a magnetometer according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S1, according to magnetometer data acquired by the geomagnetic sensor in real time, performing initial calibration on the magnetometer to obtain a fitting ellipse; the method specifically comprises the following steps: sorting magnetometer data of a preset number, which are acquired by a geomagnetic sensor in real time; finding an outermost point based on the sorted data points; based on the outermost points, ellipse fitting is performed using a least square method to obtain a fitted ellipse.
In initial calibration of geomagnetism, drawing an 8 character in the air to acquire data is the most common method, because the 8 character calibration is the most basic mode of the geomagnetism calibration, aiming at acquiring data in each direction of space by using x, y and z axes of the geomagnetism; sequencing the acquired data, wherein the basic principle of sequencing is shown in FIG. 2, FIG. 2 is a schematic diagram of the principle of sequencing magnetometer data, all points and a lower left point (minimum point in the x direction) are connected into a vector, and sequencing is performed according to the relation of an included angle with the horizontal direction (attention is paid to the positive and negative sign relation); then, finding a convex hull by using a Graham stack scanning algorithm, namely, finding an outermost point on the basis of the sorted data points, wherein the result is shown in FIG. 3, and FIG. 3 is a schematic diagram of the result of finding the outermost point; fitting the outermost points into an ellipse by using a least square method according to the found outermost points to obtain an ellipse general equation: ax2+Bxy+Cy2+ Dx + Ey +1 is A, B, C, D, E parameters in 0, where these outermost points are the boundary points of the resulting fitted ellipse.
Step S2, dividing the space area with the coordinate of the center position of the fitting ellipse as the center into a plurality of areas, calculating the mean value of the coordinate of the boundary point of the fitting ellipse falling in each area, and storing the mean value as the boundary point data; the method for dividing the space area with the coordinate of the center position of the fitting ellipse as the center into a plurality of areas specifically comprises the following steps: calculating to obtain the center position coordinates of the fitting ellipse according to the general equation of the fitting ellipse; taking the coordinates of the outermost layer points as the coordinates of boundary points of a fitting ellipse; and calculating an included angle between a vector formed by the coordinates of the boundary points and the coordinates of the central position and a horizontal positive direction vector, and dividing a space area taking the coordinates of the central position of the fitting ellipse as a center into a plurality of areas according to the included angle. The number of the divided areas is at least five, at most one boundary data point is stored in each area, and the total number of the stored boundary data points is at least five.
The step is to store boundary points of the fitting ellipse in a partitioned mode, and the purpose is as follows: first, there may be infinite number of boundary points, and since the memory is limited, it is impossible to store all the memory, and the memory amount can be reduced by storing in different areas; and secondly, the updating condition of the boundary points is convenient to confirm, and the fitted ellipse is updated along with the change of the new boundary points, so that the aim of quickly eliminating the interference of new hard iron and soft iron is fulfilled. The method comprises the following steps:
1. calculating to obtain the center position coordinates of the fitting ellipse according to the general equation of the fitting ellipse;
under the condition that the geomagnetism is not interfered, the magnetometer processes and fits the acquired magnetometer data, and a circle is fitted at the moment, which is only in an ideal state; under normal conditions, the earth magnetism often receives the interference, and the magnetometer is fitted after processing the magnetometer data of gathering to the centre of a circle of fitting under the ideal state is the center and is established the world coordinate system, obtains the fitting elliptic equation that obtains in step S1, does:
Ax2+Bxy+Cy2+Dx+Ey+1=0
from this equation, the center position coordinates (Xc, Yc) of the ellipse are calculated by the formula:
Figure GDA0002698791280000061
2. taking the coordinates of the outermost layer points as the coordinates of boundary points of a fitting ellipse; calculating the included angle between the vector formed by the boundary point coordinates and the central position coordinates and the horizontal positive direction vector;
the coordinates of the outermost points are the coordinates of the boundary points of the fitting ellipse, the included angle between the vector formed by the coordinates (Xc, Yc) of the boundary points and the coordinates (Xc, Yc) of the center position and the vector in the positive horizontal direction is calculated, as shown in fig. 4, fig. 4 is a schematic diagram of the included angle between the vector formed by a certain boundary point and the coordinates (Xc, Yc) of the center position and the vector in the positive horizontal direction, the vector in the positive horizontal direction is selected to be (1, 0) for calculation simplification, any point (X1, Y1) of the boundary of the ellipse, and the included angle α:
Figure GDA0002698791280000062
Figure GDA0002698791280000063
Figure GDA0002698791280000064
Figure GDA0002698791280000071
3. dividing a space area taking the coordinate of the center position of the fitting ellipse as a center into a plurality of areas according to the included angle alpha; find the minimum angle alphaminAnd the maximum included angle alphamaxWill be alphaminAnd alphamaxThe area between the two areas is divided into m areas, so that at least two areas can have boundary points. If α ismin=0°,αmaxAt this time, the entire elliptical region is divided, as shown in fig. 4, fig. 4 is a schematic diagram of dividing the elliptical region into regions, and taking division into 8 regions as an example, the included angle range of 1 region is 0 ° to 45 °. And taking the average value of the boundary point coordinates falling in each area, and taking the average value as the boundary point coordinates of the area for reservation. The calculation formula of the mean value is as follows:
Figure GDA0002698791280000072
Figure GDA0002698791280000073
wherein the content of the first and second substances,
Figure GDA0002698791280000074
the average value of the boundary points of the 1 region is obtained, Xi and Yi are the values of the angle range of the included angle alpha falling in the 1 region in the boundary points, and n is the number of the boundary points falling in the 1 region in total.
The number of the finally divided areas is at least five, each area stores at most one boundary data point, and the total number of the stored boundary data points is at least five (general equations of the ellipse are five unknowns, and can be solved as long as five equations are needed). For example, the number of the finally divided regions is six, wherein five regions each hold a boundary point, and the sixth region holds zero or one data point.
Step S3, recalibrating the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitting ellipse; the method specifically comprises the following steps: sorting the magnetometer data newly acquired by the geomagnetic sensor in a preset number and the stored boundary point data to obtain mixed data points; finding an outermost point of the mixed data points; and carrying out ellipse fitting by using a least square method based on the outermost point in the mixed data points to obtain a new fitting ellipse.
And repeating the steps S2 to S3 for the new fitting ellipse to realize the calibration update of the magnetometer.
In some embodiments, a magnetometer is used, which has a sampling time interval of 6ms, and in order to reduce the amount of calculation, 10 sets of new data are accumulated each time, and 10 sets of data accumulated last time are added, and an ellipse fitting is performed, which corresponds to a sampling interval of 60 ms. After data point sorting and Graham algorithm processing are carried out on the newly acquired magnetometer data and the previously acquired magnetometer data, ellipse fitting is carried out by using a least square method, and primary calibration is completed; and carrying out regional storage on boundary points of the fitting ellipse obtained by primary calibration, continuously carrying out data point sequencing and Graham algorithm processing on magnetometer data newly acquired by the geomagnetic sensor and the stored boundary, carrying out ellipse fitting by using a least square method, completing secondary calibration, and so on, thereby realizing automatic calibration updating of the magnetometer.
Fig. 6 is a diagram of an apparatus for magnetometer calibration updating according to an embodiment of the present invention, as shown in fig. 6, the apparatus includes:
the initial calibration module 601 is configured to perform initial calibration on a magnetometer according to magnetometer data acquired by a geomagnetic sensor in real time to obtain a fitting ellipse; the geomagnetic sensor detection method comprises the steps of specifically sequencing magnetometer data of a preset number acquired by a geomagnetic sensor in real time, and finding out an outermost point based on sequenced data points; based on the outermost layer points, performing ellipse fitting by using a least square method to obtain a fitting ellipse;
a sub-region storage module 602, configured to divide a spatial region with the central position coordinate of the fitting ellipse as a center into a plurality of regions, calculate a mean value of the boundary point coordinates of the fitting ellipse falling in each region, and store the mean value as boundary point data; the method is specifically used for calculating the coordinate of the central position of the fitting ellipse according to the general equation of the fitting ellipse, taking the coordinate of the outermost point as the coordinate of the boundary point of the fitting ellipse, calculating the included angle between the vector formed by the coordinate of the boundary point and the coordinate of the central position and the vector of the horizontal positive direction, and dividing the space area taking the coordinate of the central position of the fitting ellipse as the center into a plurality of areas according to the included angle; the number of the divided areas is at least five, at most one boundary data point is stored in each area, and the total number of the stored boundary data points is at least five.
The recalibration module 603 is configured to recalibrate the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitted ellipse, and return the fitted ellipse to the sub-region storage module to implement calibration update of the magnetometer; the method is specifically used for sequencing magnetometer data of a preset number newly acquired by a geomagnetic sensor and stored boundary point data to obtain mixed data points, finding the outermost point in the mixed data points, and performing ellipse fitting based on the outermost point in the mixed data points by using a least square method to obtain a new fitting ellipse.
Fig. 7 is a diagram of another apparatus for updating magnetometer calibration according to an embodiment of the present invention, as shown in fig. 7, the apparatus 70 includes a memory 701 and a processor 702, the memory 701 and the processor 702 are communicatively connected via an internal bus 703, the memory 701 stores computer instructions capable of being executed by the processor 702, and the computer instructions, when executed by the processor 702, can implement the method for updating magnetometer calibration.
In various embodiments, memory 701 may be a memory or a non-volatile memory. Wherein the non-volatile memory may be: a storage drive (e.g., hard disk drive), a solid state drive, any type of storage disk (e.g., compact disk, DVD, etc.), or similar storage medium, or a combination thereof. The memory may be: RAM (random Access Memory), volatile Memory, nonvolatile Memory, and flash Memory. Further, the non-volatile memory and the internal memory are used as a machine-readable storage medium on which a computer program executed by the processor 702 is stored to implement the aforementioned magnetometer calibration updating method, which is described in detail in the embodiment shown in fig. 1 and will not be described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The invention provides a method for automatically calibrating and updating a magnetometer on the basis of the conventional initial calibration technology of the magnetometer, namely, performing initial calibration on the magnetometer according to magnetometer data acquired by a geomagnetic sensor in real time to obtain a fitting ellipse, dividing a space area taking the central position coordinates of the fitting ellipse as the center into a plurality of areas, calculating the mean value of the boundary point coordinates of the fitting ellipse falling in each area, and storing the mean value as boundary point data; recalibrating the magnetometer to obtain a new fitting ellipse according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data; after the new fitting ellipse is stored in a partitioned mode again in a circulating mode, the magnetometer is calibrated for many times according to the new magnetometer data and the stored boundary point data, automatic calibration updating of the background of the magnetometer is completed, the problems that collected data are inaccurate and calibration results are affected due to the fact that the magnetometer is subjected to new interference in the using process are solved, and user experience is good.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (6)

1. A method of magnetometer calibration update, the method comprising:
step S1, according to magnetometer data acquired by the geomagnetic sensor in real time, performing initial calibration on the magnetometer to obtain a fitting ellipse;
step S2, dividing the space area with the coordinate of the center position of the fitting ellipse as the center into a plurality of areas, calculating the mean value of the coordinate of the boundary point of the fitting ellipse falling in each area, and storing the mean value as the data of the boundary point;
step S3, recalibrating the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitting ellipse;
repeating steps S2 to S3 for the new fitted ellipse to effect calibration update of the magnetometer;
the dividing the spatial region centered on the center position coordinates of the fitted ellipse into a plurality of regions includes:
calculating to obtain the center position coordinates of the fitting ellipse according to the general equation of the fitting ellipse;
taking the coordinates of the outermost points as the coordinates of the boundary points of the fitting ellipse;
calculating an included angle between a vector formed by the boundary point coordinates and the central position coordinates and a horizontal positive direction vector, and dividing a space area taking the central position coordinates of the fitting ellipse as a center into a plurality of areas according to the included angle;
the number of the divided areas is at least five, at most one boundary data point is stored in each area, and the total number of the stored boundary data points is at least five.
2. The method of claim 1, wherein said initially calibrating the magnetometer to obtain a fitted ellipse based on magnetometer data collected by a geomagnetic sensor in real time comprises:
sorting magnetometer data of a preset number, which are acquired by a geomagnetic sensor in real time;
finding an outermost point based on the sorted data points;
and based on the outermost layer points, performing ellipse fitting by using a least square method to obtain a fitting ellipse.
3. The method of claim 1, wherein recalibrating the magnetometer to obtain a new fitted ellipse based on the newly acquired magnetometer data from the geomagnetic sensor and the saved boundary point data comprises:
sorting the magnetometer data newly acquired by the geomagnetic sensor in a preset number and the stored boundary point data to obtain mixed data points;
finding an outermost point of the mixed data points;
and carrying out ellipse fitting by using a least square method based on the outermost point in the mixed data points to obtain a new fitting ellipse.
4. An apparatus for magnetometer calibration update, the apparatus comprising:
the initial calibration module is used for carrying out initial calibration on the magnetometer according to magnetometer data acquired by the geomagnetic sensor in real time to obtain a fitting ellipse;
the sub-region storage module is used for dividing a space region taking the central position coordinates of the fitting ellipse as the center into a plurality of regions, calculating the mean value of the boundary point coordinates of the fitting ellipse falling in each region, and storing the mean value as boundary point data;
the recalibration module is used for recalibrating the magnetometer according to magnetometer data newly acquired by the geomagnetic sensor and stored boundary point data to obtain a new fitting ellipse, and returning the fitting ellipse to the sub-region storage module to realize calibration updating of the magnetometer;
the partitioned area storage module is specifically configured to calculate a coordinate of a center position of the fitting ellipse according to a general equation of the fitting ellipse, use a coordinate of an outermost point as a coordinate of a boundary point of the fitting ellipse, calculate an included angle between a vector formed by the coordinate of the boundary point and the coordinate of the center position and a horizontal positive direction vector, and partition a spatial area centered on the coordinate of the center position of the fitting ellipse into a plurality of areas according to the included angle; the number of the divided areas is at least five, at most one boundary data point is stored in each area, and the total number of the stored boundary data points is at least five.
5. The apparatus according to claim 4, wherein the initial calibration module is specifically configured to rank a preset number of magnetometer data collected by the geomagnetic sensor in real time, and find an outermost point based on the ranked data points; based on the outermost layer points, performing ellipse fitting by using a least square method to obtain a fitting ellipse;
the recalibration module is specifically configured to sort the preset number of magnetometer data newly acquired by the geomagnetic sensor and the stored boundary point data to obtain mixed data points, find the outermost point in the mixed data points, and perform ellipse fitting based on the outermost point in the mixed data points by using a least square method to obtain a new fitting ellipse.
6. A magnetometer calibration updating apparatus comprising a memory and a processor, the memory and the processor being communicatively coupled via an internal bus, the memory storing computer instructions executable by the processor, the computer instructions, when executed by the processor, implementing the method of any of claims 1-3.
CN201711308499.2A 2017-12-11 2017-12-11 Magnetometer calibration updating method and device Active CN108180924B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711308499.2A CN108180924B (en) 2017-12-11 2017-12-11 Magnetometer calibration updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711308499.2A CN108180924B (en) 2017-12-11 2017-12-11 Magnetometer calibration updating method and device

Publications (2)

Publication Number Publication Date
CN108180924A CN108180924A (en) 2018-06-19
CN108180924B true CN108180924B (en) 2020-11-27

Family

ID=62545857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711308499.2A Active CN108180924B (en) 2017-12-11 2017-12-11 Magnetometer calibration updating method and device

Country Status (1)

Country Link
CN (1) CN108180924B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109211271B (en) * 2018-09-11 2022-03-29 华南理工大学 Self-correcting method for magnetic compass
CN109798884B (en) * 2019-02-21 2021-04-23 广东工业大学 Dynamic real-time calibration method for magnetometer of multi-rotor unmanned aerial vehicle
CN110530397A (en) * 2019-08-08 2019-12-03 北京首贝科技发展有限公司 A kind of magnetic field automatic calibration method based on nine axis IMU

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7523559B2 (en) * 2004-04-07 2009-04-28 Continental Automotive Systems Us, Inc. Compass heading noise immunity
US9541393B2 (en) * 2011-06-30 2017-01-10 Qualcomm Incorporated Reducing power consumption or error of digital compass
JP6019585B2 (en) * 2012-01-06 2016-11-02 ヤマハ株式会社 Terminal device
KR101895205B1 (en) * 2016-11-23 2018-09-10 (주)스마트 제어계측 Concrit pole diagnostic apparatus
CN107390152B (en) * 2017-07-14 2020-02-18 歌尔科技有限公司 Calibration method and device for magnetometer and electronic equipment

Also Published As

Publication number Publication date
CN108180924A (en) 2018-06-19

Similar Documents

Publication Publication Date Title
CN108180924B (en) Magnetometer calibration updating method and device
CN104200454B (en) Fisheye image distortion correction method and device
CN110619333B (en) Text line segmentation method, text line segmentation device and electronic equipment
CN107895173B (en) Method, device and equipment for labeling image target and readable storage medium
CN107452028B (en) Method and device for determining position information of target image
CN109671061B (en) Image analysis method and device, computing equipment and storage medium
CN112200771A (en) Height measuring method, device, equipment and medium
CN112985778B (en) Test chart positioning method, terminal and storage medium
CN110866872B (en) Pavement crack image preprocessing intelligent selection method and device and electronic equipment
CN107133986B (en) A kind of camera calibration method based on two-dimensional calibrations object
Lund et al. Models for point processes observed with noise
CN103954280A (en) Rapid, high-robustness and autonomous fixed star identification method
CN110378227A (en) Correct method, apparatus, equipment and the storage medium of sample labeled data
CN111192324B (en) Line segment intersection point position determining method and device and readable storage medium
US11288839B2 (en) Supermarket shopping cart positioning method, supermarket shopping cart positioning system, and supermarket shopping cart
CN106292673B (en) A kind of method for optimizing route and system
CN111043984A (en) Tunnel three-dimensional deformation monitoring method and related device
CN109496326B (en) Image processing method, device and system
CN110986916A (en) Indoor positioning method and device, electronic equipment and storage medium
CN107945136B (en) Fisheye image correction method, fisheye image correction system, fisheye image correction equipment and computer storage medium
CN114387353A (en) Camera calibration method, calibration device and computer readable storage medium
CN111178366B (en) Mobile robot positioning method and mobile robot
CN108241136B (en) Method and device for calibrating and evaluating magnetometer
CN111724320B (en) Blind pixel filling method and system
CN110208271B (en) Phased array antenna damage detection method, phased array antenna damage detection device and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant