WO2019127139A1 - Calibration method for magnetometer and related device - Google Patents

Calibration method for magnetometer and related device Download PDF

Info

Publication number
WO2019127139A1
WO2019127139A1 PCT/CN2017/119115 CN2017119115W WO2019127139A1 WO 2019127139 A1 WO2019127139 A1 WO 2019127139A1 CN 2017119115 W CN2017119115 W CN 2017119115W WO 2019127139 A1 WO2019127139 A1 WO 2019127139A1
Authority
WO
WIPO (PCT)
Prior art keywords
magnetometer
data
user
calibration
terminal
Prior art date
Application number
PCT/CN2017/119115
Other languages
French (fr)
Chinese (zh)
Inventor
谢俊
王记
Original Assignee
深圳市柔宇科技有限公司
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 深圳市柔宇科技有限公司 filed Critical 深圳市柔宇科技有限公司
Priority to PCT/CN2017/119115 priority Critical patent/WO2019127139A1/en
Priority to CN201780097424.6A priority patent/CN111433562A/en
Publication of WO2019127139A1 publication Critical patent/WO2019127139A1/en

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

Definitions

  • the present application relates to the field of magnetometer technology, and in particular, to a calibration method of a magnetometer and related equipment.
  • a variety of sensors can be configured in the electronic device, and a plurality of sensors are used to collect environmental data.
  • the electronic device can make decisions based on environmental data collected by the sensors, thereby implementing intelligentization of the electronic devices.
  • more and more electronic devices are equipped with a magnetometer, which can detect the magnetic field of a magnetic field in a certain direction, and the magnetometer can be applied to an electronic compass or an angle measurement.
  • a magnetometer which can detect the magnetic field of a magnetic field in a certain direction
  • the magnetometer can be applied to an electronic compass or an angle measurement.
  • terminals such as wearable devices
  • more and more terminals are equipped with magnetometers. The terminal can use the magnetometer to achieve more functions, thereby improving the user experience.
  • the magnetometer is more susceptible to magnetic field interference
  • the magnetometer in the terminal needs to be calibrated to enable the magnetometer to capture accurate environmental data.
  • it is usually necessary to adjust various postures of the electronic device to implement calibration of the electronic device. While some terminals, such as wearable devices, have limited adjustable attitude angles, current calibration methods are not suitable for wearable devices. Therefore, how to calibrate the magnetometer in the terminal with limited adjustment posture has become an issue actively studied by those skilled in the art.
  • the embodiment of the present application provides a calibration method of a magnetometer and related equipment. Improves the convenience of calibration of the magnetometer.
  • an embodiment of the present application provides a calibration method for a magnetometer, the method comprising:
  • the prompt information is output, and the prompt information is used to prompt the user to perform a calibration action on the terminal, where the magnetometer is disposed in the terminal;
  • the magnetometer is calibrated based on the magnetic force data.
  • the embodiment of the present application provides a terminal, where the terminal includes:
  • a processor coupled to the memory
  • memory is used to store computer instructions
  • the processor is operative to invoke the computer instructions to perform the method of the first aspect.
  • an embodiment of the present application provides a terminal, where the terminal includes:
  • Input unit processing unit and output unit
  • the output unit is configured to output prompt information when the condition for calibrating the magnetometer is satisfied, where the prompt information is used to prompt the user to perform a calibration action on the terminal, where the magnetometer is disposed in the terminal;
  • the input unit is configured to acquire magnetic data collected by the magnetometer during the user performing the calibration action
  • the processing unit is configured to calibrate the magnetometer according to the magnetic force data.
  • an embodiment of the present application provides a computer readable storage medium, including computer instructions for being executed by a processor to implement the method in the first aspect.
  • the prompt information when the condition for calibrating the magnetometer is satisfied, the prompt information may be output, and the prompt information is used to prompt the user to perform a calibration action on the terminal. And the magnetic data collected by the magnetometer during the user performing the calibration action can be obtained. Further, the magnetometer can be calibrated based on the magnetic force data. In the above manner, 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.
  • FIG. 1 is a schematic structural diagram of an application terminal according to an embodiment of the present application.
  • FIG. 2 is a schematic flow chart of a calibration method of a magnetometer according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a calibration start posture and a relative coordinate system of a magnetometer in a case where a user wears a hand-held device according to an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a calibration start posture and a relative coordinate system of a magnetometer in a case where a user wears a head mounted device according to an embodiment of the present application;
  • FIG. 5 is a schematic flow chart of another method for calibrating a magnetometer according to an embodiment of the present application.
  • FIG. 6 is a schematic flow chart of still another calibration method of a magnetometer according to an embodiment of the present application.
  • FIGS. 7A-7F are schematic diagrams of prompt information provided by an embodiment of the present application.
  • FIG. 8 is a structural diagram of a unit of a terminal according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of an application terminal according to an embodiment of the present application.
  • the circuit board 20 disposed on the terminal 10 is provided with a magnetometer 101, which can sense an external magnetic field and generate magnetic data based on an external magnetic field, and other components configured in the terminal 10, such as a processor and a controller.
  • the current posture or angle of the terminal 10 can be determined based on the magnetic force data collected by the magnetometer.
  • other components 102 disposed on the circuit board 20 may generate a magnetic field, which causes other components to become a source of interference of the magnetometer 101, that is, the magnetometer may perceive the interference magnetic field generated by the other components 102, collected by the magnetometer.
  • Interference data is included in the magnetic data.
  • the calibration of the magnetometer refers to removing the interference data in the magnetic data collected by the magnetometer and improving the accuracy of the magnetic data collected by the magnetometer.
  • 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 terminal configured with a magnetometer, etc., limited.
  • a wearable device such as a head mounted display (HMD), smart glasses, a smart watch, a smart bracelet, or other user terminal configured with a magnetometer, etc., limited.
  • HMD head mounted display
  • smart glasses smart glasses
  • smart watch a smart bracelet
  • other user terminal configured with a magnetometer, etc., limited.
  • FIG. 2 is a schematic flowchart diagram of a calibration method of a magnetometer according to an embodiment of the present application.
  • the method can be performed by the terminal configured with the magnetometer described above.
  • the method includes at least the following steps.
  • step S201 when the condition for calibrating the magnetometer is satisfied, the prompt information is output, and the prompt information is used to prompt the user to perform a calibration operation of the magnetometer on the terminal.
  • the condition for calibrating the magnetometer may be that the user triggers a calibration operation, or the terminal periodically calibrates the magnetometer, or calibrates the magnetometer during the product testing phase, or the terminal controls the magnetometer before acquiring the magnetic data. , Calibrate the magnetometer.
  • the conditions for calibrating the magnetometer are not limited.
  • the prompt information may be output, and the prompt information is used to prompt the user to perform a calibration action on the terminal.
  • the prompt information may be voice prompt information, text prompt information, image prompt information, or video prompt information, etc., and the output form of the prompt information is not limited herein.
  • the user can learn the calibration action and perform the calibration action on the terminal.
  • the magnetometer in the terminal can acquire magnetic data.
  • the calibration action may be that the user rotates the terminal horizontally about a certain reference axis, or the user moves the terminal up or down by a symmetric amplitude or the like.
  • the calibration action see below.
  • the user may be prompted to adjust the posture to the calibration start posture before the user performs the calibration action, and determine the relative coordinate system of the magnetometer according to the calibration start posture.
  • the relative coordinate system of the magnetometer refers to the three-axis coordinate system of x, y, and z with the magnetometer as the origin.
  • the user may be prompted to wear the terminal first, and the user is prompted to adjust the posture to the calibration start posture.
  • the calibration starting posture is that the user places the arm horizontally on the chest.
  • the calibration start posture is the position of the user's head when the user visually looks ahead.
  • the relative coordinate system of the magnetometer is determined, that is, in this case, the position of the magnetometer is the coordinate origin.
  • the terminal can determine the current posture of the user by using data collected by the configured acceleration sensor, gyroscope, gravity sensor, etc., and then monitor whether the user adjusts the posture to the calibration start posture.
  • the terminal determines the current posture of the user using the configured imaging device or the like. This is not limited here.
  • the relative coordinate system of the magnetometer is established based on the user's calibration starting posture.
  • the plane where the x-axis and the y-axis are located is the horizontal reference plane
  • the plane where the z-axis and the y-axis are located is the vertical reference plane.
  • the z axis represents the vertical direction.
  • the user can be prompted to perform a calibration action on the terminal. For example, as shown in Figure 3, the user is prompted to rotate horizontally with the body as the axis; or, the user is prompted to raise the arm up or down until the arm is in the vertical direction. Alternatively, as shown in FIG. 4, the user is prompted to rotate horizontally with the body as the axis; or the user is prompted to raise or lower the head until the eye is in the vertical direction.
  • the user wears the terminal as an example for description.
  • the calibration of the magnetometer can be implemented by other calibration actions, which is not limited herein.
  • Step S202 Acquire magnetic data collected by the magnetometer during the user performing the calibration action.
  • the magnetometer can acquire magnetic data in real time during a user performing a calibration action, wherein the magnetic data can be understood to include accurate magnetic data of the acquired external magnetic field and interference data generated by other sources of interference.
  • the magnetic force data collected by the magnetometer may include first magnetic force data in the x-axis direction, second magnetic force data in the y-axis direction, and third magnetic force data in the z-axis direction.
  • the terminal can 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 force data.
  • the magnetometer can be calibrated according to the acquired magnetic data and the calibration action of the user to determine the interference data, and then remove the interference data in the magnetic data.
  • the magnetometer can be calibrated according to the acquired magnetic data and the calibration action of the user to determine the interference data, and then remove the interference data in the magnetic data.
  • the prompt information when the condition for calibrating the magnetometer is satisfied, the prompt information may be output, and the prompt information is used to prompt the user to perform a calibration action on the terminal. And the magnetic data collected by the magnetometer during the user performing the calibration action can be obtained. Further, the magnetometer can be calibrated based on the magnetic force data. In the above manner, the calibration efficiency of the magnetometer configured in the terminal, especially in the wearable device, can be improved, and the convenience of calibrating the magnetometer can be improved.
  • FIG. 5 is a schematic flowchart diagram of another method for calibrating a magnetometer according to an embodiment of the present application.
  • the method can be applied to terminals, especially wearable devices. As shown in FIG. 5, the method includes at least the following steps.
  • Step S501 when the condition for calibrating the magnetometer is satisfied, outputting first prompt information, the first prompt information is used to prompt the user to perform the first calibration action; wherein the first calibration action includes performing the terminal Rotate horizontally with a rotation angle greater than or equal to 360 degrees.
  • the first calibration action may be to rotate the terminal horizontally, i.e., to maintain the terminal at a multiple of one or one revolution of the terminal on the same horizontal plane, i.e., the angle of rotation is greater than or equal to 360 degrees.
  • the angle of rotation may be a multiple of 360 degrees or 360 degrees.
  • the horizontal plane described herein is the horizontal reference plane where the x-axis and the y-axis are located.
  • the first calibration action may be to maintain the arm posture as a calibration start posture, and the user rotates one week or more. If the terminal worn by the user is a head mounted device, the first calibration action may be to maintain the line of sight level, and the user rotates one week or more. That is, 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 the rotation.
  • Step S502 acquiring one first magnetic data collected by the magnetometer during the performing the first calibration action by the user, wherein the first magnetic data is in a relative coordinate system based on the magnetometer Magnetic data in the x-axis direction, I is a positive integer.
  • Step S503 acquiring J second magnetic data collected by the magnetometer in the process of the user performing the first calibration action, wherein the second magnetic force data is in a relative coordinate system based on the magnetometer Magnetic data in the y-axis direction, J is a positive integer.
  • the terminal may only acquire the first first magnetic data and the J second magnetic data collected by the magnetometer.
  • I and J may be the same or different, and are not limited herein.
  • the terminal can 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 collected by the magnetometer, the magnetic data acquired by the terminal is the magnetic data collected by the magnetometer based on the relative position of the origin on the circular motion trajectory formed by the first calibration action.
  • the magnetic data of the external magnetic field in the magnetic data acquired by the terminal through the above-mentioned method of acquiring the magnetic data may be relatively offset in pairs, and therefore, the maximum value of the first magnetic data may be acquired.
  • the minimum value is obtained by summing the maximum value and the minimum value of the acquired first magnetic force data and dividing by 2 to obtain the first interference data collected by the magnetometer in the x-axis direction. Further, if the first magnetic force data is periodically acquired, an average value of the maximum value of the first magnetic force data and an average value of the minimum value of the first magnetic force data may be acquired, and an average of the maximum values of the acquired first magnetic force data may be obtained.
  • the sum of the value and the minimum value is divided by 2 to obtain the first interference data collected by the magnetometer in the x-axis direction.
  • the maximum value and the minimum value of the second magnetic force data can be obtained, and the maximum value and the minimum value of the acquired second magnetic force data are summed and divided by 2, and the second magnetometer can be acquired in the y-axis direction. Interfere with data. Further, if the second magnetic force data is periodically acquired, an average value of the maximum value of the second magnetic force data and an average value of the minimum value of the second magnetic force data may be acquired, and the obtained maximum value of the second magnetic force data may be obtained. The sum of the average value and the minimum value is divided by 2 to obtain the second interference data collected by the magnetometer in the y-axis direction.
  • Step S504 outputting second prompt information, the second prompt information is used to prompt the user to perform a second calibration action, wherein the second calibration action comprises moving the terminal to a first position vertically upward and vertically downward The second position.
  • the second prompt information may prompt the user to raise the hand until the arm is perpendicular to the horizontal reference plane, that is, the y-axis and the horizontal reference plane in the relative coordinate system of the magnetometer.
  • the position of the hand-held device is the first position; the user may 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.
  • the position of the hand-held device is the second position.
  • the second prompt message prompts the user to raise the head until the y axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, and the position of the head mounted device is the first position.
  • the user may also be prompted to bow until the y-axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, and the position of the head-mounted device is the second position.
  • the terminal may determine the first location and the second location by using data transmitted by the gravity sensor configured by the terminal.
  • Step S505 acquiring third magnetic force data respectively collected by the magnetometer when the terminal is placed in the first position and placed in the second position; wherein the third magnetic force data is based on the magnetometer Magnetic data in the z-axis direction of the relative coordinate system.
  • the terminal may acquire third magnetic force data collected by the magnetometer in the first position and the second position, the third magnetic force data being magnetic data in the z-axis direction collected by the magnetometer.
  • the averaging sum is added to obtain the interference data of the magnetometer in the z-axis direction, which can be described as the third interference data in the embodiment of the present application.
  • steps S501 to S503 and steps S504 to S505 are not limited. That is, in another implementation manner, when the condition for calibrating the magnetometer is satisfied, steps S504 to S505 are performed first, and then steps S501 to S503 are performed.
  • Step S506 determining first interference data according to the first first magnetic data, determining second interference data according to the J second magnetic data, and determining an average value of the two third magnetic data is Three interference data.
  • Step S507 calibrating the magnetometer according to the first interference data, the second interference data and the third interference data.
  • the magnetometer can be calibrated by the interference data in the above-identified directions. Specifically, the magnetometer can be calibrated by removing the three interference data from any one of the magnetic data collected by the magnetometer.
  • 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.
  • FIG. 6 is a schematic flowchart diagram of another calibration method of a magnetometer according to an embodiment of the present application.
  • the method can be applied to terminals, especially wearable devices.
  • the method shown in FIG. 6 can be implemented in combination with any of the methods described in the foregoing method embodiments. As shown in FIG. 6, the method can 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 detected that the calibration action is in a deviation state, outputting a third prompt information, the third prompt information is used to prompt the user that the calibration action is in a deviation state.
  • the calibration action in the off state means that the position of the magnetometer deviates from the horizontal reference plane.
  • the deviation of the calibration operation means that the position of the magnetometer deviates from the vertical reference plane.
  • the data collected by the sensors configured in the terminal can be used to determine whether the calibration action is in a deviated state.
  • the data collected by the sensors such as the acceleration sensor, the gravity sensor, and the gyroscope configured in the terminal can determine the current location of the terminal, the current posture, and the like, and can be based on the current location of the terminal and the current posture. Information such as to determine if the calibration action is in a deviating state.
  • the terminal may further determine action adjustment information corresponding to the deviation state according to the deviation state.
  • the action adjustment information can be output to prompt the user to adjust the calibration action in time.
  • the action adjustment information may be carried in the third prompt information or outputted simultaneously with the third prompt information, which is not limited herein.
  • the data collected by the sensors such as the acceleration sensor, the gravity sensor, and the gyroscope configured in the terminal may further determine the degree of deviation of the calibration action, and determine according to the degree of deviation.
  • the motion adjustment information is not limited herein.
  • FIGS. 7A to 7C illustrate a processing manner in which the first calibration action occurs in a state in which the user performs the first calibration action.
  • circle 701 represents a terminal or magnetometer and horizontal line 703 represents a horizontal reference plane.
  • the positional relationship of the circle 701 and the horizontal line 703 is used to indicate that the deviation state of the first calibration action is within the allowable range. In this case, the user remains horizontally rotated.
  • the positional relationship between the circle 701 and the horizontal line 703 is used to indicate that the terminal or the magnetometer is tilted during the movement, and the degree of inclination is proportional to the angle between the center line of the circle 701 and the horizontal line 703.
  • the display state in Fig. 7B indicates that during the calibration movement, the x-axis in the relative coordinate system of the magnetometer is at an angle with the horizontal reference plane, that is, the tilt state occurs, wherein the larger the angle, the more the tilt is high.
  • the user can adjust the tilt angle of the terminal in the reverse direction based on the pattern shown in FIG. 7B so that it is no longer tilted. For example, in the case shown in FIG. 7B, when the user wears the head mounted device, the user can turn the head to the left until the x-axis is on the horizontal reference plane, that is, the center line of the displayed circle 701 is no longer inclined.
  • the positional relationship between the circle 701 and the horizontal line 703 is used to indicate that the terminal or the magnetometer has an angle between the y-axis in the relative coordinate system of the magnetometer and the reference horizontal plane during the movement, that is, A state in which the center line of the circle 701 in FIG. 7C is separated from the horizontal line 703 appears.
  • the degree of separation is proportional to the parallel distance between the center line of the circle 701 and the horizontal line 703. That is, the larger the angle between the y-axis and the reference horizontal plane, the higher the degree of separation.
  • the user can adjust the position of the terminal in the opposite direction to be on the reference level based on the pattern shown in FIG. 7C. For example, in the situation shown in Figure 7C, the user may bow down to the reference level when wearing the head mounted device.
  • FIGS. 7D to 7F show a processing method in which the second calibration action occurs in a state in which the user performs the second calibration action.
  • circle 705 represents a terminal or magnetometer
  • horizontal line 707 represents a horizontal reference plane
  • vertical line 709 represents a vertical reference plane
  • icon 710 represents a user performing a second calibration action.
  • the second calibration action may be lifting the head upwards, or lifting the arm upwards.
  • the horizontal reference plane is formed by the user in the calibration starting posture
  • the x-axis and the y-axis in the relative coordinate system of the magnetometer
  • the vertical reference plane is the relative coordinate of the magnetometer under the calibration starting posture by the user.
  • the y-axis and the z-axis are formed in the system.
  • the relative positional relationship between the horizontal reference plane and the vertical reference plane is constant, and does not change with the position of the magnetometer.
  • the positional relationship of the circle 705 with 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 intersection of the center point of the circle 705 with the horizontal line 707 and the vertical line 709. The points coincide, in which case the user continues to perform the second calibration action.
  • the center point of the 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 the angle between the angle and the vertical reference plane is 90 degrees.
  • the user can adjust the second verification action to the right 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.
  • the center point of the 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 user can adjust the second verification action downward based on the display pattern of FIG. 7F until the center point of the circle 705 returns to the state where the intersection of the horizontal line 707 and the vertical line 709 coincides.
  • FIG. 8 is a block diagram of a processing apparatus of a terminal according to an embodiment of the present application.
  • 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 the condition for calibrating the magnetometer is satisfied, where the prompt information is used to prompt the user to perform a calibration action of the magnetometer on the terminal;
  • the input unit 801 is configured to acquire magnetic data collected by the magnetometer during the user performing the calibration action
  • the processing unit 803 is configured to calibrate the magnetometer according to the magnetic force data.
  • the above functional unit can be implemented based on the structure of the terminal shown in FIG. 9 and is not limited herein.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • the terminal may include a memory 901, a processor 903, a magnetometer 905, and an acceleration sensor 907. Wherein, the above components are coupled by a communication bus.
  • the memory 901 is configured to store applications, computer instructions, and data; the processor 903 is configured to invoke computer instructions and data to execute any of the methods performed by the terminal; the magnetometer 905 is configured to collect magnetic data and send the 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.
  • the processor 903 can determine the posture, motion, and the like 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, processor 903 can also be understood to be a controller.
  • CPU Central Processing Unit
  • processor 903 can also be understood to be a controller.
  • the memory 901 may include a read only memory and a random access memory, and supplies instructions, data, and the like to the processor 903.
  • a portion of the memory 901 may also include a non-volatile random access memory.
  • a computer readable storage medium may include computer instructions, applications, operating systems, and the like.
  • the components of a particular application are coupled together, for example, via a bus system.
  • the bus system can also include a power bus, a control bus, and a status signal bus.
  • the various buses are labeled as bus systems in the figure.
  • Processor 903 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 903 or an instruction in a form of software.
  • 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, a discrete gate or transistor logic device, or a discrete hardware component.
  • the processor 903 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • the processor 903 can be an image processor, a microprocessor, or the processor can be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 901.
  • the processor 903 can read an application, computer instructions or data in the memory 901, and complete the steps of the above-described method performed by the terminal in combination with its hardware.
  • processor 903 is configured to invoke the computer instructions to perform the following methods:
  • the prompt information is output, and the prompt information is used to prompt the user to perform the calibration action of the magnetometer on the terminal;
  • the magnetometer is calibrated based on the magnetic force data.
  • processor 903 can also execute any one of the foregoing method embodiments by using a computer instruction, and details are not described herein again.
  • the embodiment of the present application further provides a computer readable storage medium, including computer instructions for being executed by a processor to implement any one of the foregoing method embodiments.

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 calibration method for a magnetometer (101) and a related device. The calibration method comprises: outputting prompt information when a condition for calibrating the magnetometer (101) is satisfied, the prompt information being used for prompting a user to perform a calibration action of the magnetometer (101) on a terminal (10) (S201); obtaining magnetic data collected by the magnetometer (101) during the user performing the calibration action (S202); and calibrating the magnetometer (101) according to the magnetic data (S203). The magnetometer (101) can be calibrated more conveniently.

Description

磁力计的校准方法及相关设备Magnetometer calibration method and related equipment 技术领域Technical field
本申请涉及磁力计技术领域,尤其涉及一种磁力计的校准方法及相关设备。The present application relates to the field of magnetometer technology, and in particular, to a calibration method of a magnetometer and related equipment.
背景技术Background technique
随着电子设备的技术发展,电子设备中可以配置有多种传感器,多种传感器用以采集环境数据,电子设备可以基于传感器采集的环境数据做出决策,进而实现电子设备的智能化。其中,越来越多的电子设备中配置有磁力计,磁力计可以检测某一方向磁场的磁场大小,进而该磁力计可以应用于电子罗盘或者角度测量等方面。当前,随着终端,如穿戴式设备的技术发展,越来越多的终端中配置有磁力计。终端可以利用磁力计来实现更多功能,从而提升用户体验。With the development of electronic devices, a variety of sensors can be configured in the electronic device, and a plurality of sensors are used to collect environmental data. The electronic device can make decisions based on environmental data collected by the sensors, thereby implementing intelligentization of the electronic devices. Among them, more and more electronic devices are equipped with a magnetometer, which can detect the magnetic field of a magnetic field in a certain direction, and the magnetometer can be applied to an electronic compass or an angle measurement. Currently, with the development of technologies such as terminals, such as wearable devices, more and more terminals are equipped with magnetometers. The terminal can use the magnetometer to achieve more functions, thereby improving the user experience.
然而,由于磁力计比较容易受磁场干扰,因此终端中的磁力计需要进行校准,以使磁力计能够采集精准的环境数据。当前对电子设备的磁力计进行校准的方式中,通常需要调整电子设备的多种姿态,以实现对电子设备进行校准。而一些终端,如穿戴式设备由于可调整的姿态角度受限,因此当前的校准方法对穿戴式设备并不适用。因此,如何实现对调整姿态受限的终端中的磁力计进行校准,成为本领域技术人员积极研究的课题。However, since the magnetometer is more susceptible to magnetic field interference, the magnetometer in the terminal needs to be calibrated to enable the magnetometer to capture accurate environmental data. In the current method of calibrating the magnetometer of an electronic device, it is usually necessary to adjust various postures of the electronic device to implement calibration of the electronic device. While some terminals, such as wearable devices, have limited adjustable attitude angles, current calibration methods are not suitable for wearable devices. Therefore, how to calibrate the magnetometer in the terminal with limited adjustment posture has become an issue actively studied by those skilled in the art.
发明内容Summary of the invention
本申请实施例提供了一种磁力计的校准方法及相关设备。能够提升对磁力计校准的便捷性。The embodiment of the present application provides a calibration method of a magnetometer and related equipment. Improves the convenience of calibration of the magnetometer.
第一方面,本申请实施例提供了一种磁力计的校准方法,该方法包括:In a first aspect, an embodiment of the present application provides a calibration method for a magnetometer, the method comprising:
当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行校准动作,所述终端中配置有所述磁力计;When the condition for calibrating the magnetometer is satisfied, the prompt information is output, and the prompt information is used to prompt the user to perform a calibration action on the terminal, where the magnetometer is disposed in the terminal;
获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;Obtaining magnetic data collected by the magnetometer during the user performing the calibration action;
根据所述磁力数据,对所述磁力计进行校准。The magnetometer is calibrated based on the magnetic force data.
第二方面,本申请实施例提供了一种终端,该终端包括:In a second aspect, the embodiment of the present application provides a terminal, where the terminal includes:
磁力计;Magnetometer
存储器;以及Memory;
与所述存储器耦合的处理器;a processor coupled to the memory;
其中,所述存储器用于存储计算机指令;Wherein the memory is used to store computer instructions;
所述处理器用于调用所述计算机指令,以执行第一方面中的方法。The processor is operative 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:
输入单元,处理单元和输出单元;Input unit, processing unit and output unit;
其中,所述输出单元,用于当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行校准动作,所述终端中配置有所述磁力计;The output unit is configured to output prompt information when the condition for calibrating the magnetometer is satisfied, where the prompt information is used to prompt the user to perform a calibration action on the terminal, where the magnetometer is disposed in the terminal;
所述输入单元,用于获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;The input unit is configured to acquire magnetic data collected by the magnetometer during the user performing the calibration action;
所述处理单元,用于根据所述磁力数据,对所述磁力计进行校准。The processing unit is configured to calibrate the magnetometer according to the magnetic force data.
第四方面,本申请实施例提供了一种计算机可读性存储介质,包括计算机指令,所述计算机指令用于被处理器执行以实现第一方面中的方法。In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, including computer instructions for being executed by a processor to implement the method in the first aspect.
本申请实施例中,当满足对磁力计进行校准的条件时,即可输出提示信息,该提示信息用于提示用户对终端执行校准动作。并可以获取磁力计在用户执行该校准动作的过程中采集的磁力数据。进而可以根据该磁力数据,对磁力计进行校准。通过上述方式,可以提升对终端,尤其是可穿戴设备,中配置的磁力计的校准效率,并且可以提升对磁力计进行校准的便捷性。In the embodiment of the present application, when the condition for calibrating the magnetometer is satisfied, the prompt information may be output, and the prompt information is used to prompt the user to perform a calibration action on the terminal. And the magnetic data collected by the magnetometer during the user performing the calibration action can be obtained. Further, the magnetometer can be calibrated based on the magnetic force data. In the above manner, 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
图1是本申请实施例提供的一种应用终端的结构示意图;1 is a schematic structural diagram of an application terminal according to an embodiment of the present application;
图2是本申请实施例提供的一种磁力计的校准方法的流程示意图;2 is a schematic flow chart of a calibration method of a magnetometer according to an embodiment of the present application;
图3是本申请实施例提供的一种用户佩戴手戴式设备情况下的校准起始姿势以及磁力计的相对坐标系示意图;3 is a schematic diagram of a calibration start posture and a relative coordinate system of a magnetometer in a case where a user wears a hand-held device according to an embodiment of the present application;
图4是本申请实施例提供的一种用户佩戴头戴式设备情况下的校准起始姿势以及磁力计的相对坐标系示意图;4 is a schematic diagram of a calibration start posture and a relative coordinate system of a magnetometer in a case where a user wears a head mounted device according to an embodiment of the present application;
图5是本申请实施例提供的另一种磁力计的校准方法的流程示意图;5 is a schematic flow chart of another method for calibrating a magnetometer according to an embodiment of the present application;
图6是本申请实施例提供的又一种磁力计的校准方法的流程示意图;6 is a schematic flow chart of still another calibration method of a magnetometer according to an embodiment of the present application;
图7A-7F是本申请实施例提供的一种提示信息的示意图;7A-7F are schematic diagrams of prompt information provided by an embodiment of the present application;
图8是本申请实施例提供的一种终端的单元组成图;FIG. 8 is a structural diagram of a unit of a terminal according to an embodiment of the present disclosure;
图9是本申请实施例提供的一种终端的结构示意图。FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application.
具体实施方式Detailed ways
首先对本申请实施例所应用的应用场景进行简单介绍。The application scenario applied in the embodiment of the present application is briefly introduced.
请参阅图1,图1是本申请实施例提供的一种应用终端的结构示意图。如图1所示,终端10配置的电路板20上设置有磁力计101,该磁力计可以感知外界磁场,并基于外界磁场生成磁力数据,终端10中配置的其他元件,例如处理器、控制器等可以基于磁力计采集的磁力数据,确定终端10当前的姿态或角度等。然而,电路板20上所设置的其他元件102有可能产生磁场,这就导致了其他元件成为磁力计101的干扰源,即磁力计有可能感知其他元件102产生的干扰磁场,磁力计所采集的磁力数据中包括干扰数据。本申请实施例中,对磁力计进行校准,即是指去除磁力计采集的磁力数据中的干扰数据,提升磁力计采集的磁力数据的精准度。Please refer 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 disposed on the terminal 10 is provided with a magnetometer 101, which can sense an external magnetic field and generate magnetic data based on an external magnetic field, and other components configured in the terminal 10, such as a processor and a controller. The current posture or angle of the terminal 10 can be determined based on the magnetic force data collected by the magnetometer. However, other components 102 disposed on the circuit board 20 may generate a magnetic field, which causes other components to become a source of interference of the magnetometer 101, that is, the magnetometer may perceive the interference magnetic field generated by the other components 102, collected by the magnetometer. Interference data is included in the magnetic data. In the embodiment of the present application, the calibration of the magnetometer refers to removing the interference data in the magnetic data collected by the magnetometer and improving the accuracy of the magnetic data collected by the magnetometer.
在此,终端10可以包括可穿戴式设备,如头戴式显示器(Head Mount Display,HMD)、智能眼镜、智能手表、智能手环,或者其他配置有磁力计的用户终端等,在此不予限定。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 terminal configured with a magnetometer, etc., limited.
下面结合上述应用场景以及附图,对本申请实施例中的方法实施例进行描述。The method embodiments in the embodiments of the present application are described below in conjunction with the foregoing application scenarios and the accompanying drawings.
如图2所示,图2为本申请实施例提供的一种磁力计的校准方法的流程示意图。该方法可由上述配置有磁力计的终端执行。如图2所示,该方法至少包括以下步骤。As shown in FIG. 2, FIG. 2 is a schematic flowchart diagram of a calibration method of a magnetometer according to an embodiment of the present application. The method can be performed by the terminal configured with the magnetometer described above. As shown in FIG. 2, the method includes at least the following steps.
步骤S201,当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行磁力计的校准动作。In step S201, when the condition for calibrating the magnetometer is satisfied, the prompt information is output, and the prompt information is used to prompt the user to perform a calibration operation of the magnetometer on the terminal.
示例性地,对磁力计进行校准的条件可以是用户触发校准操作,或者终端周期性地磁力计进行校准,或者在产品测试阶段对磁力计进行校准,或者是终端在控制磁力计采集磁力数据之前,对磁力计进行校准。在此,对磁力计进行校准的条件不予限定。Illustratively, the condition for calibrating the magnetometer may be that the user triggers a calibration operation, or the terminal periodically calibrates the magnetometer, or calibrates the magnetometer during the product testing phase, or the terminal controls the magnetometer before acquiring the magnetic data. , Calibrate the magnetometer. Here, the conditions for calibrating the magnetometer are not limited.
进一步地,当满足对磁力计进行校准的条件后,可以输出提示信息,该提示信息用于提示用户对终端执行校准动作。其中,该提示信息可以是语音提示信息、文字提示信息、图像提示信息、或者视频提示信息等,在此对提示信息的输出形式不予限定。Further, after the condition for calibrating the magnetometer is satisfied, the prompt information may be output, and the prompt information is used to prompt the user to perform a calibration action on the terminal. The prompt information may be voice prompt information, text prompt information, image prompt information, or video prompt information, etc., and the output form of the prompt information is not limited herein.
用户通过上述提示信息,可以获知校准动作,进而对终端执行校准动作。在用户执行该校准动作的过程中,终端中的磁力计可以采集磁力数据。Through the above prompt information, the user can learn the calibration action and perform the calibration action on the terminal. During the user performing the calibration action, the magnetometer in the terminal can acquire magnetic data.
示例性地,校准动作可以是用户将终端围绕某一个基准轴进行水平旋转,或者,用户将终端向上或向下移动对称的幅度等。对于校准动作的具体描述,可以参见后文。Illustratively, the calibration action may be that the user rotates the terminal horizontally about a certain reference axis, or the user moves the terminal up or down by a symmetric amplitude or the like. For a detailed description of the calibration action, see below.
可选地,可以在用户执行校准动作之前,提示用户调整姿势至校准起始姿势,并根据校准起始姿势来确定磁力计的相对坐标系。磁力计的相对坐标系是指以磁力计为原点,建立x,y,z三轴坐标系。Alternatively, the user may be prompted to adjust the posture to the calibration start posture before the user performs the calibration action, and determine the relative coordinate system of the magnetometer according to the calibration start posture. The relative coordinate system of the magnetometer refers to the three-axis coordinate system of x, y, and z with the magnetometer as the origin.
举例说明,可以首先提示用户佩戴该终端,并提示用户调整姿势至校准起始姿势。For example, the user may be prompted to wear the terminal first, and the user is prompted to adjust the posture to the calibration start posture.
例如,如图3所示,假设终端为智能手环、智能手表等手戴式设备时,校准起始姿势为用户将手臂水平放置于胸前。或者,如图4所示,假设终端为头戴式显示设备时,校准起始姿势为用户目视前方时,用户头部所在位置。For example, as shown in FIG. 3, when the terminal is a hand-worn device such as a smart bracelet or a smart watch, the calibration starting posture is that the user places the arm horizontally on the chest. Alternatively, as shown in FIG. 4, when the terminal is a head mounted display device, the calibration start posture is the position of the user's head when the user visually looks ahead.
并可以在监测到用户将姿势调整校准起始姿势后,确定磁力计的相对坐标系,即在此情况下,磁力计所在位置即为坐标原点。And after monitoring the user to adjust the posture of the calibration start position, the relative coordinate system of the magnetometer is determined, that is, in this case, the position of the magnetometer is the coordinate origin.
具体实现中,终端可以利用配置的加速度传感器、陀螺仪、重力传感器等所采集的数据,确定用户当前姿势,进而监测用户是否将姿势调整为校准起始姿势。或者,终端利用配置的摄像装置等确定用户当前姿势。在此不予限定。In a specific implementation, the terminal can determine the current posture of the user by using data collected by the configured acceleration sensor, gyroscope, gravity sensor, etc., and then monitor whether the user adjusts the posture to the calibration start posture. Alternatively, the terminal determines the current posture of the user using the configured imaging device or the like. This is not limited here.
如图3所示或如图4所示,基于用户的校准起始姿势来建立磁力计的相对坐标系。其中,在此校准起始姿势下,x轴与y轴所在的平面即为水平基准面,z轴与y轴所在的平面即为垂直基准面。z轴代表垂直方向。需要说明的是,磁力计的相对坐标系相对于磁力计的位置关系不变,其随着磁力计的位置变化而发生位置变化;水平基准面与垂直基准面的相对位置关系不变,其不随磁力计的位置变化而变化。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 starting posture. Wherein, in the calibration starting posture, the plane where the x-axis and the y-axis are located is the horizontal reference plane, and the plane where the z-axis and the y-axis are located is the vertical reference plane. The z axis represents the vertical direction. It should be noted that the relative coordinate system of the magnetometer does not change with respect to the positional relationship of the magnetometer, and the positional change occurs as the position of the magnetometer changes; the relative positional relationship between the horizontal reference plane and the vertical reference plane does not change, and does not follow The position of the magnetometer changes as the position changes.
在监测到用户的校准起始姿势后,即可提示用户对终端执行校准动作。例 如,如图3中所示,提示用户以身体为轴,水平旋转;或者,提示用户向上或向下举起手臂,直至手臂处于垂直方向。或者,如图4中所示,提示用户以身体为轴,水平旋转;或者提示用户抬头或低头,直至目光为垂直方向。After monitoring the user's calibration start posture, the user can be prompted to perform a calibration action on the terminal. For example, as shown in Figure 3, the user is prompted to rotate horizontally with the body as the axis; or, the user is prompted to raise the arm up or down until the arm is in the vertical direction. Alternatively, as shown in FIG. 4, the user is prompted to rotate horizontally with the body as the axis; or the user is prompted to raise or lower the head until the eye is in the vertical direction.
当然,上述举例中,以用户佩戴该终端为例进行说明,对于用户未佩戴该终端的情况,可以通过其他校准动作实现对磁力计的校准,在此不予限定。Certainly, in the above example, the user wears the terminal as an example for description. For the case where the user does not wear the terminal, the calibration of the magnetometer can be implemented by other calibration actions, which is not limited herein.
步骤S202,获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据。Step S202: Acquire magnetic data collected by the magnetometer during the user performing the calibration action.
示例性地,磁力计可以在用户执行校准动作的过程中实时采集磁力数据,其中,该磁力数据可以理解为包括采集到的外界磁场的准确磁力数据以及受其他干扰源产生的干扰数据。磁力计所采集的磁力数据可以包括x轴方向的第一磁力数据、y轴方向的第二磁力数据,以及z轴方向的第三磁力数据。Illustratively, the magnetometer can acquire magnetic data in real time during a user performing a calibration action, wherein the magnetic data can be understood to include accurate magnetic data of the acquired external magnetic field and interference data generated by other sources of interference. The magnetic force data collected by the magnetometer may include first magnetic force data in the x-axis direction, second magnetic force data in the y-axis direction, and third magnetic force data in the z-axis direction.
终端可以实时获取磁力计采集的磁力数据,或者是根据其他条件获取磁力计采集的一个或多个磁力数据,在此不予限定。The terminal can 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.
步骤S203,根据所述磁力数据,对所述磁力计进行校准。Step S203, calibrating the magnetometer according to the magnetic force data.
示例性地,可以根据获取的磁力数据,以及用户的校准动作,确定干扰数据,进而在磁力数据中去除该干扰数据,即可实现对磁力计进行校准。具体实现方式可以参见下述实施例。Exemplarily, the magnetometer can be calibrated according to the acquired magnetic data and the calibration action of the user to determine the interference data, and then remove the interference data in the magnetic data. For specific implementations, refer to the following embodiments.
本申请实施例中,当满足对磁力计进行校准的条件时,即可输出提示信息,该提示信息用于提示用户对终端执行校准动作。并可以获取磁力计在用户执行该校准动作的过程中采集的磁力数据。进而可以根据该磁力数据,对磁力计进行校准。通过上述方式,可以提升终端、尤其是可穿戴设备中配置的磁力计的校准效率,并且可以提升对磁力计进行校准的便捷性。In the embodiment of the present application, when the condition for calibrating the magnetometer is satisfied, the prompt information may be output, and the prompt information is used to prompt the user to perform a calibration action on the terminal. And the magnetic data collected by the magnetometer during the user performing the calibration action can be obtained. Further, the magnetometer can be calibrated based on the magnetic force data. In the above manner, the calibration efficiency of the magnetometer configured in the terminal, especially in the wearable device, can be improved, and the convenience of calibrating the magnetometer can be improved.
请参阅图5,图5是本申请实施例提供的另一种磁力计的校准方法的流程示意图。该方法可以应用于终端,尤其是可穿戴式设备中。如图5所示,该方法至少包括以下步骤。Please refer to FIG. 5. FIG. 5 is a schematic flowchart diagram of another method for calibrating a magnetometer according to an embodiment of the present application. The method can be applied to terminals, especially wearable devices. As shown in FIG. 5, the method includes at least the following steps.
步骤S501,当满足对磁力计进行校准的条件时,输出第一提示信息,所述第一提示信息用于提示用户执行第一校准动作;其中,所述第一校准动作包括将所述终端进行水平旋转,旋转角度大于或等于360度。Step S501, when the condition for calibrating the magnetometer is satisfied, outputting first prompt information, the first prompt information is used to prompt the user to perform the first calibration action; wherein the first calibration action includes performing the terminal Rotate horizontally with a rotation angle greater than or equal to 360 degrees.
示例性地,第一校准动作可以是将终端进行水平旋转,即保持在同一个水 平面上将终端旋转一周或一周的倍数,即旋转角度大于或等于360度。具体地,旋转角度可以是360度或360度的倍数。在此,若通过用户的校准起始姿势,建立磁力计的相对坐标系,则在此所述的水平面即为x轴与y轴所在的水平基准面。Illustratively, the first calibration action may be to rotate the terminal horizontally, i.e., to maintain the terminal at a multiple of one or one revolution of the terminal on the same horizontal plane, i.e., the angle of rotation is greater than or equal to 360 degrees. Specifically, the angle of rotation may be a multiple of 360 degrees or 360 degrees. Here, if the relative coordinate system of the magnetometer is established by the user's calibration start posture, the horizontal plane described herein is the horizontal reference plane where the x-axis and the y-axis are located.
具体地,若用户佩戴的终端为手戴式设备,则第一校准动作可以是保持手臂姿势为校准起始姿势,用户自旋转一周或一周以上。若用户佩戴的终端为头戴式设备,则第一校准动作可以是保持视线水平,用户自旋转一周或一周以上。即用户在旋转过程中,需要保持磁力计的相对坐标系中的x轴与y轴位于水平基准面上。Specifically, if the terminal worn by the user is a hand-held device, the first calibration action may be to maintain the arm posture as a calibration start posture, and the user rotates one week or more. If the terminal worn by the user is a head mounted device, the first calibration action may be to maintain the line of sight level, and the user rotates one week or more. That is, 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 the rotation.
步骤S502,获取所述磁力计在所述用户执行所述第一校准动作的过程中采集的I个第一磁力数据,其中,所述第一磁力数据为基于所述磁力计的相对坐标系中x轴方向的磁力数据,I为正整数。Step S502, acquiring one first magnetic data collected by the magnetometer during the performing the first calibration action by the user, wherein the first magnetic data is in a relative coordinate system based on the magnetometer Magnetic data in the x-axis direction, I is a positive integer.
步骤S503,获取所述磁力计在所述用户执行所述第一校准动作的过程中采集的J个第二磁力数据,其中,所述第二磁力数据为基于所述磁力计的相对坐标系中y轴方向的磁力数据,J为正整数。Step S503, acquiring J second magnetic data collected by the magnetometer in the process of the user performing the first calibration action, wherein the second magnetic force data is in a relative coordinate system based on the magnetometer Magnetic data in the y-axis direction, J is a positive integer.
示例性地,用户在执行第一校准动作的过程中,终端可以仅获取磁力计采集的I个第一磁力数据以及J个第二磁力数据。其中,I与J可以相同,或不同,在此不予限定。终端可以实时或周期性获取磁力计采集的磁力数据,在此不予限定。若终端周期性地获取磁力计采集的磁力数据,终端所获取的磁力数据为磁力计在第一校准动作形成的圆形动作轨迹上基于原点相对的位置所采集的磁力数据。Exemplarily, in the process of performing the first calibration action, the terminal may only acquire the first first magnetic data and the J second magnetic data collected by the magnetometer. Wherein, I and J may be the same or different, and are not limited herein. The terminal can 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 collected by the magnetometer, the magnetic data acquired by the terminal is the magnetic data collected by the magnetometer based on the relative position of the origin on the circular motion trajectory formed by the first calibration action.
其中,磁力计在水平基准面运动的过程中,终端通过上述获取磁力数据的方式,获取的磁力数据中外界磁场的磁力数据可以成对相对抵消,因此,可以获取第一磁力数据的最大值与最小值,并将获取第一磁力数据的最大值与最小值加和并除以2,即可获取磁力计在x轴方向采集的第一干扰数据。进一步地,若周期性获取第一磁力数据,可以获取第一磁力数据的最大值的平均值,以及第一磁力数据的最小值的平均值,并将获取的第一磁力数据的最大值的平均值与最小值的平均值加和再除以2,即可获取磁力计在x轴方向采集的第一干扰数据。同理,可以获取第二磁力数据的最大值与最小值,并将获取的第二磁力 数据的最大值与最小值加和并除以2,即可获取磁力计在y轴方向采集的第二干扰数据。进一步地,若周期性地获取第二磁力数据,可以获取第二磁力数据的最大值的平均值,以及第二磁力数据的最小值的平均值,并将获取的第二磁力数据的最大值的平均值与最小值的平均值加和再除以2,即可获取磁力计在y轴方向采集的第二干扰数据。Wherein, in the process of the horizontal movement of the magnetometer, the magnetic data of the external magnetic field in the magnetic data acquired by the terminal through the above-mentioned method of acquiring the magnetic data may be relatively offset in pairs, and therefore, the maximum value of the first magnetic data may be acquired. The minimum value is obtained by summing the maximum value and the minimum value of the acquired first magnetic force data and dividing by 2 to obtain the first interference data collected by the magnetometer in the x-axis direction. Further, if the first magnetic force data is periodically acquired, an average value of the maximum value of the first magnetic force data and an average value of the minimum value of the first magnetic force data may be acquired, and an average of the maximum values of the acquired first magnetic force data may be obtained. The sum of the value and the minimum value is divided by 2 to obtain the first interference data collected by the magnetometer in the x-axis direction. Similarly, the maximum value and the minimum value of the second magnetic force data can be obtained, and the maximum value and the minimum value of the acquired second magnetic force data are summed and divided by 2, and the second magnetometer can be acquired in the y-axis direction. Interfere with data. Further, if the second magnetic force data is periodically acquired, an average value of the maximum value of the second magnetic force data and an average value of the minimum value of the second magnetic force data may be acquired, and the obtained maximum value of the second magnetic force data may be obtained. The sum of the average value and the minimum value is divided by 2 to obtain the second interference data collected by the magnetometer in the y-axis direction.
步骤S504,输出第二提示信息,所述第二提示信息用于提示用户执行第二校准动作;其中,所述第二校准动作包括将所述终端移动到垂直向上的第一位置以及垂直向下的第二位置。Step S504, outputting second prompt information, the second prompt information is used to prompt the user to perform a second calibration action, wherein the second calibration action comprises moving the terminal to a first position vertically upward and vertically downward The second position.
具体地,若用户佩戴有手戴式设备,则第二提示信息可以提示用户将手举高,直至手臂与上述水平基准面垂直,即磁力计的相对坐标系中的y轴与上述水平基准面垂直,此时手戴式设备所在位置为第一位置;还可以提示用户将手垂下,直至手臂与上述水平基准面垂直,即磁力计的相对坐标系中的y轴与上述水平基准面垂直,此时手戴式设备所在位置为第二位置。Specifically, if the user wears the hand-held device, the second prompt information may prompt the user to raise the hand until the arm is perpendicular to the horizontal reference plane, that is, the y-axis and the horizontal reference plane in the relative coordinate system of the magnetometer. Vertically, the position of the hand-held device is the first position; the user may 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. At this time, the position of the hand-held device is the second position.
或者,若用户佩戴有头戴式设备,则第二提示信息提示用户抬头,直至磁力计的相对坐标系中的y轴与上述水平基准面垂直,此时头戴式设备所在位置为第一位置;还可以提示用户低头,直至磁力计的相对坐标系中的y轴与上述水平基准面垂直,此时,头戴式设备所在位置为第二位置。Alternatively, if the user wears the head mounted device, the second prompt message prompts the user to raise the head until the y axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, and the position of the head mounted device is the first position. The user may also be prompted to bow until the y-axis in the relative coordinate system of the magnetometer is perpendicular to the horizontal reference plane, and the position of the head-mounted device is the second position.
一种实现方式中,终端可以利用其所配置的重力传感器传输的数据,确定第一位置以及第二位置。In an implementation manner, the terminal may determine the first location and the second location by using data transmitted by the gravity sensor configured by the terminal.
步骤S505,获取所述磁力计在所述终端置于所述第一位置以及置于所述第二位置时分别采集的第三磁力数据;其中,所述第三磁力数据为基于所述磁力计的相对坐标系中z轴方向的磁力数据。Step S505, acquiring third magnetic force data respectively collected by the magnetometer when the terminal is placed in the first position and placed in the second position; wherein the third magnetic force data is based on the magnetometer Magnetic data in the z-axis direction of the relative coordinate system.
示例性地,终端可以获取磁力计在第一位置和第二位置采集的第三磁力数据,该第三磁力数据为磁力计采集的z轴方向的磁力数据。对其相加求平均和,即可得到磁力计在z轴方向的干扰数据,本申请实施例中可以描述为第三干扰数据。Exemplarily, the terminal may acquire third magnetic force data collected by the magnetometer in the first position and the second position, the third magnetic force data being magnetic data in the z-axis direction collected by the magnetometer. The averaging sum is added to obtain the interference data of the magnetometer in the z-axis direction, which can be described as the third interference data in the embodiment of the present application.
在此需要说明的是,步骤S501~步骤S503与步骤S504~步骤S505的执行顺序不予限定。即在另一种实现方式中,当满足对磁力计进行校准的条件时,先执行步骤S504~步骤S505,再执行步骤S501~步骤S503。It should be noted here that the order of execution of steps S501 to S503 and steps S504 to S505 is not limited. That is, in another implementation manner, when the condition for calibrating the magnetometer is satisfied, steps S504 to S505 are performed first, and then steps S501 to S503 are performed.
步骤S506,根据所述I个第一磁力数据,确定第一干扰数据;根据所述J个第二磁力数据,确定第二干扰数据;并确定所述2个第三磁力数据的平均值为第三干扰数据。Step S506, determining first interference data according to the first first magnetic data, determining second interference data according to the J second magnetic data, and determining an average value of the two third magnetic data is Three interference data.
步骤S507,根据所述第一干扰数据,所述第二干扰数据以及所述第三干扰数据,对所述磁力计进行校准。Step S507, calibrating the magnetometer according to the first interference data, the second interference data and the third interference data.
示例性地,通过上述确定的各方向上的干扰数据,可以对磁力计进行校准。具体地,可以将磁力计采集的任意一个磁力数据中去除上述三个干扰数据,即可实现对磁力计进行校准。具体地,磁力计采集的磁力数据中包括x轴方向的数据,y轴方向的数据以及z轴方向的数据。通过将x轴方向的数据减去第一干扰数据,将y轴方向的数据减去第二干扰数据,将z轴方向的数据减去第三干扰数据,即可获得校准后的磁力数据,进而实现对磁力计进行校准。Illustratively, the magnetometer can be calibrated by the interference data in the above-identified directions. Specifically, the magnetometer can be calibrated by removing the three interference data from any one of the magnetic data collected by the magnetometer. 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. 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, the calibrated magnetic data can be obtained, and further Achieve calibration of the magnetometer.
请参阅图6,图6是本申请实施例提供的又一种磁力计的校准方法的流程示意图。该方法可以应用于终端、尤其是可穿戴式设备中。其中,图6所示的方法可以结合上述方法实施例中描述的任意一种实现。如图6所示,该方法可以至少包括以下步骤。Please refer to FIG. 6. FIG. 6 is a schematic flowchart diagram of another calibration method of a magnetometer according to an embodiment of the present application. The method can be applied to terminals, especially wearable devices. The method shown in FIG. 6 can be implemented in combination with any of the methods described in the foregoing method embodiments. As shown in FIG. 6, the method can include at least the following steps.
步骤S601,在所述用户执行所述校准动作的过程中,监测所述校准动作是否处于偏离状态。Step S601, in the process of the user performing the calibration action, monitoring whether the calibration action is in a deviation state.
步骤S602,若监测到所述校准动作处于偏离状态,则输出第三提示信息,所述第三提示信息用于提示用户所述校准动作处于偏离状态。Step S602, if it is detected that the calibration action is in a deviation state, outputting a third prompt information, the third prompt information is used to prompt the user that the calibration action is in a deviation state.
示例性地,用户执行第一校准动作的情况下,校准动作处于偏离状态是指磁力计的位置偏离上述水平基准面。用户执行第二校准动作的情况下,校准动作处于偏离状态是指磁力计的位置偏离上述垂直基准面。Illustratively, in the case where the user performs the first calibration action, the calibration action in the off state means that the position of the magnetometer deviates from the horizontal reference plane. When the user performs the second calibration operation, the deviation of the calibration operation means that the position of the magnetometer deviates from the vertical reference plane.
一种实现方式中,可以通过终端中配置的传感器所采集的数据,来确定校准动作是否处于偏离状态。例如,可以通过终端中配置的加速度传感器、重力传感器、陀螺仪等传感器所采集的数据,确定终端当前所处位置,当前所处姿态等等,进而可以根据终端当前所处位置、当前所处姿态等信息,来确定校准动作是否处于偏离状态。In one implementation, the data collected by the sensors configured in the terminal can be used to determine whether the calibration action is in a deviated state. For example, the data collected by the sensors such as the acceleration sensor, the gravity sensor, and the gyroscope configured in the terminal can determine the current location of the terminal, the current posture, and the like, and can be based on the current location of the terminal and the current posture. Information such as to determine if the calibration action is in a deviating state.
可选地,终端还可以根据该偏离状态,确定与该偏离状态对应的动作调整信息。并可以输出该动作调整信息,以提示用户及时调整校准动作。该动作调 整信息可以携带在第三提示信息中,或者与第三提示信息同时输出,在此不予限定。可选地,在确定校准动作处于偏离状态后,可以通过终端中配置的加速度传感器、重力传感器、陀螺仪等传感器所采集的数据,来进一步地确定校准动作的偏离程度,并根据偏离程度来确定动作调整信息,在此不予限定。Optionally, the terminal may further determine action adjustment information corresponding to the deviation state according to the deviation state. The action adjustment information can be output to prompt the user to adjust the calibration action in time. The action adjustment information may be carried in the third prompt information or outputted simultaneously with the third prompt information, which is not limited herein. Optionally, after determining that the calibration action is in a deviation state, the data collected by the sensors such as the acceleration sensor, the gravity sensor, and the gyroscope configured in the terminal may further determine the degree of deviation of the calibration action, and determine according to the degree of deviation. The motion adjustment information is not limited herein.
举例说明,如图7A至7C所示,图7A至7C示出了一种用户在执行第一校准动作的情况下,第一校准动作出现偏离状态的处理方式。其中圆圈701代表终端或磁力计,横线703代表水平基准面。For example, as shown in FIGS. 7A to 7C, FIGS. 7A to 7C illustrate a processing manner in which the first calibration action occurs in a state in which the user performs the first calibration action. Where circle 701 represents a terminal or magnetometer and horizontal line 703 represents a horizontal reference plane.
如图7A所示,圆圈701与横线703的位置关系用以表示第一校准动作的偏离状态在允许范围内。在此情况下,用户保持水平旋转。As shown in FIG. 7A, the positional relationship of the circle 701 and the horizontal line 703 is used to indicate that the deviation state of the first calibration action is within the allowable range. In this case, the user remains horizontally rotated.
如图7B所示,圆圈701与横线703的位置关系用以表示终端或磁力计在运动过程中,出现倾斜,倾斜程度与圆圈701的中心线与横线703的夹角成正比。图7B中的显示状态表明在校准运动过程中,磁力计的相对坐标系中的x轴与上述水平基准面出现夹角,即会出现上述倾斜状态,其中,夹角越大,表明倾斜程度越高。在此种情况下,用户可以基于图7B中显示的图案,反方向调整终端的倾斜角度,使其不再倾斜。例如,图7B所示的情形下,用户在佩戴头戴式设备时,可以向左转动头部,直至上述x轴处于水平基准面上,即所显示的圆圈701的中心线不再倾斜。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 the magnetometer is tilted during the movement, and the degree of inclination is proportional to the angle between the center line of the circle 701 and the horizontal line 703. The display state in Fig. 7B indicates that during the calibration movement, the x-axis in the relative coordinate system of the magnetometer is at an angle with the horizontal reference plane, that is, the tilt state occurs, wherein the larger the angle, the more the tilt is high. In this case, the user can adjust the tilt angle of the terminal in the reverse direction based on the pattern shown in FIG. 7B so that it is no longer tilted. For example, in the case shown in FIG. 7B, when the user wears the head mounted device, the user can turn the head to the left until the x-axis is on the horizontal reference plane, that is, the center line of the displayed circle 701 is no longer inclined.
如图7C所示,圆圈701与横线703的位置关系用以表示终端或磁力计在运动过程中,出现磁力计的相对坐标系中的y轴与上述基准水平面出现夹角的情况,即会出现图7C中的圆圈701的中心线与横线703分离的状态。其中,分离程度与圆圈701的中心线与横线703之间的平行距离成正比。即y轴与基准水平面的夹角越大,表明分离程度越高。在此种情况下,用户可以基于图7C中显示的图案,反方向调整终端位置,使其处于基准水平面上。例如,图7C所示的情形下,用户在佩戴头戴式设备时,可以向下低头,使其处于基准水平面上。As shown in FIG. 7C, the positional relationship between the circle 701 and the horizontal line 703 is used to indicate that the terminal or the magnetometer has an angle between the y-axis in the relative coordinate system of the magnetometer and the reference horizontal plane during the movement, that is, A state in which the center line of the circle 701 in FIG. 7C is separated from the horizontal line 703 appears. The degree of separation is proportional to the parallel distance between the center line of the circle 701 and the horizontal line 703. That is, the larger the angle between the y-axis and the reference horizontal plane, the higher the degree of separation. In this case, the user can adjust the position of the terminal in the opposite direction to be on the reference level based on the pattern shown in FIG. 7C. For example, in the situation shown in Figure 7C, the user may bow down to the reference level when wearing the head mounted device.
当然,动作调整信息还可以通过其他方式显示,在此不予限定。再举例说明,如图7D至7F所示,图7D至7F示出了一种用户在执行第二校准动作的情况下,第二校准动作出现偏离状态的处理方法。其中,圆圈705代表终端或磁力计,横线707代表水平基准面,竖线709代表垂直基准面,图标710代表指 示用户向上做第二校准动作。其中,第二校准动作可以是向上抬头,或者是向上举起手臂等。在此,水平基准面是由用户在校准起始姿势下,磁力计的相对坐标系中的x轴与y轴形成的,垂直基准面是由用户在校准起始姿势下,磁力计的相对坐标系中的y轴与z轴形成的。其中,水平基准面与垂直基准面的相对位置关系不变,其不随磁力计的位置变化而变化。Of course, the motion adjustment information can also be displayed by other means, which is not limited herein. For further example, as shown in FIGS. 7D to 7F, FIGS. 7D to 7F show a processing method in which the second calibration action occurs in a state in which the user performs the second calibration action. Wherein, 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 user performing a second calibration action. The second calibration action may be lifting the head upwards, or lifting the arm upwards. Here, the horizontal reference plane is formed by the user in the calibration starting posture, the x-axis and the y-axis in the relative coordinate system of the magnetometer, and the vertical reference plane is the relative coordinate of the magnetometer under the calibration starting posture by the user. The y-axis and the z-axis are formed in the system. The relative positional relationship between the horizontal reference plane and the vertical reference plane is constant, and does not change with the position of the magnetometer.
如图7D所示,圆圈705与横线707以及竖线709的位置关系用以表示第二校准动作的偏离状态在允许范围内,即圆圈705的中心点与横线707以及竖线709的交叉点重合,在此情况下,用户继续执行第二校准动作。As shown in FIG. 7D, the positional relationship of the circle 705 with 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 intersection of the center point of the circle 705 with the horizontal line 707 and the vertical line 709. The points coincide, in which case the user continues to perform the second calibration action.
如图7E所示,圆圈705的中心点偏离竖线709,表明磁力计的相对坐标系中的x轴不再与垂直基准面垂直,其与垂直基准面之间的夹角与90度的差值越大,则偏离程度越高。在此种情况下,用户可以基于图7E中的显示图案,向右调整第二校验动作,直至圆圈705的中心点回到横线707与竖线709的交叉点重合的状态。As shown in FIG. 7E, the center point of the 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 the angle between the angle and the vertical reference plane is 90 degrees. The larger the value, the higher the degree of deviation. In this case, the user can adjust the second verification action to the right 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.
如图7F所示,圆圈705的中心点偏离横线707,表明磁力计的相对坐标系中的y轴不再与水平基准面垂直。其与水平基准面之间的夹角与90度的差值越大,则偏离程度越高。在此种情况况下,用户可以基于图7F的显示图案,向下调整第二校验动作,直至圆圈705的中心点回到横线707与竖线709的交叉点重合的状态。As shown in Figure 7F, the center point of the 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 the angle between the angle and the horizontal reference plane and 90 degrees, the higher the degree of deviation. In this case, the user can adjust the second verification action downward based on the display pattern of FIG. 7F until the center point of the circle 705 returns to the state where the intersection of the horizontal line 707 and the vertical line 709 coincides.
下面结合附图对本申请实施例中的装置实施例进行描述。The device embodiments in the embodiments of the present application are described below with reference to the accompanying drawings.
请参阅图8,图8是本申请实施例提供的一种终端的处理装置的单元组成图。如图8所示,该终端可以包括输入单元801,处理单元803以及输出单元805。Please refer to FIG. 8. FIG. 8 is a block diagram of a processing apparatus of a terminal according to an embodiment of the present application. As shown in FIG. 8, the terminal may include an input unit 801, a processing unit 803, and an output unit 805.
其中,所述输出单元805,用于当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行所述磁力计的校准动作;The output unit 805 is configured to output prompt information when the condition for calibrating the magnetometer is satisfied, where the prompt information is used to prompt the user to perform a calibration action of the magnetometer on the terminal;
所述输入单元801,用于获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;The input unit 801 is configured to acquire magnetic data collected by the magnetometer during the user performing the calibration action;
所述处理单元803,用于根据所述磁力数据,对所述磁力计进行校准。The processing unit 803 is configured to calibrate the magnetometer according to the magnetic force data.
上述功能单元还可以实现上述方法实施例中描述的部分或全部方法,在此 不再赘述。The above functional units may also implement some or all of the methods described in the foregoing method embodiments, and details are not described herein again.
上述功能单元可以基于图9所示的终端的结构实现,在此不予限定。The above functional unit can be implemented based on the structure of the terminal shown in FIG. 9 and is not limited herein.
请参阅图9,图9是本申请实施例提供的一种终端的结构示意图。如图9所示,终端可以包括存储器901、处理器903、磁力计905以及加速度传感器907。其中,上述元件通过通信总线耦合。Please refer to FIG. 9. FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application. 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 components are coupled by a communication bus.
存储器901用于存储应用程序、计算机指令和数据;处理器903用于调用计算机指令和数据以执行上述终端所执行的任意一种方法;磁力计905用于采集磁力数据,并发送给处理器903。加速度传感器907或结合其他传感器来采集数据,并发送给处理器903,处理器903可以根据接收的数据确定终端的姿态、动作等,在此不予限定。The memory 901 is configured to store applications, computer instructions, and data; the processor 903 is configured to invoke computer instructions and data to execute any of the methods performed by the terminal; the magnetometer 905 is configured to collect magnetic data and send the 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. The processor 903 can determine the posture, motion, and the like of the terminal according to the received data, which is not limited herein.
处理器903还可以包括中央处理单元(CPU,Central Processing Unit)。或者,处理器903也可以理解为是控制器。The processor 903 may also include a Central Processing Unit (CPU). Alternatively, processor 903 can also be understood to be a controller.
存储器901可以包括只读存储器和随机存取存储器,并向处理器903提供指令和数据等。存储器901的一部分还可包括非易失性随机存取存储器。例如,计算机可读存储介质,其可包括计算机指令、应用程序、操作系统等。具体的应用中各组件例如通过总线系统耦合在一起。总线系统除了可包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统。The memory 901 may include a read only memory and a random access memory, and supplies instructions, data, and the like to the processor 903. A portion of the memory 901 may also include a non-volatile random access memory. For example, a computer readable storage medium may include computer instructions, applications, operating systems, and the like. The components of a particular application are coupled together, for example, via a bus system. In addition to the data bus, the bus system can also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the various buses are labeled as bus systems in the figure.
上述本发明实施例揭示的方法可由处理器903实现。处理器903可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器903中的硬件的集成逻辑电路或者软件形式的指令完成。其中,上述处理器903可以是通用处理器、数字信号处理器、专用集成电路、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。处理器903可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。处理器903可以是图像处理器、微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位 于存储器901,例如处理器903可读取存储器901中的应用程序、计算机指令或数据,结合其硬件完成终端所执行的上述方法的步骤。The method disclosed in the foregoing embodiments of the present invention may be implemented by the processor 903. Processor 903 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 903 or an instruction in a form of software. 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, a discrete gate or transistor logic device, or a discrete hardware component. The processor 903 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention. The processor 903 can be an image processor, a microprocessor, or the processor can be any conventional processor or the like. The steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor. The software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like. The storage medium is located in the memory 901. For example, the processor 903 can read an application, computer instructions or data in the memory 901, and complete the steps of the above-described method performed by the terminal in combination with its hardware.
例如,所述处理器903用于调用所述计算机指令,以执行以下方法:For example, the processor 903 is configured to invoke the computer instructions to perform the following methods:
当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行所述磁力计的校准动作;When the condition for calibrating the magnetometer is satisfied, the prompt information is output, and the prompt information is used to prompt the user to perform the calibration action of the magnetometer on the terminal;
获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;Obtaining magnetic data collected by the magnetometer during the user performing the calibration action;
根据所述磁力数据,对所述磁力计进行校准。The magnetometer is calibrated based on the magnetic force data.
当然,处理器903还可以调用计算机指令执行上述方法实施例中的任意一种方法,在此不再赘述。Of course, the processor 903 can also execute any one of the foregoing method embodiments by using a computer instruction, and details are not described herein again.
本申请实施例还提供一种计算机可读性存储介质,其特征在于,包括计算机指令,所述计算机指令用于被处理器执行以实现上述方法实施例中的任意一种方法。The embodiment of the present application further provides a computer readable storage medium, including computer instructions for being executed by a processor to implement any one of the foregoing method embodiments.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims (16)

  1. 一种磁力计的校准方法,其特征在于,包括:A method for calibrating a magnetometer, comprising:
    当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行所述磁力计的校准动作;When the condition for calibrating the magnetometer is satisfied, the prompt information is output, and the prompt information is used to prompt the user to perform the calibration action of the magnetometer on the terminal;
    获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;Obtaining magnetic data collected by the magnetometer during the user performing the calibration action;
    根据所述磁力数据,对所述磁力计进行校准。The magnetometer is calibrated based on the magnetic force data.
  2. 根据权利要求1所述的校准方法,其特征在于,The calibration method according to claim 1, wherein
    所述输出提示信息,包括:The output prompt information includes:
    输出第一提示信息,所述第一提示信息用于提示用户执行第一校准动作;其中,所述第一校准动作包括将所述终端进行水平旋转,旋转角度大于或等于360度;And outputting the first prompt information, the first prompt information is used to prompt the user to perform the first calibration action; wherein the first calibration action comprises horizontally rotating the terminal, and the rotation angle is greater than or equal to 360 degrees;
    所述获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据,包括:And acquiring the magnetic force data collected by the magnetometer during the performing the calibration action by the user, including:
    获取所述磁力计在所述用户执行所述第一校准动作的过程中采集的I个第一磁力数据,其中,所述第一磁力数据为基于所述磁力计的相对坐标系中x轴方向的磁力数据,I为正整数;Obtaining, by the magnetometer, I first magnetic data collected during a process of the user performing the first calibration action, wherein the first magnetic force data is an x-axis direction in a relative coordinate system based on the magnetometer Magnetic data, I is a positive integer;
    获取所述磁力计在所述用户执行所述第一校准动作的过程中采集的J个第二磁力数据,其中,所述第二磁力数据为基于所述磁力计的相对坐标系中y轴方向的磁力数据,J为正整数。Obtaining J second magnetic data collected by the magnetometer during the performing of the first calibration action by the user, wherein the second magnetic force data is based on a y-axis direction in a relative coordinate system of the magnetometer Magnetic data, J is a positive integer.
  3. 根据权利要求2所述的校准方法,其特征在于,所述根据所述磁力数据,对所述磁力计进行校准,包括:The calibration method according to claim 2, wherein the calibrating the magnetometer according to the magnetic force data comprises:
    根据所述I个第一磁力数据,确定第一干扰数据;Determining, according to the first first magnetic data, first interference data;
    根据所述J个第二磁力数据,确定第二干扰数据;Determining second interference data according to the J second magnetic force data;
    根据所述第一干扰数据和所述第二干扰数据,对所述磁力计进行校准。Calibrating the magnetometer based on the first interference data and the second interference data.
  4. 根据权利要求1所述的校准方法,其特征在于,The calibration method according to claim 1, wherein
    所述输出提示信息,包括:The output prompt information includes:
    输出第二提示信息,所述第二提示信息用于提示用户执行第二校准动作;And outputting second prompt information, where the second prompt information is used to prompt the user to perform the second calibration action;
    其中,所述第二校准动作包括将所述终端移动至垂直向上的第一位置以及移动至垂直向下的第二位置;Wherein the second calibration action comprises moving the terminal to a first position vertically upward and a second position moving vertically downward;
    所述获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据,包括:And acquiring the magnetic force data collected by the magnetometer during the performing the calibration action by the user, including:
    获取所述磁力计在所述终端置于所述第一位置以及置于所述第二位置时分别采集的第三磁力数据;其中,所述第三磁力数据为基于所述磁力计的相对坐标系中z轴方向的磁力数据。Obtaining, by the magnetometer, third magnetic force data respectively collected when the terminal is placed in the first position and in the second position; wherein the third magnetic force data is based on a relative coordinate of the magnetometer The magnetic data in the z-axis direction.
  5. 根据权利要求4所述的校准方法,其特征在于,所述根据所述磁力数据,对所述磁力计进行校准,包括:The calibration method according to claim 4, wherein the calibrating the magnetometer according to the magnetic force data comprises:
    确定所述2个第三磁力数据的平均值为第三干扰数据;Determining an average value of the two third magnetic force data as third interference data;
    根据所述第三干扰数据,对所述磁力计进行校准。The magnetometer is calibrated based on the third disturbance data.
  6. 根据权利要求1-5任一项所述的校准方法,其特征在于,所述方法还包括: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 during the user performing the calibration action;
    若监测到所述校准动作处于偏离状态,则输出第三提示信息,所述第三提示信息用于提示用户所述校准动作处于偏离状态。If it is detected that the calibration action is in a deviation state, the third prompt information is output, and the third prompt information is used to prompt the user that the calibration action is in a deviation state.
  7. 根据权利要求6所述的校准方法,其特征在于,所述方法还包括:The calibration method according to claim 6, wherein the method further comprises:
    若监测到所述校准动作处于偏离状态,确定与所述偏离状态对应的动作调整信息;If it is detected that the calibration action is in a deviation state, determining motion adjustment information corresponding to the deviation state;
    输出所述动作调整信息,以提示用户根据所述动作调整信息对所述校准动作进行调整。The action adjustment information is output to prompt the user to adjust the calibration action according to the action adjustment information.
  8. 一种终端,其特征在于,包括:A terminal, comprising:
    磁力计;Magnetometer
    存储器;以及Memory;
    与所述存储器耦合的处理器;a processor coupled to the memory;
    其中,所述存储器用于存储计算机指令;Wherein the memory is used to store computer instructions;
    所述处理器用于调用所述计算机指令,以执行以下方法:The processor is configured to invoke the computer instructions to perform the following methods:
    当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行所述磁力计的校准动作;When the condition for calibrating the magnetometer is satisfied, the prompt information is output, and the prompt information is used to prompt the user to perform the calibration action of the magnetometer on the terminal;
    获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;Obtaining magnetic data collected by the magnetometer during the user performing the calibration action;
    根据所述磁力数据,对所述磁力计进行校准。The magnetometer is calibrated based on the magnetic force data.
  9. 根据权利要求8所述的终端,其特征在于,所述处理器还用于调用所述计算机指令,以执行以下方法:The terminal according to claim 8, wherein the processor is further configured to invoke the computer instruction to perform the following method:
    输出第一提示信息,所述第一提示信息用于提示用户执行第一校准动作;其中,所述第一校准动作包括将所述终端进行水平旋转,旋转角度大于或等于360度;And outputting the first prompt information, the first prompt information is used to prompt the user to perform the first calibration action; wherein the first calibration action comprises horizontally rotating the terminal, and the rotation angle is greater than or equal to 360 degrees;
    获取所述磁力计在所述用户执行所述第一校准动作的过程中采集的I个第一磁力数据,其中,所述第一磁力数据为基于所述磁力计的相对坐标系中x轴方向的磁力数据,I为正整数;Obtaining, by the magnetometer, I first magnetic data collected during a process of the user performing the first calibration action, wherein the first magnetic force data is an x-axis direction in a relative coordinate system based on the magnetometer Magnetic data, I is a positive integer;
    获取所述磁力计在所述用户执行所述第一校准动作的过程中采集的J个第二磁力数据,其中,所述第二磁力数据为基于所述磁力计的相对坐标系中y轴方向的磁力数据,J为正整数。Obtaining J second magnetic data collected by the magnetometer during the performing of the first calibration action by the user, wherein the second magnetic force data is based on a y-axis direction in a relative coordinate system of the magnetometer Magnetic data, J is a positive integer.
  10. 根据权利要求9所述的终端,其特征在于,所述处理器还用于调用所述计算机指令,以执行以下方法:The terminal according to claim 9, wherein the processor is further configured to invoke the computer instruction to perform the following method:
    根据所述I个第一磁力数据,确定第一干扰数据;Determining, according to the first first magnetic data, first interference data;
    根据所述J个第二磁力数据,确定第二干扰数据;Determining second interference data according to the J second magnetic force data;
    根据所述第一干扰数据和所述第二干扰数据,对所述磁力计进行校准。Calibrating the magnetometer based on the first interference data and the second interference data.
  11. 根据权利要求8所述的终端,其特征在于,所述处理器还用于调用所述计算机指令,以执行以下方法:The terminal according to claim 8, wherein the processor is further configured to invoke the computer instruction to perform the following method:
    输出第二提示信息,所述第二提示信息用于提示用户执行第二校准动作;And outputting second prompt information, where the second prompt information is used to prompt the user to perform the second calibration action;
    其中,所述第二校准动作包括将所述终端移动至垂直向上的第一位置以及移动至垂直向下的第二位置;Wherein the second calibration action comprises moving the terminal to a first position vertically upward and a second position moving vertically downward;
    获取所述磁力计在所述终端置于所述第一位置以及置于所述第二位置时分别采集的第三磁力数据;其中,所述第三磁力数据为基于所述磁力计的相对坐标系中z轴方向的磁力数据。Obtaining, by the magnetometer, third magnetic force data respectively collected when the terminal is placed in the first position and in the second position; wherein the third magnetic force data is based on a relative coordinate of the magnetometer The magnetic data in the z-axis direction.
  12. 根据权利要求11所述的终端,其特征在于,所述处理器根据所述磁力数据,对所述磁力计进行校准,包括:The terminal according to claim 11, wherein the processor calibrates the magnetometer according to the magnetic force data, including:
    确定所述2个第三磁力数据的平均值为第三干扰数据;Determining an average value of the two third magnetic force data as third interference data;
    根据所述第三干扰数据,对所述磁力计进行校准。The magnetometer is calibrated based on the third disturbance data.
  13. 根据权利要求8-12任一项所述的终端,其特征在于,所述处理器还用于调用所述计算机指令,以执行以下方法:The terminal according to any one of claims 8 to 12, wherein the processor is further configured to invoke the computer instruction to perform the following method:
    在所述用户执行所述校准动作时,监测所述校准动作是否处于偏离状态;Monitoring whether the calibration action is in a deviation state when the user performs the calibration action;
    若监测到所述校准动作处于偏离状态,则输出第三提示信息,所述第三提示信息用于提示用户所述校准动作处于偏离状态。If it is detected that the calibration action is in a deviation state, the third prompt information is output, and the third prompt information is used to prompt the user that the calibration action is in a deviation state.
  14. 根据权利要求13所述的终端,其特征在于,所述处理器还用于调用所述计算机指令,以执行以下方法:The terminal according to claim 13, wherein the processor is further configured to invoke the computer instruction to perform the following method:
    若监测到所述校准动作处于偏离状态,确定与所述偏离状态对应的动作调整信息;If it is detected that the calibration action is in a deviation state, determining motion adjustment information corresponding to the deviation state;
    输出所述动作调整信息,以提示用户根据所述动作调整信息对所述校准动作进行调整。The action adjustment information is output to prompt the user to adjust the calibration action according to the action adjustment information.
  15. 一种终端,其特征在于,包括:输入单元,处理单元和输出单元;A terminal, comprising: an input unit, a processing unit and an output unit;
    其中,所述输出单元,用于当满足对磁力计进行校准的条件时,输出提示信息,所述提示信息用于提示用户对终端执行所述磁力计的校准动作;The output unit is configured to output prompt information when the condition for calibrating the magnetometer is satisfied, where the prompt information is used to prompt the user to perform a calibration action of the magnetometer on the terminal;
    所述输入单元,用于获取所述磁力计在所述用户执行所述校准动作的过程中采集的磁力数据;The input unit is configured to acquire magnetic data collected by the magnetometer during the user performing the calibration action;
    所述处理单元,用于根据所述磁力数据,对所述磁力计进行校准。The processing unit is configured to calibrate the magnetometer according to the magnetic force data.
  16. 一种计算机可读性存储介质,其特征在于,包括计算机指令,所述计算机指令用于被处理器执行以实现如权利要求1至7任意一项所述的方法。A computer readable storage medium, comprising computer instructions for being executed by a processor to implement the method of any one of claims 1 to 7.
PCT/CN2017/119115 2017-12-27 2017-12-27 Calibration method for magnetometer and related device WO2019127139A1 (en)

Priority Applications (2)

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
CN201780097424.6A CN111433562A (en) 2017-12-27 2017-12-27 Calibration method for magnetometer and related equipment

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
WO2019127139A1 true WO2019127139A1 (en) 2019-07-04

Family

ID=67062792

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (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
CN115655310B (en) * 2022-10-26 2024-04-05 荣耀终端有限公司 Data calibration method, electronic device and readable storage medium

Citations (8)

* 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
CN102620725A (en) * 2012-03-16 2012-08-01 惠州Tcl移动通信有限公司 Method for calibrating compasses of mobile devices
CN105571614A (en) * 2015-12-14 2016-05-11 广东欧珀移动通信有限公司 Magnetic sensor calibration method and device
CN105700041A (en) * 2016-01-20 2016-06-22 广东欧珀移动通信有限公司 Magnetic sensor calibration control method and user terminal
CN105910593A (en) * 2016-04-12 2016-08-31 广东欧珀移动通信有限公司 Method and apparatus for calibrating geomagnetic sensor of terminal
US20160327389A1 (en) * 2015-05-06 2016-11-10 Gopro, Inc. Calibration Transfer Between Two Devices
CN106153025A (en) * 2016-06-17 2016-11-23 上海拓攻机器人有限公司 Many rotor wing unmanned aerial vehicles and the calibration steps of electronic compass, system
CN106225806A (en) * 2016-07-06 2016-12-14 广东欧珀移动通信有限公司 The calibration method of Magnetic Sensor, device and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8437970B2 (en) * 2009-06-05 2013-05-07 Apple Inc. Restoring and storing magnetometer calibration data
CN103884326B (en) * 2012-12-21 2016-08-10 北京合众思壮科技股份有限公司 electronic compass calibration method
US9671226B2 (en) * 2014-12-17 2017-06-06 Honeywell International Inc. Magnetic sensor calibration for aircraft

Patent Citations (8)

* 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
CN102620725A (en) * 2012-03-16 2012-08-01 惠州Tcl移动通信有限公司 Method for calibrating compasses of mobile devices
US20160327389A1 (en) * 2015-05-06 2016-11-10 Gopro, Inc. Calibration Transfer Between Two Devices
CN105571614A (en) * 2015-12-14 2016-05-11 广东欧珀移动通信有限公司 Magnetic sensor calibration method and device
CN105700041A (en) * 2016-01-20 2016-06-22 广东欧珀移动通信有限公司 Magnetic sensor calibration control method and user terminal
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
CN106225806A (en) * 2016-07-06 2016-12-14 广东欧珀移动通信有限公司 The calibration method of Magnetic Sensor, device and mobile terminal

Also Published As

Publication number Publication date
CN111433562A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
JP6514089B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING SYSTEM, AND INFORMATION PROCESSING METHOD
US9311883B2 (en) Recalibration of a flexible mixed reality device
JP6565465B2 (en) Image display device, computer program, and image display system
US20190317532A1 (en) Gimbal control method, control system, gimbal, and unmanned aircraft
US10197587B2 (en) Device and method for using time rate of change of sensor data to determine device rotation
US10072956B2 (en) Systems and methods for detecting and handling a magnetic anomaly
EP3859495B1 (en) Systems and methods for tracking motion and gesture of heads and eyes
US10540006B2 (en) Tracking torso orientation to generate inputs for computer systems
US20190187784A1 (en) Calibration of Inertial Measurement Units Attached to Arms of a User and to a Head Mounted Device
US20150286279A1 (en) Systems and methods for guiding a user during calibration of a sensor
JP2014199964A (en) Imaging apparatus and image processing apparatus
JP2008064761A (en) Hybrid type sensor module and sensing method using it
CN109982038A (en) Show the method, apparatus and computer equipment of sound source position
JP2017166895A (en) Electronic apparatus, sensor calibration method, and sensor calibration program
JP5937137B2 (en) Geomagnetic detector
WO2019127139A1 (en) Calibration method for magnetometer and related device
KR20200116693A (en) Method for controlling display and electronic deivce thereof
CN110567491A (en) Initial alignment method and device of inertial navigation system and electronic equipment
JP2005061969A (en) Azimuthal angle measuring instrument and azimuthal angle measuring method
JP2012088073A (en) Azimuth estimation apparatus and program
US10473464B2 (en) Cuboid inertial measurement unit
CN113432620B (en) Error estimation method and device, vehicle-mounted terminal and storage medium
JP6014711B2 (en) Mobile devices and autonomous navigation calculation
JP2013217793A (en) Off-set calculation device, off-set calculation method, program, and information processing device
TWI635318B (en) Head mounted display, control method, and non-transitory computer-readable medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17936012

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17936012

Country of ref document: EP

Kind code of ref document: A1