CN110426057B - Magnetometer data calibration method and magnetometer data calibration device - Google Patents
Magnetometer data calibration method and magnetometer data calibration device Download PDFInfo
- Publication number
- CN110426057B CN110426057B CN201910569226.6A CN201910569226A CN110426057B CN 110426057 B CN110426057 B CN 110426057B CN 201910569226 A CN201910569226 A CN 201910569226A CN 110426057 B CN110426057 B CN 110426057B
- Authority
- CN
- China
- Prior art keywords
- magnetic parameter
- hard magnetic
- magnetometer
- angle interval
- magnetometer data
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C17/00—Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
- G01C17/38—Testing, calibrating, or compensating of compasses
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C25/00—Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Manufacturing & Machinery (AREA)
- Measuring Magnetic Variables (AREA)
Abstract
The embodiment of the application discloses a magnetometer data calibration method, which is applied to terminal equipment with a folding screen and a magnetometer, and comprises the following steps: obtaining the bending angle of the folding screen and magnetometer data of a magnetometer; determining a first angle interval in which the bending angle of the folding screen is positioned; determining a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval; and calibrating the magnetometer data according to the target soft magnetic parameters to obtain first calibration data. The embodiment of the application also provides a corresponding magnetometer data calibration device. According to the technical scheme, the magnetometer data can be calibrated by determining the corresponding target soft magnetic parameters according to different bending angles of the folding screen, the problem caused by soft magnetic interference change in the bending process of the folding screen can be solved, and a solution for calibrating the magnetometer data by the folding screen terminal equipment in different bending states is provided.
Description
Technical Field
The present application relates to the field of magnetometer technology, and in particular, to a method and apparatus for calibrating magnetometer data.
Background
With the development of the times, electronic devices such as mobile phones and the like become indispensable articles in life of people. With the development and progress of science and technology, the functions of electronic equipment such as mobile phones and the like become more diversified, and the current smart phones basically have applications such as navigation, compass and the like.
The navigation, compass and other applications in electronic devices such as mobile phones require magnetometer data when in use, but the magnetometer data are easily interfered, and the interference mainly includes soft magnetic interference. Soft magnetic interference mainly originates from some soft magnetic materials in the electronic device, which are easily magnetized, and has directionality, so that the magnetometer suffers from different soft magnetic interference in different postures. In a traditional single-screen electronic device such as a single-screen mobile phone, because the relative positions of a magnetometer and other components in the device are fixed, the soft magnetic interference is also relatively fixed, and therefore, magnetometer data can be calibrated through a set of soft magnetic parameters.
Nowadays, with the emergence of new use demands, electronic devices with foldable screens (hereinafter referred to as foldable screen devices) have come into force. The screen of the folding screen device can be folded, so that the carrying volume is reduced, and the folded screen can be unfolded to obtain a larger screen display area. During folding and unfolding, the relative position of the magnetometer in the device relative to other components is dynamically changed, so that the soft magnetic interference suffered by the magnetometer is also dynamically changed. The application of the traditional method of calibrating magnetometer data by using only one set of soft magnetic parameters in the folding screen device is not feasible, and the problem that how to calibrate the magnetometer data in the device in the folding and unfolding processes of the folding screen device needs to be solved at present.
Disclosure of Invention
The embodiment of the application provides a magnetometer data calibration method and a magnetometer data calibration device which can be applied to terminal equipment provided with a folding screen.
In a first aspect, the present application provides a method for calibrating magnetometer data, which is applied to a terminal device configured with a folding screen and a magnetometer, and includes: obtaining the bending angle of a folding screen of the terminal equipment and magnetometer data of a magnetometer; determining a first angle interval in which the bending angle of the folding screen is positioned; determining a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval, wherein the target soft magnetic parameter corresponds to the first angle interval, the soft magnetic parameter set comprises at least one soft magnetic parameter, and each soft magnetic parameter corresponds to at least one preset angle interval one to one; and calibrating magnetometer data according to the target soft magnetic parameters to obtain first calibration data. Because the magnetometer data can be calibrated by determining the corresponding target soft magnetic parameters according to different bending angles of the folding screen, the problem caused by soft magnetic interference change in the bending process of the folding screen can be solved, and a solution for calibrating the magnetometer data by the folding screen terminal equipment in different bending states is provided.
Optionally, with reference to the first aspect, in a first possible implementation manner, after calibrating the magnetometer data according to a target soft magnetic parameter, the method further includes: and determining a corresponding target hard magnetic parameter according to the bending angle of the folding screen, wherein the target hard magnetic parameter is a hard magnetic parameter meeting a preset convergence condition, and the target hard magnetic parameter is used for calibrating the first calibration data to obtain second calibration data. The first calibration parameter is calibrated through the target hard magnetic parameter, so that errors brought to magnetometer data by hard magnetic interference can be avoided, the errors of the magnetometer data can be further reduced, and the accuracy of the magnetometer data is improved.
Optionally, with reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, determining a corresponding target hard magnetic parameter according to a bending angle of the folding screen includes: determining a second angle interval, wherein the second angle interval is an angle interval in which the bending angle of the folding screen is positioned; determining a first hard magnetic parameter from a preset hard magnetic parameter set according to the second angle interval, wherein the first hard magnetic parameter is a parameter corresponding to the second angle interval at present, the hard magnetic parameter set comprises at least one hard magnetic parameter, and each hard magnetic parameter corresponds to at least one preset angle interval one to one; when the first hard magnetic parameter meets a preset convergence condition, determining the first hard magnetic parameter as a target hard magnetic parameter; and when the first hard magnetic parameter does not meet the preset convergence condition, calculating according to magnetometer data to obtain a target hard magnetic parameter, and updating the first hard magnetic parameter in the hard magnetic parameter set to the target hard magnetic parameter. By the method, the hard magnetic parameters in the hard magnetic parameter set can be updated in real time, the hard magnetic parameters can be corrected under the condition that the hard magnetic interference on the magnetometer in the same bending state changes after the terminal equipment is used for a long time, and the corrected hard magnetic parameters are used for calibrating magnetometer data, so that the accuracy of the magnetometer data is ensured.
Optionally, with reference to the first aspect, the first possible implementation manner of the first aspect, or the second possible implementation manner, in a third possible implementation manner, the method further includes: when a first application in the terminal device initiates a magnetometer data request, first calibration data is sent to the first application.
Optionally, with reference to the first or second possible implementation manner of the first aspect, in a fourth possible implementation manner, the method further includes: when a second application in the terminal device initiates a magnetometer data request, second calibration data is sent to the second application.
A second aspect of the present application provides a magnetometer data calibration device, where the magnetometer data calibration device is configured to perform the method for calibrating magnetometer data in the first aspect or any one of the possible implementation manners of the first aspect. In particular, the magnetometer data calibration apparatus may comprise means for performing the method of the first aspect or any one of the possible implementations of the first aspect.
A third aspect of the present application provides a magnetometer data calibration device, comprising a processor coupled to a memory, the memory being configured to store instructions, the processor being configured to execute the instructions stored in the memory, and execution of the instructions stored in the memory causing the processor to perform the method of magnetometer data calibration of the first aspect or any one of the possible implementations of the first aspect. Optionally, the magnetometer data calibration device further comprises the memory.
A fourth aspect of the present application provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of magnetometer data calibration of the above first aspect or any one of the possible implementations of the first aspect.
The magnetometer data calibration method provided by the embodiment of the application can be applied to terminal equipment configured with a folding screen and a magnetometer. In the method, after a bending angle of a folding screen and magnetometer data of a magnetometer are obtained, a first angle interval where the bending angle of the folding screen is located is determined, a target soft magnetic parameter is determined from a preset soft magnetic parameter set according to the first angle interval, the target soft magnetic parameter corresponds to the first angle interval, the soft magnetic parameter set comprises at least one soft magnetic parameter, the at least one soft magnetic parameter corresponds to the preset at least one angle interval one to one, and the magnetometer data are calibrated according to the determined target soft magnetic parameter to obtain first calibration data. The folding angle of the folding screen is dynamically changed in the folding process, so that the folding angle can be in different angle intervals, corresponding soft magnetic parameters are determined according to the different angle intervals, magnetometer data are calibrated, adverse effects of soft magnetic interference changes on magnetometer data calibration can be reduced, and magnetometer data errors are reduced, so that the method can be suitable for terminal equipment with the folding screen.
Furthermore, the target hard magnetic parameters are correspondingly obtained by obtaining the bending angle of the folding screen, and calibration data obtained by calibrating the target soft magnetic parameters can be calibrated again according to the target hard magnetic parameters on the basis of calibrating the target soft magnetic parameters, so that the error of magnetometer data can be further reduced, and the accuracy of the magnetometer data is improved.
Drawings
Fig. 1 is a schematic diagram of a terminal device to which the present invention is applied;
FIG. 2(a) is a schematic diagram of an embodiment of a method for calibrating magnetometer data in an embodiment of the present application;
FIG. 2(b) is a schematic diagram of an angle interval division manner in the embodiment of the present application;
FIG. 3 is a schematic diagram of another embodiment of a method for calibrating magnetometer data in an embodiment of the present application;
FIG. 4 is a schematic diagram of an embodiment of a magnetometer data calibration device in an embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of a magnetometer data calibration device in an embodiment of the present application.
Detailed Description
Embodiments of the present application will now be described with reference to the accompanying drawings, and it is to be understood that the described embodiments are merely illustrative of some, but not all, embodiments of the present application. As can be known to those skilled in the art, with the evolution of the graph computation framework and the emergence of new application scenarios, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on the technical purpose to be achieved, as long as the same or similar technical effects are achieved. The division of the modules presented in this application is a logical division, and in practical applications, there may be another division, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not executed, and in addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the modules may be in an electrical or other similar form, which is not limited in this application. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
The embodiment of the application provides a magnetometer data calibration method, provides a solution for calibrating magnetometer data in the folding and unfolding processes of a folding screen terminal, and can be applied to novel terminal equipment which is currently provided with a folding screen and a magnetometer. The terminal device can be as shown in fig. 1, and the folding screen of the terminal device can be bent along the axis of the bending part, so as to realize folding and unfolding. The terminal equipment can be products with display interfaces, such as mobile phones, displays, tablet computers, vehicle-mounted computers and the like. The embodiment of the present application does not specifically limit the specific form of the terminal device.
In order to solve the problem that a set of soft magnetic parameters cannot be used for calibrating magnetometer data due to the fact that soft magnetic interference dynamic changes in the folding and unfolding processes of a folding screen terminal, the embodiment of the application provides a magnetometer data calibration method. The embodiment of the application also provides a corresponding magnetometer data calibration device. The following are detailed below.
FIG. 2(a) is a schematic diagram of an embodiment of a method for calibrating magnetometer data in the embodiments of the present application.
As shown in fig. 2(a), one embodiment of the method for calibrating magnetometer data in the embodiment of the present application may include:
201. and acquiring the bending angle of the folding screen and magnetometer data of the magnetometer.
In this embodiment, the folding screen and the magnetometer are components disposed on the same terminal device. When the terminal equipment is used, the folding screen can be bent, so that when a user bends the folding screen to a certain bending angle, the bending angle of the folding screen and magnetometer data under the bending angle can be acquired.
Optionally, the terminal device may include an angle measurement sensor, in this embodiment, the bending angle of the folding screen may be obtained by the angle measurement sensor, or the bending angle of the folding screen may also be obtained by other manners, which is not specifically limited in this embodiment of the application.
202. A first angle interval is determined.
In this embodiment, the first angle interval is an angle interval in which a bending angle of the folding screen is located. The folding screen of the terminal device can be bent by 0-180 degrees, so that the interval can be divided into a plurality of small angle intervals, such as: dividing 180 ° into 9 different angle intervals with 20 ° as an interval, as shown in fig. 2 (b); alternatively, 180 ° is divided into 18 different angle intervals with 10 ° as an interval. It should be understood that the division of the angle interval may also be in other ways, and the present application is not limited thereto.
203. And determining a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval.
In this embodiment, the target soft magnetic parameter corresponds to the first angle interval, the soft magnetic parameter set is stored in a file of the terminal device in a data table form, the soft magnetic parameter set includes at least one soft magnetic parameter, and each soft magnetic parameter corresponds to a pre-divided angle interval one to one. In particular, the soft magnetic parameter is a soft magnetic matrix. As shown in table 1 below, the correspondence between the value of each soft magnetic matrix and the angle interval is obtained by testing in advance and then stored in the file of the terminal device in the form of a data table.
TABLE 1
After the first angle interval is determined, the corresponding target soft magnetic parameters can be determined according to the corresponding relation between different angle intervals and different soft magnetic parameters.
204. And calibrating the magnetometer data according to the target soft magnetic parameters to obtain first calibration data.
In this embodiment, after the target soft magnetic parameter is obtained, the magnetometer data may be calibrated to reduce an error from soft magnetic interference to the magnetometer data, and the data obtained by calibrating the original magnetometer data is the first calibration data. Specifically, the calibration process is to multiply the magnetometer data and the target soft magnetic parameter (i.e., soft magnetic matrix) to obtain first calibration data.
In this embodiment, since the bending angle of the folding screen is dynamically changed in the folding process, the bending angle may be in different angle intervals, corresponding soft magnetic parameters are determined according to the different angle intervals, magnetometer data are calibrated, adverse effects of soft magnetic interference changes on magnetometer data calibration can be reduced, and magnetometer data errors are reduced, so that the method can be applied to terminal equipment with the folding screen.
In the application scenario of the present application, magnetometer data is easily affected by soft magnetic interference and may also be affected by hard magnetic interference, the hard magnetic interference mainly originates from a hard magnetic material with a low magnetic permeability and a relatively stable magnetic field value in the electronic device, and the hard magnetic interference suffered by the magnetometer in different postures is also different. Therefore, the first calibration data obtained by calibrating the target soft magnetic parameters is calibrated for the second time by obtaining the hard magnetic parameters corresponding to different angle intervals, so that the error of the magnetometer data can be further reduced, and the accuracy of the magnetometer data is improved. The following is a detailed description.
FIG. 3 is a schematic diagram of another embodiment of a method for calibrating magnetometer data in an embodiment of the present application.
As shown in fig. 3, another embodiment of the method for calibrating magnetometer data in the embodiment of the present application may include:
301. and acquiring the bending angle of the folding screen and magnetometer data of the magnetometer.
302. A first angle interval is determined.
303. And determining a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval.
304. And calibrating the magnetometer data according to the target soft magnetic parameters to obtain first calibration data.
In this embodiment, steps 301 to 304 are similar to steps 201 to 204 described above, and for details, reference is made to the related descriptions in steps 201 to 204, which are not described herein again.
305. And determining corresponding target hard magnetic parameters according to the bending angle of the folding screen.
In this embodiment, the target hard magnetic parameter is a hard magnetic parameter satisfying a predetermined convergence condition, and the target hard magnetic parameter is used for calibrating the first calibration data to obtain second calibration data. The target hard magnetic parameter is specifically a hard magnetic offset, and when the first calibration data is calibrated, the hard magnetic offset is subtracted from the first calibration data to obtain second calibration data.
Optionally, the process of determining the corresponding target hard magnetic parameter according to the bending angle of the folding screen is similar to the process of determining the target soft magnetic parameter, and specifically may include:
determining a second angle interval, wherein the second angle interval is an angle interval in which the bending angle of the folding screen is positioned, and it should be understood that the second angle interval and the first angle interval can be divided in the same way or different ways;
and determining a first hard magnetic parameter from a preset hard magnetic parameter set according to the second angle interval, wherein the first hard magnetic parameter is a parameter corresponding to the second angle interval at present, and the hard magnetic parameter set comprises at least one hard magnetic parameter, and the at least one hard magnetic parameter corresponds to the preset at least one angle interval one to one. Unlike the soft magnetic parameter set, the soft magnetic parameters in the soft magnetic parameter set are preset and fixed, and the hard magnetic parameters in the hard magnetic parameter set in this embodiment are updated by the terminal device in real time.
When the determined first hard magnetic parameter meets the preset convergence condition, the first hard magnetic parameter can be determined as a target hard magnetic parameter; and when the first hard magnetic parameter does not meet the preset convergence condition, calculating according to magnetometer data of a magnetometer in the terminal equipment to obtain a target hard magnetic parameter meeting the preset convergence condition, and updating the first hard magnetic parameter in the hard magnetic parameter set to the target hard magnetic parameter.
Specifically, the process of determining whether the first hard magnetic parameter meets the preset convergence condition is also called magnetic interference determination, that is, it is determined whether the fluctuation of the estimated distance from a certain distributed magnetic point on the surface of the magnetic sphere to the center of the magnetic sphere is smaller than a certain threshold according to magnetometer data, and different threshold values correspond to different convergence levels, which include 4 convergence levels, namely, a convergence level 0, a convergence level 1, a convergence level 2, and a convergence level 3. When the convergence level 3 is reached, it can be considered that the preset convergence condition is satisfied, and the hard magnetic parameter at this time is authentic. When the first hard magnetic parameter does not meet the preset convergence condition, operation is carried out according to magnetometer data, specifically, attitude integral is obtained according to gyroscope data in the terminal equipment, an attitude matrix is further obtained, then least square recursion is carried out according to the obtained attitude matrix and the magnetometer data, a new hard magnetic parameter is obtained, and the obtained new hard magnetic parameter is the target hard magnetic parameter meeting the preset convergence condition. At this time, the first hard magnetic parameter in the set of hard magnetic parameters may be updated to the target hard magnetic parameter.
306. When a first application initiates a magnetometer data request, first calibration data is sent to the first application.
In this embodiment, the first application is an application in the terminal device, such as a navigation application, a compass, and other applications. When the first application initiates a magnetometer data request, first calibration data obtained through soft magnetic parameter calibration may be sent to the first application. When the degree of hard magnetic interference is low, the first calibration data can be regarded as relatively accurate data, and the precision requirement of the first application program on the magnetometer data can be met.
307. When the second application initiates a magnetometer data request, second calibration data is sent to the second application.
In this embodiment, the second application is an application in the terminal device, such as a navigation application, a compass, and the like. It should be understood that the second application and the first application may be the same application. When the second application initiates a magnetometer data request, second calibration data obtained by hard magnetic calibration of the first calibration data may be sent to the second application. The second calibration data has higher accuracy relative to the first calibration data, and can further meet the precision requirement of the second application program on the magnetometer data.
It should be understood that steps 306 and 307 described above are two parallel steps, and in a particular embodiment, there may be only one of steps 306 and 307.
In this embodiment, further, the hard magnetic parameters of the target are correspondingly obtained by obtaining the bending angle of the folding screen, and calibration data obtained by calibrating the soft magnetic parameters of the target can be calibrated again according to the hard magnetic parameters of the target on the basis of calibrating the soft magnetic parameters of the target, so that errors of magnetometer data can be further reduced, and the accuracy of the magnetometer data is improved.
The method for calibrating magnetometer data provided by the embodiment of the present application is described above, and the device for calibrating magnetometer data provided by the embodiment of the present application is described below.
FIG. 4 is a schematic diagram of an embodiment of a magnetometer data calibration device provided in embodiments of the present application.
As shown in fig. 4, the magnetometer data calibration means 40 may comprise:
an obtaining module 401, configured to obtain a bending angle of the folding screen and magnetometer data of the magnetometer;
a first determining module 402, configured to determine a first angle interval, where the first angle interval is an angle interval where a bending angle of the foldable screen is located;
a second determining module 403, configured to determine a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval, where the target soft magnetic parameter corresponds to the first angle interval, and the soft magnetic parameter set includes at least one soft magnetic parameter, where the at least one soft magnetic parameter corresponds to the preset at least one angle interval one to one;
a calibration module 404, configured to calibrate the magnetometer data according to the target soft magnetic parameter, so as to obtain first calibration data.
Optionally, as an embodiment, the magnetometer data calibration device 40 may further include:
a third determining module 405, configured to determine a corresponding target hard magnetic parameter according to the bending angle of the folding screen, where the target hard magnetic parameter is a hard magnetic parameter meeting a preset convergence condition, and the target hard magnetic parameter is used to calibrate the first calibration data to obtain second calibration data.
Optionally, as an embodiment, the third determining module 405 is specifically configured to determine a second angle interval, where the second angle interval is an angle interval in which a bending angle of the folding screen is located;
the third determining module 405 is further specifically configured to determine a first hard magnetic parameter from a preset hard magnetic parameter set according to the second angle interval, where the first hard magnetic parameter is a parameter corresponding to the second angle interval at present, and the hard magnetic parameter set includes at least one hard magnetic parameter, where the at least one hard magnetic parameter corresponds to the preset at least one angle interval one to one;
the third determining module 405 is further specifically configured to determine the first hard magnetic parameter as the target hard magnetic parameter when the first hard magnetic parameter meets the preset convergence condition;
the third determining module 405 is further specifically configured to, when the first hard magnetic parameter does not satisfy the preset convergence condition, perform operation according to the magnetometer data to obtain the target hard magnetic parameter, and update the first hard magnetic parameter in the hard magnetic parameter set to the target hard magnetic parameter.
Optionally, as an embodiment, the calibration module 404 may be further configured to calibrate the first calibration data according to the target hard magnetic parameter to obtain second calibration data.
Optionally, as an embodiment, the magnetometer data calibration device 40 may further include:
a first sending module 406, configured to send the first calibration data to a first application when the first application initiates a magnetometer data request, where the first application is an application in the terminal device.
Optionally, as an embodiment, the magnetometer data calibration device 40 may further include:
a second sending module 407, configured to send the second calibration data to a second application program when the second application program initiates a magnetometer data request, where the second application program is an application program in the terminal device.
Fig. 5 is a schematic diagram of a magnetometer data calibration device 50 provided in the embodiment of the present application, as shown in fig. 5:
the magnetometer data calibration device 50 may include one or more processors 501 and optionally the magnetometer data calibration device 50 may also include memory 502. The processor 501 and the memory 502 are connected by a communication bus.
The memory 502 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a random-access memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 502 may be separate and connected to the processor 501 via a bus. The memory 502 may also be integrated with the processor 501.
The memory 502 is used for storing application program codes for executing the scheme of the application, and the processor 501 controls the execution. The processor 501 is used to execute application program code stored in the memory 502.
In particular implementations, processor 501 may include one or more CPUs, each of which may be a single-Core (CPU) processor or a multi-Core (multi-Core) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
As another form of this embodiment, a computer-readable storage medium is provided having instructions stored thereon that, when executed, perform the method of the magnetometer data calibration device of the above-described method embodiments.
As another form of this embodiment, there is provided a computer program product containing instructions that, when executed, perform the method of the magnetometer data calibration device of the above method embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
The method for calibrating magnetometer data and the device for calibrating magnetometer data provided by the embodiments of the present application are described in detail above, and specific examples are applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (12)
1. A magnetometer data calibration method is applied to a terminal device configured with a folding screen and a magnetometer, and the method comprises the following steps:
obtaining the bending angle of the folding screen and magnetometer data of the magnetometer;
determining a first angle interval, wherein the first angle interval is an angle interval in which a bending angle of the folding screen is positioned;
determining a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval, wherein the target soft magnetic parameter corresponds to the first angle interval, the soft magnetic parameter set comprises at least one soft magnetic parameter, and the at least one soft magnetic parameter corresponds to at least one preset angle interval one to one;
and calibrating the magnetometer data according to the target soft magnetic parameters to obtain first calibration data.
2. The method of claim 1, wherein after calibrating the magnetometer data according to the target soft magnetic parameter, the method further comprises:
and determining a corresponding target hard magnetic parameter according to the bending angle of the folding screen, wherein the target hard magnetic parameter is a hard magnetic parameter meeting a preset convergence condition, and the target hard magnetic parameter is used for calibrating the first calibration data to obtain second calibration data.
3. The method of claim 2, wherein determining corresponding target hard magnetic parameters according to the bending angle of the folding screen comprises:
determining a second angle interval, wherein the second angle interval is an angle interval in which the bending angle of the folding screen is positioned;
determining a first hard magnetic parameter from a preset hard magnetic parameter set according to the second angle interval, wherein the first hard magnetic parameter is a parameter corresponding to the second angle interval at present, and the hard magnetic parameter set comprises at least one hard magnetic parameter, wherein the at least one hard magnetic parameter corresponds to the preset at least one angle interval one by one;
when the first hard magnetic parameter meets the preset convergence condition, determining the first hard magnetic parameter as the target hard magnetic parameter;
and when the first hard magnetic parameter does not meet the preset convergence condition, performing operation according to the magnetometer data to obtain the target hard magnetic parameter, and updating the first hard magnetic parameter in the hard magnetic parameter set to the target hard magnetic parameter.
4. The method according to any one of claims 1-3, further comprising:
when a first application initiates a magnetometer data request, sending the first calibration data to the first application, the first application being an application in the terminal device.
5. A method according to claim 2 or 3, characterized in that the method further comprises:
when a second application initiates a magnetometer data request, sending the second calibration data to the second application, the second application being an application in the terminal device.
6. The magnetometer data calibration device is applied to a terminal device configured with a folding screen and a magnetometer, and comprises:
the acquisition module is used for acquiring the bending angle of the folding screen and magnetometer data of the magnetometer;
the first determining module is used for determining a first angle interval, wherein the first angle interval is an angle interval in which a bending angle of the folding screen is positioned;
a second determining module, configured to determine a target soft magnetic parameter from a preset soft magnetic parameter set according to the first angle interval, where the target soft magnetic parameter corresponds to the first angle interval, and the soft magnetic parameter set includes at least one soft magnetic parameter, where the at least one soft magnetic parameter corresponds to the preset at least one angle interval one to one;
and the calibration module is used for calibrating the magnetometer data according to the target soft magnetic parameters to obtain first calibration data.
7. The magnetometer data calibration device of claim 6, further comprising:
and the third determining module is used for determining a corresponding target hard magnetic parameter according to the bending angle of the folding screen, wherein the target hard magnetic parameter is a hard magnetic parameter meeting a preset convergence condition, and the target hard magnetic parameter is used for calibrating the first calibration data to obtain second calibration data.
8. Magnetometer data calibration device according to claim 7,
the third determining module is specifically configured to determine a second angle interval, where the second angle interval is an angle interval in which a bending angle of the foldable screen is located;
the third determining module is further specifically configured to determine a first hard magnetic parameter from a preset hard magnetic parameter set according to the second angle interval, where the first hard magnetic parameter is a parameter corresponding to the second angle interval at present, and the hard magnetic parameter set includes at least one hard magnetic parameter, where the at least one hard magnetic parameter corresponds to the preset at least one angle interval one to one;
the third determining module is specifically configured to determine the first hard magnetic parameter as the target hard magnetic parameter when the first hard magnetic parameter meets the preset convergence condition;
the third determining module is specifically configured to, when the first hard magnetic parameter does not satisfy the preset convergence condition, perform operation according to the magnetometer data to obtain the target hard magnetic parameter, and update the first hard magnetic parameter in the hard magnetic parameter set to the target hard magnetic parameter.
9. Magnetometer data calibration device according to any of claims 6-8, characterized in that it further comprises:
a first sending module, configured to send the first calibration data to a first application when the first application initiates a magnetometer data request, where the first application is an application in the terminal device.
10. Magnetometer data calibration device according to claim 7 or 8, characterized in that it further comprises:
a second sending module, configured to send the second calibration data to a second application program when the second application program initiates a magnetometer data request, where the second application program is an application program in the terminal device.
11. A magnetometer data calibration device comprising a processor coupled to a memory for storing a computer program or instructions, the processor being operable to execute the computer program or instructions in the memory such that the magnetometer data calibration device performs the method of any of claims 1 to 5.
12. A computer-readable storage medium storing a computer program, characterized in that the program, when executed, implements the method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910569226.6A CN110426057B (en) | 2019-06-27 | 2019-06-27 | Magnetometer data calibration method and magnetometer data calibration device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910569226.6A CN110426057B (en) | 2019-06-27 | 2019-06-27 | Magnetometer data calibration method and magnetometer data calibration device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110426057A CN110426057A (en) | 2019-11-08 |
CN110426057B true CN110426057B (en) | 2021-08-20 |
Family
ID=68409832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910569226.6A Active CN110426057B (en) | 2019-06-27 | 2019-06-27 | Magnetometer data calibration method and magnetometer data calibration device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110426057B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111272159B (en) * | 2020-01-15 | 2024-04-02 | 闻泰通讯股份有限公司 | Compass calibration method and device based on terminal, storage medium and terminal |
CN111522453A (en) * | 2020-04-29 | 2020-08-11 | 北京小米移动软件有限公司 | Data processing method and device and computer storage medium |
CN112762915B (en) * | 2020-12-21 | 2023-05-09 | 深圳酷派技术有限公司 | Compass precision optimization method and device, storage medium and electronic equipment |
CN116558552B (en) * | 2023-07-07 | 2023-10-20 | 北京小米移动软件有限公司 | Calibration method and device for electronic compass, electronic equipment and medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006005540A (en) * | 2004-06-16 | 2006-01-05 | Yamaha Corp | Mobile terminal |
CN1957227A (en) * | 2004-03-31 | 2007-05-02 | 京瓷株式会社 | Mobile bearing calculation device and bearing correction method |
JP2007303945A (en) * | 2006-05-11 | 2007-11-22 | Softbank Mobile Corp | Sensor data correction method and mobile information apparatus |
JP2008008790A (en) * | 2006-06-29 | 2008-01-17 | Kyocera Corp | Cradle device, and demagnetization method and magnetization method of portable electronic equipment having geomagnetic sensor |
CN101608917A (en) * | 2004-06-11 | 2009-12-23 | 雅马哈株式会社 | Be used to measure the method and apparatus and the portable electronic equipment of magnetic offset of geomagnetic sensor |
CN106959105A (en) * | 2017-04-21 | 2017-07-18 | 北京京东尚科信息技术有限公司 | Method for calibrating compass and device |
CN108088431A (en) * | 2017-12-14 | 2018-05-29 | 上海交通大学 | A kind of self-correcting electronic compass and its bearing calibration |
WO2018147589A1 (en) * | 2017-02-07 | 2018-08-16 | Samsung Electronics Co., Ltd. | Method for displaying screen in electronic device and electronic device thereof |
CN108426571A (en) * | 2018-03-08 | 2018-08-21 | 北京诺亦腾科技有限公司 | A kind of electronic compass local real-time calibration method and device |
CN109059960A (en) * | 2018-07-18 | 2018-12-21 | 福州大学 | A kind of calibration method of three-dimensional electronic compass |
CN109655083A (en) * | 2019-02-15 | 2019-04-19 | 广州极飞科技有限公司 | Magnetic coder and its calibration method and calibrating installation, motor and unmanned vehicle |
CN109844553A (en) * | 2016-12-15 | 2019-06-04 | 朝日英达科株式会社 | Three-dimensional magnetic field detecting element and three-dimensional magnetic field detection device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4862398A (en) * | 1986-11-18 | 1989-08-29 | Sumitomo Electric Industries, Ltd. | Correcting method and correcting errors in a terrestrial magnetism heading sensor |
CN105783896B (en) * | 2016-05-17 | 2018-06-01 | 吉林大学 | A kind of interactive mode unmanned plane magnetic compass calibrating installation and calibration method |
-
2019
- 2019-06-27 CN CN201910569226.6A patent/CN110426057B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1957227A (en) * | 2004-03-31 | 2007-05-02 | 京瓷株式会社 | Mobile bearing calculation device and bearing correction method |
CN101608917A (en) * | 2004-06-11 | 2009-12-23 | 雅马哈株式会社 | Be used to measure the method and apparatus and the portable electronic equipment of magnetic offset of geomagnetic sensor |
JP2006005540A (en) * | 2004-06-16 | 2006-01-05 | Yamaha Corp | Mobile terminal |
JP2007303945A (en) * | 2006-05-11 | 2007-11-22 | Softbank Mobile Corp | Sensor data correction method and mobile information apparatus |
JP2008008790A (en) * | 2006-06-29 | 2008-01-17 | Kyocera Corp | Cradle device, and demagnetization method and magnetization method of portable electronic equipment having geomagnetic sensor |
CN109844553A (en) * | 2016-12-15 | 2019-06-04 | 朝日英达科株式会社 | Three-dimensional magnetic field detecting element and three-dimensional magnetic field detection device |
WO2018147589A1 (en) * | 2017-02-07 | 2018-08-16 | Samsung Electronics Co., Ltd. | Method for displaying screen in electronic device and electronic device thereof |
CN106959105A (en) * | 2017-04-21 | 2017-07-18 | 北京京东尚科信息技术有限公司 | Method for calibrating compass and device |
CN108088431A (en) * | 2017-12-14 | 2018-05-29 | 上海交通大学 | A kind of self-correcting electronic compass and its bearing calibration |
CN108426571A (en) * | 2018-03-08 | 2018-08-21 | 北京诺亦腾科技有限公司 | A kind of electronic compass local real-time calibration method and device |
CN109059960A (en) * | 2018-07-18 | 2018-12-21 | 福州大学 | A kind of calibration method of three-dimensional electronic compass |
CN109655083A (en) * | 2019-02-15 | 2019-04-19 | 广州极飞科技有限公司 | Magnetic coder and its calibration method and calibrating installation, motor and unmanned vehicle |
Also Published As
Publication number | Publication date |
---|---|
CN110426057A (en) | 2019-11-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110426057B (en) | Magnetometer data calibration method and magnetometer data calibration device | |
US10069186B2 (en) | Method and device for obtaining antenna engineering parameter and system | |
CN102981140B (en) | For utilizing the method and apparatus of the position of magnetic-field measurement terminal | |
US11300995B2 (en) | Foldable electronic device for detecting folding angle and operating method thereof | |
US20140213290A1 (en) | Position estimation device, position estimation method, program and integrated circuit | |
CN111148020B (en) | Positioning system, method, device and computer readable storage medium | |
JP6843241B2 (en) | Unmanned aerial vehicle heading determination method and unmanned aerial vehicle | |
US11129124B2 (en) | Electronic device, server device, and method for determining location of electronic device | |
CN111586235B (en) | Electronic device and computer-readable medium for dynamically laying out messages | |
CN105783900A (en) | Sensor data calibrating method and device | |
US20220319118A1 (en) | Electronic device for providing indoor positioning and method therefor | |
CN109696153A (en) | RTK inclination measurement accuracy checking method and system | |
CN108286946B (en) | Method and system for sensor position calibration and data splicing | |
CN112292611A (en) | Coordinate correction method, coordinate correction device, computing equipment and computer storage medium | |
TW202013243A (en) | Graphic code display method and device | |
CN115308684A (en) | Uwb ultra-wideband indoor positioning method and device | |
CN112762915B (en) | Compass precision optimization method and device, storage medium and electronic equipment | |
CN112468959B (en) | Position determining method, position determining device, computer equipment and storage medium | |
CN110333843A (en) | Implementation method, device and the electronic equipment of virtual machine high-resolution timer | |
US10646776B2 (en) | Server apparatus, method, and non-transitory computer-readable medium | |
US11895616B2 (en) | Electronic device and method for measuring location of electronic device | |
CN108444466B (en) | Positioning navigation method, device and terminal equipment | |
US10794698B2 (en) | Method and apparatus for indicating direction | |
CN112104784A (en) | Display method, display device, computer-readable storage medium, and electronic apparatus | |
CN117493775B (en) | Relative navigation method and device of data chain, electronic equipment and storage medium |
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 |