CN111433562A - Calibration method for magnetometer and related equipment - Google Patents

Calibration method for magnetometer and related equipment Download PDF

Info

Publication number
CN111433562A
CN111433562A CN201780097424.6A CN201780097424A CN111433562A CN 111433562 A CN111433562 A CN 111433562A CN 201780097424 A CN201780097424 A CN 201780097424A CN 111433562 A CN111433562 A CN 111433562A
Authority
CN
China
Prior art keywords
magnetometer
calibration
user
terminal
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.)
Pending
Application number
CN201780097424.6A
Other languages
Chinese (zh)
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.)
Shenzhen Royole Technologies Co Ltd
Original Assignee
Shenzhen Royole Technologies 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 Shenzhen Royole Technologies Co Ltd filed Critical Shenzhen Royole Technologies Co Ltd
Publication of CN111433562A publication Critical patent/CN111433562A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/38Testing, calibrating, or compensating of compasses

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A method of calibrating a magnetometer (101) and related apparatus. The calibration method comprises the following steps: when a condition for calibrating the magnetometer (101) is met, outputting prompt information for prompting a user to execute a calibration action (S201) of the magnetometer (101) on the terminal (10); acquiring magnetic data (S202) acquired by a magnetometer (101) during a user' S performance of a calibration action; the magnetometer (101) is calibrated (S203) based on the magnetometric data. The convenience of calibrating the magnetometer (101) can be improved.

Description

Calibration method for magnetometer and related equipment Technical Field
The present application relates to the field of magnetometer technology, and in particular, to a calibration method for a magnetometer and related devices.
Background
Along with the technical development of electronic equipment, various sensors can be configured in the electronic equipment and used for collecting environmental data, and the electronic equipment can make a decision based on the environmental data collected by the sensors, so that the intellectualization of the electronic equipment is realized. More and more electronic devices are equipped with magnetometers, which can detect the magnetic field size of a magnetic field in a certain direction, and then the magnetometers can be applied to aspects such as electronic compasses or angle measurement. Currently, with the technical development of terminals, such as wearable devices, more and more terminals are equipped with magnetometers. The terminal can utilize the magnetometer to realize more functions, thereby improving the user experience.
However, since the magnetometer is relatively susceptible to magnetic field interference, the magnetometer in the terminal needs to be calibrated so that the magnetometer can acquire accurate environmental data. In a current method for calibrating a magnetometer of an electronic device, a plurality of postures of the electronic device generally need to be adjusted to calibrate the electronic device. While some terminals, such as wearable devices, are limited in adjustable attitude angle, the current calibration method is not applicable to wearable devices. Therefore, how to calibrate the magnetometer of the terminal with limited adjustment posture is a subject of active research by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a calibration method of a magnetometer and related equipment. The convenience of calibrating the magnetometer can be improved.
In a first aspect, an embodiment of the present application provides a method for calibrating a magnetometer, where the method includes:
when the condition of calibrating the magnetometer is met, outputting prompt information, wherein the prompt information is used for prompting a user to execute a calibration action on a terminal, and the magnetometer is configured in the terminal;
acquiring magnetic data acquired by the magnetometer in the process of executing the calibration action by the user;
and calibrating the magnetometer according to the magnetic data.
In a second aspect, an embodiment of the present application provides a terminal, where the terminal includes:
a magnetometer;
a memory; and
a processor coupled with the memory;
wherein the memory is to store computer instructions;
the processor is configured to invoke the computer instructions to perform the method of the first aspect.
In a third aspect, an embodiment of the present application provides a terminal, where the terminal includes:
an input unit, a processing unit and an output unit;
the output unit is used for outputting prompt information when a condition for calibrating the magnetometer is met, wherein the prompt information is used for prompting a user to execute a calibration action on a terminal, and the magnetometer is configured in the terminal;
the input unit is used for acquiring magnetic data acquired by the magnetometer in the process of executing the calibration action by the user;
and the processing unit is used for calibrating the magnetometer according to the magnetic data.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium, comprising computer instructions for execution by a processor to implement the method in the first aspect.
In the embodiment of the application, when the condition for calibrating the magnetometer is met, prompt information can be output, and the prompt information is used for prompting a user to execute a calibration action on the terminal. And may acquire magnetometric data collected by the magnetometer during the user's performance of the calibration action. The magnetometer may then be calibrated based on the magnetic force data. Through the mode, the calibration efficiency of the magnetometer configured in the terminal, especially the wearable device, can be improved, and the convenience of calibrating the magnetometer can be improved.
Drawings
Fig. 1 is a schematic structural diagram of an application terminal according to an embodiment of the present application;
FIG. 2 is a schematic flowchart illustrating a method for calibrating a magnetometer according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a relative coordinate system of a calibration initial posture and a magnetometer when a user wears a hand-worn device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a relative coordinate system of a calibration initial posture and a magnetometer when a user wears a head-mounted device according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart illustrating another method for calibrating a magnetometer according to an embodiment of the present application;
FIG. 6 is a schematic flowchart of a calibration method for a magnetometer according to an embodiment of the present disclosure;
FIGS. 7A-7F are schematic diagrams of a prompt message provided by an embodiment of the present application;
fig. 8 is a unit composition diagram of a terminal according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
First, a brief introduction is made to an application scenario applied in the embodiment of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an application terminal according to an embodiment of the present application. As shown in fig. 1, the circuit board 20 configured in the terminal 10 is provided with a magnetometer 101, which can sense an external magnetic field and generate magnetic data based on the external magnetic field, and other components configured in the terminal 10, such as a processor, a controller, etc., can determine a current attitude or angle, etc. of the terminal 10 based on the magnetic data collected by the magnetometer. However, other components 102 disposed on the circuit board 20 may generate magnetic fields, which causes the other components to become interference sources of the magnetometer 101, that is, the magnetometer may sense the interference magnetic fields generated by the other components 102, and the magnetic data collected by the magnetometer includes interference data. In the embodiment of the application, the magnetometer is calibrated, namely, the interference data in the magnetic data collected by the magnetometer are removed, and the accuracy of the magnetic data collected by the magnetometer is improved.
Here, the terminal 10 may include a wearable device, such as a Head Mounted Display (HMD), smart glasses, a smart watch, a smart bracelet, or other user terminals configured with magnetometers, and the like, which are not limited herein.
The following describes an embodiment of a method in the embodiment of the present application with reference to the above application scenarios and accompanying drawings.
As shown in fig. 2, fig. 2 is a schematic flowchart of a calibration method for a magnetometer according to an embodiment of the present disclosure. The method may be performed by a terminal configured with a magnetometer as described above. As shown in fig. 2, the method includes at least the following steps.
Step S201, when the condition for calibrating the magnetometer is satisfied, outputting prompt information, wherein the prompt information is used for prompting a user to execute the calibration action of the magnetometer on the terminal.
For example, the condition for calibrating the magnetometer may be that a user triggers a calibration operation, or the terminal periodically calibrates the magnetometer, or calibrates the magnetometer in a product test stage, or the terminal calibrates the magnetometer before controlling the magnetometer to collect magnetic data. Here, the condition for calibrating the magnetometer is not limited.
Further, when the condition for calibrating the magnetometer is satisfied, prompt information can be output, and the prompt information is used for prompting a user to execute a calibration action on the terminal. The prompt message may be a voice prompt message, a text prompt message, an image prompt message, or a video prompt message, and the output form of the prompt message is not limited herein.
The user can learn the calibration action through the prompt information, and then the calibration action is executed on the terminal. During the user's execution of this calibration action, the magnetometer in the terminal can collect magnetic data.
Illustratively, the calibration action may be that the user rotates the terminal horizontally around a certain reference axis, or that the user moves the terminal up or down by symmetrical magnitudes, etc. For a detailed description of the calibration action, see below.
Alternatively, the user may be prompted to adjust the posture to a calibration start posture and determine the relative coordinate system of the magnetometer from the calibration start posture before the user performs the calibration action. The relative coordinate system of the magnetometer is that a three-axis coordinate system of x, y and z is established by taking the magnetometer as an origin.
For example, the user may be first prompted to wear the terminal and to adjust the posture to the calibration start posture.
For example, as shown in fig. 3, assuming that the terminal is a hand-worn device such as a smart bracelet or a smart watch, the calibration start gesture is that the user places the arm horizontally in front of the chest. Alternatively, as shown in fig. 4, when the terminal is a head-mounted display device, the calibration start posture is a position where the user's head is located when the user visually observes the front.
And after the user is monitored to adjust the posture to the initial calibration posture, a relative coordinate system of the magnetometer is determined, namely under the condition, the position of the magnetometer is the origin of coordinates.
In specific implementation, the terminal may determine the current posture of the user by using data collected by the configured acceleration sensor, gyroscope, gravity sensor, and the like, and then monitor whether the user adjusts the posture to the calibration start posture. Alternatively, the terminal determines the user's current posture using an arranged image pickup device or the like. And is not limited herein.
As shown in fig. 3 or as shown in fig. 4, the relative coordinate system of the magnetometer is established based on the user's calibration start gesture. Under the calibration initial posture, a plane where the x axis and the y axis are located is a horizontal reference plane, and a plane where the z axis and the y axis are located is a vertical reference plane. The z-axis represents the vertical direction. The relative coordinate system of the magnetometer is unchanged relative to the position relationship of the magnetometer, and changes in position with the change in position of the magnetometer; the relative position relationship between the horizontal reference plane and the vertical reference plane is unchanged, and the relative position relationship does not change along with the position change of the magnetometer.
After the calibration starting posture of the user is monitored, the user can be prompted to execute a calibration action on the terminal. For example, as shown in FIG. 3, the user is prompted to rotate horizontally about the body axis; alternatively, the user is prompted to raise the arm up or down until the arm is in a vertical orientation. Alternatively, as shown in fig. 4, the user is prompted to rotate horizontally about the body axis; or prompting the user to raise or lower the head until the gaze is in the vertical direction.
Of course, in the above example, the case where the user wears the terminal is taken as an example, and the calibration of the magnetometer may be realized by other calibration operations when the user does not wear the terminal, which is not limited herein.
Step S202, obtaining magnetic data collected by the magnetometer in the process of the user performing the calibration action.
Illustratively, the magnetometer may collect magnetic data in real time during a user's performance of a calibration action, wherein the magnetic data may be understood to include accurate magnetic data of the collected external magnetic field as well as interference data generated by other interference sources. The magnetic force data collected by the magnetometer may include first magnetic force data in an x-axis direction, second magnetic force data in a y-axis direction, and third magnetic force data in a z-axis direction.
The terminal may obtain the magnetic data collected by the magnetometer in real time, or obtain one or more magnetic data collected by the magnetometer according to other conditions, which is not limited herein.
Step S203, calibrating the magnetometer according to the magnetic data.
For example, the interference data may be determined according to the acquired magnetic data and the calibration action of the user, and then the interference data is removed from the magnetic data, so that the magnetometer may be calibrated. Specific implementations can be found in the following examples.
In the embodiment of the application, when the condition for calibrating the magnetometer is met, prompt information can be output, and the prompt information is used for prompting a user to execute a calibration action on the terminal. And may acquire magnetometric data collected by the magnetometer during the user's performance of the calibration action. The magnetometer may then be calibrated based on the magnetic force data. Through the mode, the calibration efficiency of the magnetometer configured in the terminal, especially the wearable device, can be improved, and the convenience of calibrating the magnetometer can be improved.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating another method for calibrating a magnetometer according to an embodiment of the present application. The method can be applied to the terminal, especially the wearable device. As shown in fig. 5, the method includes at least the following steps.
Step S501, outputting first prompt information when a condition for calibrating the magnetometer is met, wherein the first prompt information is used for prompting a user to execute a first calibration action; the first calibration action comprises horizontally rotating the terminal, and the rotation angle is greater than or equal to 360 degrees.
For example, the first calibration action may be to rotate the terminal horizontally, i.e. to keep the terminal on the same horizontal plane for one or more times of one revolution, i.e. to rotate the terminal by an angle greater than or equal to 360 degrees. In particular, the rotation angle may be 360 degrees or a multiple of 360 degrees. Here, if the relative coordinate system of the magnetometer is established by the calibration initial posture of the user, the horizontal plane described herein is a horizontal reference plane on which the x axis and the y axis are located.
Specifically, if the terminal worn by the user is a hand-worn device, the first calibration action may be to maintain the arm posture as a calibration start posture, and the user rotates one or more circles. If the terminal worn by the user is a head-mounted device, the first calibration action may be to maintain the eye level, and the user rotates one or more circles. I.e. the user needs to keep the x-axis and the y-axis in the relative coordinate system of the magnetometer on the horizontal reference plane during rotation.
Step S502, I first magnetic data acquired by the magnetometer in a process of the user performing the first calibration action are acquired, where the first magnetic data are magnetic data based on an x-axis direction in a relative coordinate system of the magnetometer, and I is a positive integer.
Step S503, acquiring J second magnetic data acquired by the magnetometer in the process of the user performing the first calibration action, where the second magnetic data is magnetic data based on the y-axis direction in the relative coordinate system of the magnetometer, and J is a positive integer.
For example, during the first calibration action performed by the user, the terminal may acquire only I first magnetic data and J second magnetic data acquired by the magnetometer. Wherein, I and J may be the same or different, and are not limited herein. The terminal may acquire the magnetic data collected by the magnetometer in real time or periodically, which is not limited herein. If the terminal periodically acquires the magnetic data acquired by the magnetometer, the magnetic data acquired by the terminal is the magnetic data acquired by the magnetometer on the basis of the position relative to the origin on the circular motion track formed by the first calibration motion.
In the process that the magnetometer moves on the horizontal reference surface, the terminal acquires the magnetic data in a manner that the magnetic data of the external magnetic field in the acquired magnetic data can be offset in pairs, so that the maximum value and the minimum value of the first magnetic data can be acquired, the sum of the maximum value and the minimum value of the acquired first magnetic data is divided by 2, and the first interference data acquired by the magnetometer in the x-axis direction can be acquired. Further, if the first magnetic data is acquired periodically, the average value of the maximum values of the first magnetic data and the average value of the minimum values of the first magnetic data may be acquired, and the sum of the acquired average value of the maximum values and the average value of the minimum values of the first magnetic data is divided by 2, so that the first interference data acquired by the magnetometer in the x-axis direction may be acquired. Similarly, the maximum value and the minimum value of the second magnetic data can be obtained, and the maximum value and the minimum value of the obtained second magnetic data are added and divided by 2, so that the second interference data collected by the magnetometer in the y-axis direction can be obtained. Further, if the second magnetic data is periodically acquired, the average value of the maximum values of the second magnetic data and the average value of the minimum values of the second magnetic data may be acquired, and the sum of the acquired average value of the maximum values and the average value of the minimum values of the second magnetic data is divided by 2, so that the second interference data acquired by the magnetometer in the y-axis direction can be acquired.
Step S504, outputting second prompt information, wherein the second prompt information is used for prompting a user to execute a second calibration action; wherein the second calibration action comprises moving the terminal to a first position that is vertically up and a second position that is vertically down.
Specifically, if the user wears the hand-worn device, the second prompt message may prompt the user to raise the hand until the arm is perpendicular to the horizontal reference plane, that is, the y-axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, where the position of the hand-worn device is the first position; the user can also be prompted to hang down the hand until the arm is perpendicular to the horizontal reference plane, that is, the y-axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, and the position of the hand-worn device is the second position.
Or if the user wears the head-mounted device, the second prompt message prompts the user to lift the head until the y axis in the relative coordinate system of the magnetometer is vertical to the horizontal reference plane, and the position of the head-mounted device is the first position; the user may also be prompted to lower his head until the y-axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, at which time the head mounted device is in the second position.
In one implementation, the terminal may determine the first location and the second location using data transmitted by a gravity sensor configured in the terminal.
Step S505, acquiring third magnetic data respectively acquired by the magnetometer when the terminal is placed at the first position and the second position; wherein the third magnetic data is magnetic data based on a z-axis direction in a relative coordinate system of the magnetometer.
Illustratively, the terminal may acquire third magnetic data acquired by the magnetometer at the first position and the second position, the third magnetic data being magnetic data acquired by the magnetometer in the z-axis direction. The interference data of the magnetometer in the z-axis direction can be obtained by adding and averaging the interference data, which can be described as third interference data in the embodiment of the present application.
Here, the execution sequence of steps S501 to S503 and steps S504 to S505 is not limited. That is, in another implementation, when the condition for calibrating the magnetometer is satisfied, step S504 to step S505 are executed first, and then step S501 to step S503 are executed.
Step S506, determining first interference data according to the I first magnetic force data; determining second interference data according to the J second magnetic force data; and determining an average value of the 2 third magnetic force data as third interference data.
Step S507, calibrating the magnetometer according to the first interference data, the second interference data, and the third interference data.
Illustratively, the magnetometer may be calibrated by the interference data in each direction determined above. Specifically, the three interference data may be removed from any one of the magnetic data collected by the magnetometer, so that the magnetometer may be calibrated. Specifically, the magnetic force data collected by the magnetometer includes data in the x-axis direction, data in the y-axis direction, and data in the z-axis direction. The calibrated magnetic data can be obtained by subtracting the first interference data from the data in the x-axis direction, subtracting the second interference data from the data in the y-axis direction and subtracting the third interference data from the data in the z-axis direction, so that the magnetometer is calibrated.
Referring to fig. 6, fig. 6 is a schematic flowchart illustrating a calibration method for a magnetometer according to an embodiment of the present disclosure. The method can be applied to the terminal, especially the wearable device. The method shown in fig. 6 may be implemented in combination with any one of the methods described in the above method embodiments. As shown in fig. 6, the method may include at least the following steps.
Step S601, in the process of the user performing the calibration action, monitoring whether the calibration action is in a deviation state.
Step S602, if it is monitored that the calibration motion is in the deviation state, outputting third prompt information, where the third prompt information is used to prompt a user that the calibration motion is in the deviation state.
For example, in the case where the user performs the first calibration operation, the calibration operation being in the deviated state means that the position of the magnetometer is deviated from the above-described horizontal reference plane. In the case where the user performs the second calibration operation, the fact that the calibration operation is in the deviated state means that the position of the magnetometer is deviated from the above-mentioned vertical reference plane.
In one implementation, whether the calibration action is in the deviation state may be determined by data collected by a sensor configured in the terminal. For example, the current position, the current posture and the like of the terminal may be determined according to data acquired by sensors such as an acceleration sensor, a gravity sensor, a gyroscope and the like configured in the terminal, and further, whether the calibration action is in a deviation state may be determined according to the current position, the current posture and the like of the terminal.
Optionally, the terminal may further determine, according to the deviation state, motion adjustment information corresponding to the deviation state. And can output the action adjustment information to prompt the user to adjust the calibration action in time. The motion adjustment information may be carried in the third prompt information or output simultaneously with the third prompt information, which is not limited herein. Alternatively, after determining that the calibration motion is in the deviation state, the deviation degree of the calibration motion may be further determined through data collected by sensors such as an acceleration sensor, a gravity sensor, and a gyroscope disposed in the terminal, and the motion adjustment information may be determined according to the deviation degree, which is not limited herein.
For example, as shown in fig. 7A to 7C, fig. 7A to 7C show a processing manner in which, in the case where the user performs the first calibration action, the first calibration action is in a deviated state. Where circle 701 represents a terminal or magnetometer and horizontal line 703 represents a horizontal reference plane.
As shown in fig. 7A, the positional relationship between the circle 701 and the horizontal line 703 is used to indicate that the deviation state of the first calibration operation is within the allowable range. In this case, the user keeps rotating horizontally.
As shown in FIG. 7B, the positional relationship between the circle 701 and the horizontal line 703 is used to indicate that the terminal or magnetometer is tilted during the movement, and the tilt is proportional to the angle between the center line of the circle 701 and the horizontal line 703. The state shown in fig. 7B indicates that during the calibration movement the x-axis of the relative coordinate system of the magnetometer is at an angle to the horizontal reference plane, i.e. the above-mentioned tilt state occurs, wherein a larger angle indicates a higher degree of tilt. In this case, the user may adjust the tilt angle of the terminal in the reverse direction based on the pattern shown in fig. 7B so that it is not tilted any more. For example, in the situation shown in fig. 7B, the user may turn the head to the left while wearing the head-mounted device until the x-axis is on the horizontal reference plane, i.e., the center line of the displayed circle 701 is no longer tilted.
As shown in fig. 7C, the positional relationship between the circle 701 and the horizontal line 703 is used to indicate that an included angle between the y-axis of the relative coordinate system of the magnetometer and the reference horizontal plane occurs during the movement of the terminal or the magnetometer, that is, the center line of the circle 701 in fig. 7C is separated from the horizontal line 703. Wherein the degree of separation is proportional to the parallel distance between the centerline of the circle 701 and the horizontal line 703. I.e., the greater the angle of the y-axis from the reference horizontal, the greater the degree of separation. In this case, the user may adjust the terminal position in the reverse direction to be on the reference level based on the pattern displayed in fig. 7C. For example, in the case shown in fig. 7C, the user may lower his head down to be on the reference level when wearing the head-mounted device.
Of course, the motion adjustment information may be displayed in other manners, which is not limited herein. For another example, as shown in fig. 7D to 7F, fig. 7D to 7F illustrate a processing method in which a user performs a second calibration operation, and the second calibration operation is in a deviated state. Where circle 705 represents a terminal or magnetometer, horizontal line 707 represents a horizontal reference plane, vertical line 709 represents a vertical reference plane, and icon 710 represents a pointing user to do a second calibration movement upwards. Wherein, the second calibration action can be raising the head upwards, or lifting the arm upwards, etc. Here, the horizontal reference plane is formed by the x-axis and the y-axis in the relative coordinate system of the magnetometer in the calibration start posture of the user, and the vertical reference plane is formed by the y-axis and the z-axis in the relative coordinate system of the magnetometer in the calibration start posture of the user. The relative position relationship between the horizontal reference plane and the vertical reference plane is unchanged, and the relative position relationship does not change along with the position change of the magnetometer.
As shown in fig. 7D, the positional relationship between the circle 705 and the horizontal line 707 and the vertical line 709 is used to indicate that the deviation state of the second calibration action is within the allowable range, that is, the center point of the circle 705 coincides with the intersection of the horizontal line 707 and the vertical line 709, in which case the user continues to perform the second calibration action.
As shown in FIG. 7E, the center point of circle 705 deviates from the vertical line 709, indicating that the x-axis in the relative coordinate system of the magnetometer is no longer perpendicular to the vertical reference plane, and that the greater the difference from 90 degrees, the greater the degree of deviation. In this case, the user can adjust the second check motion rightward based on the display pattern in fig. 7E until the center point of the circle 705 returns to a state where the intersection of the horizontal line 707 and the vertical line 709 coincides.
As shown in FIG. 7F, the center point of circle 705 is offset from the horizontal line 707, indicating that the y-axis in the relative coordinate system of the magnetometer is no longer perpendicular to the horizontal reference plane. The greater the difference between its angle to the horizontal reference plane and 90 degrees, the greater the degree of deviation. In this case, the user can adjust the second verification operation downward based on the display pattern of fig. 7F until the center point of the circle 705 returns to a state where the intersection of the horizontal line 707 and the vertical line 709 coincides.
The following describes an embodiment of the apparatus in the embodiment of the present application with reference to the drawings.
Referring to fig. 8, fig. 8 is a block diagram of a processing device of a terminal according to an embodiment of the present disclosure. As shown in fig. 8, the terminal may include an input unit 801, a processing unit 803, and an output unit 805.
The output unit 805 is configured to output prompt information when a condition for calibrating a magnetometer is met, where the prompt information is used to prompt a user to perform a calibration action of the magnetometer on a terminal;
the input unit 801 is configured to acquire magnetic data acquired by the magnetometer in the process of the user performing the calibration action;
the processing unit 803 is configured to calibrate the magnetometer according to the magnetic data.
The functional unit may also implement part or all of the methods described in the above method embodiments, and details are not described herein again.
The functional units may be implemented based on the structure of the terminal shown in fig. 9, which is not limited herein.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure. As shown in fig. 9, the terminal may include a memory 901, a processor 903, a magnetometer 905, and an acceleration sensor 907. Wherein the above elements are coupled by a communication bus.
Memory 901 is used to store applications, computer instructions and data; the processor 903 is used for calling computer instructions and data to execute any one of the methods executed by the terminal; the magnetometer 905 is used for acquiring magnetic data and sending the magnetic data to the processor 903. The acceleration sensor 907 or other sensors are used to collect data and send the data to the processor 903, and the processor 903 may determine the posture, the motion, etc. of the terminal according to the received data, which is not limited herein.
The processor 903 may also include a Central Processing Unit (CPU). Alternatively, the processor 903 may be understood as a controller.
The memory 901 may include a read-only memory and a random access memory, and provides instructions and data, etc. to the processor 903. A portion of memory 901 may also include non-volatile random access memory. For example, a computer-readable storage medium may include computer instructions, application programs, an operating system, and the like. The components are coupled together in a particular application, for example, by a bus system. The bus system may include a power bus, a control bus, a status signal bus, and the like, in addition to the data bus. For clarity of illustration, however, the various buses are labeled as a bus system in the figures.
The method disclosed by the above embodiments of the present invention can be implemented by the processor 903. The processor 903 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 903. The processor 903 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, discrete gate or transistor logic, or discrete hardware components. The processor 903 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. The processor 903 may be an image processor, a microprocessor, or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 901, and for example, the processor 903 may read an application program, a computer instruction, or data in the memory 901, and complete the steps of the above method executed by the terminal in combination with hardware thereof.
For example, the processor 903 is used to call the computer instructions to perform the following method:
when the condition for calibrating the magnetometer is met, outputting prompt information, wherein the prompt information is used for prompting a user to execute the calibration action of the magnetometer on a terminal;
acquiring magnetic data acquired by the magnetometer in the process of executing the calibration action by the user;
and calibrating the magnetometer according to the magnetic data.
Of course, the processor 903 may also call a computer instruction to execute any one of the methods in the above method embodiments, which is not described herein again.
A computer readable storage medium is provided in an embodiment of the present application, and includes computer instructions for being executed by a processor to implement any one of the above method embodiments.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (16)

  1. A method of calibrating a magnetometer, comprising:
    when the condition for calibrating the magnetometer is met, outputting prompt information, wherein the prompt information is used for prompting a user to execute the calibration action of the magnetometer on a terminal;
    acquiring magnetic data acquired by the magnetometer in the process of executing the calibration action by the user;
    and calibrating the magnetometer according to the magnetic data.
  2. The calibration method according to claim 1,
    the outputting the prompt message comprises:
    outputting first prompt information, wherein the first prompt information is used for prompting a user to execute a first calibration action; the first calibration action comprises horizontally rotating the terminal, wherein the rotation angle is greater than or equal to 360 degrees;
    the acquiring magnetic data collected by the magnetometer in the process of the user performing the calibration action includes:
    acquiring I pieces of first magnetic data acquired by the magnetometer in the process that the user executes the first calibration action, wherein the first magnetic data are based on the magnetic data in the x-axis direction in a relative coordinate system of the magnetometer, and I is a positive integer;
    acquiring J second magnetic data acquired by the magnetometer in the process that the user executes the first calibration action, wherein the second magnetic data is magnetic data based on the y-axis direction in a relative coordinate system of the magnetometer, and J is a positive integer.
  3. The calibration method of claim 2, wherein said calibrating said magnetometer from said magnetometric data comprises:
    determining first interference data according to the I first magnetic force data;
    determining second interference data according to the J second magnetic force data;
    calibrating the magnetometer according to the first interference data and the second interference data.
  4. The calibration method according to claim 1,
    the outputting the prompt message comprises:
    outputting second prompt information, wherein the second prompt information is used for prompting the user to execute a second calibration action;
    wherein the second calibration action comprises moving the terminal to a first position that is vertically up and to a second position that is vertically down;
    the acquiring magnetic data collected by the magnetometer in the process of the user performing the calibration action includes:
    acquiring third magnetic data respectively acquired by the magnetometer when the terminal is placed at the first position and the second position; wherein the third magnetic data is magnetic data based on a z-axis direction in a relative coordinate system of the magnetometer.
  5. The calibration method of claim 4, wherein said calibrating said magnetometer from said magnetic data comprises:
    determining an average value of the 2 third magnetic force data as third interference data;
    and calibrating the magnetometer according to the third interference data.
  6. The calibration method according to any one of claims 1 to 5, wherein the method further comprises:
    monitoring whether the calibration action is in a deviation state or not during the process that the user executes the calibration action;
    and if the calibration action is monitored to be in the deviation state, outputting third prompt information, wherein the third prompt information is used for prompting a user that the calibration action is in the deviation state.
  7. The calibration method according to claim 6, wherein the method further comprises:
    if the calibration action is monitored to be in a deviation state, determining action adjustment information corresponding to the deviation state;
    and outputting the action adjusting information to prompt a user to adjust the calibration action according to the action adjusting information.
  8. A terminal, comprising:
    a magnetometer;
    a memory; and
    a processor coupled with the memory;
    wherein the memory is to store computer instructions;
    the processor is configured to invoke the computer instructions to perform the method of:
    when the condition for calibrating the magnetometer is met, outputting prompt information, wherein the prompt information is used for prompting a user to execute the calibration action of the magnetometer on a terminal;
    acquiring magnetic data acquired by the magnetometer in the process of executing the calibration action by the user;
    and calibrating the magnetometer according to the magnetic data.
  9. The terminal of claim 8, wherein the processor is further configured to invoke the computer instructions to perform the method of:
    outputting first prompt information, wherein the first prompt information is used for prompting a user to execute a first calibration action; the first calibration action comprises horizontally rotating the terminal, wherein the rotation angle is greater than or equal to 360 degrees;
    acquiring I pieces of first magnetic data acquired by the magnetometer in the process that the user executes the first calibration action, wherein the first magnetic data are based on the magnetic data in the x-axis direction in a relative coordinate system of the magnetometer, and I is a positive integer;
    acquiring J second magnetic data acquired by the magnetometer in the process that the user executes the first calibration action, wherein the second magnetic data is magnetic data based on the y-axis direction in a relative coordinate system of the magnetometer, and J is a positive integer.
  10. The terminal of claim 9, wherein the processor is further configured to invoke the computer instructions to perform the method of:
    determining first interference data according to the I first magnetic force data;
    determining second interference data according to the J second magnetic force data;
    calibrating the magnetometer according to the first interference data and the second interference data.
  11. The terminal of claim 8, wherein the processor is further configured to invoke the computer instructions to perform the method of:
    outputting second prompt information, wherein the second prompt information is used for prompting the user to execute a second calibration action;
    wherein the second calibration action comprises moving the terminal to a first position that is vertically up and to a second position that is vertically down;
    acquiring third magnetic data respectively acquired by the magnetometer when the terminal is placed at the first position and the second position; wherein the third magnetic data is magnetic data based on a z-axis direction in a relative coordinate system of the magnetometer.
  12. The terminal of claim 11, wherein the processor calibrates the magnetometer based on the magnetic data, comprising:
    determining an average value of the 2 third magnetic force data as third interference data;
    and calibrating the magnetometer according to the third interference data.
  13. The terminal of any of claims 8-12, wherein the processor is further configured to invoke the computer instructions to perform the method of:
    while the user performs the calibration action, monitoring whether the calibration action is in a deviating state;
    and if the calibration action is monitored to be in the deviation state, outputting third prompt information, wherein the third prompt information is used for prompting a user that the calibration action is in the deviation state.
  14. The terminal of claim 13, wherein the processor is further configured to invoke the computer instructions to perform the method of:
    if the calibration action is monitored to be in a deviation state, determining action adjustment information corresponding to the deviation state;
    and outputting the action adjusting information to prompt a user to adjust the calibration action according to the action adjusting information.
  15. A terminal, comprising: an input unit, a processing unit and an output unit;
    the output unit is used for outputting prompt information when a condition for calibrating the magnetometer is met, wherein the prompt information is used for prompting a user to execute a calibration action of the magnetometer on a terminal;
    the input unit is used for acquiring magnetic data acquired by the magnetometer in the process of executing the calibration action by the user;
    and the processing unit is used for calibrating the magnetometer according to the magnetic data.
  16. A computer readable storage medium comprising computer instructions for execution by a processor to implement the method of any one of claims 1 to 7.
CN201780097424.6A 2017-12-27 2017-12-27 Calibration method for magnetometer and related equipment Pending CN111433562A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/119115 WO2019127139A1 (en) 2017-12-27 2017-12-27 Calibration method for magnetometer and related device

Publications (1)

Publication Number Publication Date
CN111433562A true CN111433562A (en) 2020-07-17

Family

ID=67062792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780097424.6A Pending CN111433562A (en) 2017-12-27 2017-12-27 Calibration method for magnetometer and related equipment

Country Status (2)

Country Link
CN (1) CN111433562A (en)
WO (1) WO2019127139A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112762914A (en) * 2020-12-18 2021-05-07 易瓦特科技股份公司 Electromagnetic measurement method, device, equipment and storage medium based on electronic magnetometer
CN115655310A (en) * 2022-10-26 2023-01-31 荣耀终端有限公司 Data calibration method, electronic device and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100312513A1 (en) * 2009-06-05 2010-12-09 Apple Inc. Restoring and Storing Magnetometer Calibration Data
CN103884326A (en) * 2012-12-21 2014-06-25 北京合众思壮科技股份有限公司 Electronic compass electronic compass
US20160178371A1 (en) * 2014-12-17 2016-06-23 Honeywell International Inc. Magnetic sensor calibration for aircraft
CN105910593A (en) * 2016-04-12 2016-08-31 广东欧珀移动通信有限公司 Method and apparatus for calibrating geomagnetic sensor of terminal
CN106153025A (en) * 2016-06-17 2016-11-23 上海拓攻机器人有限公司 Many rotor wing unmanned aerial vehicles and the calibration steps of electronic compass, system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120098525A1 (en) * 2010-10-26 2012-04-26 Research In Motion Limited System and Method for Calibrating a Magnetometer According to Device States
CN102620725B (en) * 2012-03-16 2015-02-11 惠州Tcl移动通信有限公司 Method for calibrating compasses of mobile devices
US20160327389A1 (en) * 2015-05-06 2016-11-10 Gopro, Inc. Calibration Transfer Between Two Devices
CN105571614B (en) * 2015-12-14 2018-05-29 广东欧珀移动通信有限公司 magnetic sensor calibration method and device
CN105700041B (en) * 2016-01-20 2017-11-24 广东欧珀移动通信有限公司 A kind of Magnetic Sensor adjustment controlling means and user terminal
CN106225806B (en) * 2016-07-06 2019-10-25 Oppo广东移动通信有限公司 Calibrate the method, device and mobile terminal of Magnetic Sensor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100312513A1 (en) * 2009-06-05 2010-12-09 Apple Inc. Restoring and Storing Magnetometer Calibration Data
CN103884326A (en) * 2012-12-21 2014-06-25 北京合众思壮科技股份有限公司 Electronic compass electronic compass
US20160178371A1 (en) * 2014-12-17 2016-06-23 Honeywell International Inc. Magnetic sensor calibration for aircraft
CN105910593A (en) * 2016-04-12 2016-08-31 广东欧珀移动通信有限公司 Method and apparatus for calibrating geomagnetic sensor of terminal
CN106153025A (en) * 2016-06-17 2016-11-23 上海拓攻机器人有限公司 Many rotor wing unmanned aerial vehicles and the calibration steps of electronic compass, system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112762914A (en) * 2020-12-18 2021-05-07 易瓦特科技股份公司 Electromagnetic measurement method, device, equipment and storage medium based on electronic magnetometer
CN115655310A (en) * 2022-10-26 2023-01-31 荣耀终端有限公司 Data calibration method, electronic device and readable storage medium
CN115655310B (en) * 2022-10-26 2024-04-05 荣耀终端有限公司 Data calibration method, electronic device and readable storage medium

Also Published As

Publication number Publication date
WO2019127139A1 (en) 2019-07-04

Similar Documents

Publication Publication Date Title
US20190220166A1 (en) Method of providing user interaction with a wearable device and wearable device thereof
US10197587B2 (en) Device and method for using time rate of change of sensor data to determine device rotation
CN103809752B (en) The portable terminal and its display methods of controllable display location
US20190156791A1 (en) Screen display method, apparatus and mobile terminal
JP5469670B2 (en) Geomagnetic detector
JP6648515B2 (en) Electronic device, its angular velocity acquisition method, and angular velocity acquisition program
US20150286279A1 (en) Systems and methods for guiding a user during calibration of a sensor
KR20160025687A (en) Wearable watch and display method thereof
JP6334601B2 (en) Portable information terminal, wearing arm judgment method, wearing direction judgment method, and program
JP2019078560A (en) Gyro sensor offset correcting device, offset correction program, and pedestrian autonomous navigation device
CN106095372A (en) A kind of display control method and electronic equipment
CN111433562A (en) Calibration method for magnetometer and related equipment
JP5937137B2 (en) Geomagnetic detector
JP2014048239A (en) Electronic apparatus and program
KR20220006869A (en) Electronic device and method for calibrating geomagnetic sensor
US10678337B2 (en) Context aware movement recognition system
CN106201022B (en) A kind of processing method and mobile terminal of mobile terminal
US20230135255A1 (en) Apparatus and method for identifying head gestures
JP2013250707A (en) Spatial position coordinate input device
CN113053074A (en) Sitting posture monitoring method
TWI635318B (en) Head mounted display, control method, and non-transitory computer-readable medium
US11809640B2 (en) Method for detecting movement of ring controller, ring controller, and computer readable medium
US20240112421A1 (en) System and method of object tracking for extended reality environment
US12118155B2 (en) Information processing device and information processing method
US20240353508A1 (en) Method related to magnetic field interference and sensing system

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Building 43, Dayun software Town, No. 8288 Longgang Avenue, Henggang street, Longgang District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Ruoyu Technology Co.,Ltd.

Address before: Building 43, Dayun software Town, No. 8288 Longgang Avenue, Henggang street, Longgang District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN ROYOLE TECHNOLOGIES Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200717