[go: up one dir, main page]

CN106293006B - Method and device for operating magnetic sensor calibration algorithm library and mobile terminal - Google Patents

Method and device for operating magnetic sensor calibration algorithm library and mobile terminal Download PDF

Info

Publication number
CN106293006B
CN106293006B CN201610665666.8A CN201610665666A CN106293006B CN 106293006 B CN106293006 B CN 106293006B CN 201610665666 A CN201610665666 A CN 201610665666A CN 106293006 B CN106293006 B CN 106293006B
Authority
CN
China
Prior art keywords
magnetic sensor
algorithm library
calibration algorithm
data
sensor calibration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610665666.8A
Other languages
Chinese (zh)
Other versions
CN106293006A (en
Inventor
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610665666.8A priority Critical patent/CN106293006B/en
Publication of CN106293006A publication Critical patent/CN106293006A/en
Application granted granted Critical
Publication of CN106293006B publication Critical patent/CN106293006B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Navigation (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method and a device for operating a magnetic sensor calibration algorithm library and a mobile terminal. The method comprises the following steps: when detecting that the application program of the magnetic sensor is started, acquiring the GPS signal intensity; and when the GPS signal intensity is not less than a preset threshold value, operating a magnetic sensor calibration algorithm library to calibrate the magnetic sensor. The invention can accurately control the operation of the magnetic sensor calibration algorithm library, and does not need to operate the magnetic sensor calibration algorithm library all the time to carry out meaningless calibration, thereby reducing the power consumption of the mobile terminal.

Description

运行磁传感器校准算法库的方法、装置及移动终端Method, device and mobile terminal for running magnetic sensor calibration algorithm library

技术领域technical field

本发明实施例涉及测量技术,尤其涉及一种运行磁传感器校准算法库的方法、装置及移动终端。Embodiments of the present invention relate to measurement technology, and in particular, to a method, device and mobile terminal for running a magnetic sensor calibration algorithm library.

背景技术Background technique

在移动终端中,导航软件的使用频率越来越高,比如说百度地图、高德导航等。用户打开导航软件的时候,会看到一个箭头,提示当前方位以及要前进的方向。这个方向是通过读取磁传感器的数据来计算得到的,即通过磁传感器数据得到指南针指向,计算指南针指向与移动终端方向之间的夹角得到箭头的指向。In mobile terminals, navigation software is used more and more frequently, such as Baidu Maps, AutoNavi and so on. When the user opens the navigation software, they will see an arrow indicating the current position and the direction to go. This direction is calculated by reading the data of the magnetic sensor, that is, the direction of the compass is obtained from the data of the magnetic sensor, and the direction of the arrow is obtained by calculating the angle between the direction of the compass and the direction of the mobile terminal.

由于磁传感器总是容易受到干扰,往往都需要校准之后,才可以提供一个准确的,偏差不大的方向。现有技术中,校准的工作是通过磁传感器校准算法库在后台完成的,需要开启加速度传感器、陀螺仪、磁传感器等来对磁传感器进行校准,但是,很多场景下,由于磁传感器处于干扰强烈且变化的环境中时,磁传感器的校准是没有意义的,导致移动终端的功耗较大。Since magnetic sensors are always susceptible to interference, they often need to be calibrated before they can provide an accurate direction with little deviation. In the prior art, the calibration work is done in the background through the magnetic sensor calibration algorithm library, and the acceleration sensor, gyroscope, magnetic sensor, etc. need to be turned on to calibrate the magnetic sensor. However, in many scenarios, due to the strong interference of the magnetic sensor. And in a changing environment, the calibration of the magnetic sensor is meaningless, resulting in a large power consumption of the mobile terminal.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明实施例提供一种运行磁传感器校准算法库的方法、装置及移动终端,以降低移动终端的功耗。In view of this, embodiments of the present invention provide a method, an apparatus, and a mobile terminal for running a magnetic sensor calibration algorithm library, so as to reduce the power consumption of the mobile terminal.

第一方面,本发明实施例提供了一种运行磁传感器校准算法库的方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for running a magnetic sensor calibration algorithm library, the method comprising:

当检测到磁传感器的应用程序开启时,获取GPS信号强度;Get the GPS signal strength when the app that detects the magnetic sensor is open;

当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准。When the GPS signal strength is not less than a preset threshold, the magnetic sensor calibration algorithm library is run to calibrate the magnetic sensor.

第二方面,本发明实施例还提供了一种运行磁传感器校准算法库的装置,所述装置包括:In a second aspect, an embodiment of the present invention further provides a device for running a magnetic sensor calibration algorithm library, the device comprising:

GPS信号强度获取模块,用于当检测到磁传感器的应用程序开启时,获取GPS信号强度;The GPS signal strength acquisition module is used to obtain the GPS signal strength when the application program that detects the magnetic sensor is opened;

磁传感器校准模块,用于当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准。A magnetic sensor calibration module, configured to run a magnetic sensor calibration algorithm library to calibrate the magnetic sensor when the GPS signal strength is not less than a preset threshold.

第三方面,本发明实施例还提供了一种移动终端,所述移动终端集成了本发明任一实施例所述的运行磁传感器校准算法库的装置。In a third aspect, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal integrates the apparatus for running a magnetic sensor calibration algorithm library according to any embodiment of the present invention.

本发明实施例的技术方案,通过当检测到磁传感器的应用程序开启时,获取GPS信号强度,当GPS信号强度不小于预设阈值时,才运行磁传感器校准算法库来对磁传感器进行校准,可以准确控制磁传感器校准算法库的运行,不用一直运行磁传感器校准算法库进行无意义的校准,从而降低了移动终端的功耗。According to the technical solution of the embodiment of the present invention, when it is detected that the application program of the magnetic sensor is opened, the GPS signal strength is obtained, and when the GPS signal strength is not less than a preset threshold, the magnetic sensor calibration algorithm library is run to calibrate the magnetic sensor, The operation of the magnetic sensor calibration algorithm library can be accurately controlled, and there is no need to run the magnetic sensor calibration algorithm library all the time for meaningless calibration, thereby reducing the power consumption of the mobile terminal.

附图说明Description of drawings

图1是本发明实施例一提供的一种运行磁传感器校准算法库的方法的流程图;FIG. 1 is a flowchart of a method for running a magnetic sensor calibration algorithm library provided by Embodiment 1 of the present invention;

图2是本发明实施例二提供的一种运行磁传感器校准算法库的方法的流程图;2 is a flowchart of a method for running a magnetic sensor calibration algorithm library provided in Embodiment 2 of the present invention;

图3是本发明实施例三提供的一种运行磁传感器校准算法库的方法的流程图;3 is a flowchart of a method for running a magnetic sensor calibration algorithm library provided by Embodiment 3 of the present invention;

图4是本发明实施例四提供的一种运行磁传感器校准算法库的装置的结构示意图;4 is a schematic structural diagram of a device for running a magnetic sensor calibration algorithm library provided in Embodiment 4 of the present invention;

图5为本发明实施例五提供的一种移动终端的结构示意图。FIG. 5 is a schematic structural diagram of a mobile terminal according to Embodiment 5 of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部内容。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all of the contents related to the present invention.

实施例一Example 1

图1是本发明实施例一提供的一种运行磁传感器校准算法库的方法的流程图,本实施例可适用于根据GPS信号强度运行磁传感器校准算法库的情况,该方法可以由运行磁传感器校准算法库的装置来执行,该运行磁传感器校准算法库的装置可以配置在手机或平板电脑等移动终端中,该方法具体包括如下步骤:FIG. 1 is a flowchart of a method for running a magnetic sensor calibration algorithm library provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of running the magnetic sensor calibration algorithm library according to the GPS signal strength. The method can be executed by running the magnetic sensor. The device for calibrating the algorithm library is executed. The device for running the magnetic sensor calibration algorithm library can be configured in a mobile terminal such as a mobile phone or a tablet computer. The method specifically includes the following steps:

步骤110,当检测到磁传感器的应用程序开启时,获取GPS信号强度。Step 110, when it is detected that the application program of the magnetic sensor is started, the GPS signal strength is obtained.

其中,磁传感器的应用程序是指需要调用磁传感器的数据的应用程序。所述磁传感器的应用程序优选包括地图应用或者指南针应用。其中,地图应用需要根据磁传感器的数据计算得到要前进的方向,指南针应用需要根据磁传感器的数据计算得到指南针的指向。The application program of the magnetic sensor refers to an application program that needs to call the data of the magnetic sensor. The application of the magnetic sensor preferably includes a map application or a compass application. Among them, the map application needs to calculate the direction to go according to the data of the magnetic sensor, and the compass application needs to calculate the direction of the compass according to the data of the magnetic sensor.

实时检测磁传感器的应用程序是否开启,当检测到磁传感器的应用程序开启时,获取GPS(Global Positioning System,全球定位系统)信号强度,以排除移动终端处于大楼、隧道、地铁等等对磁传感器干扰强烈的环境,从而在这些环境中造成磁传感器的校准没有意义,同时还会增大移动终端的功耗的问题。Real-time detection of whether the application of the magnetic sensor is turned on, when it is detected that the application of the magnetic sensor is turned on, obtain the signal strength of GPS (Global Positioning System, Global Positioning System) to exclude the mobile terminal being in a building, tunnel, subway, etc. In the environment with strong interference, the calibration of the magnetic sensor is meaningless in these environments, and the power consumption of the mobile terminal is also increased.

步骤120,当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准。Step 120, when the GPS signal strength is not less than a preset threshold, run a magnetic sensor calibration algorithm library to calibrate the magnetic sensor.

通过给GPS信号强度设定预设阈值,并比较GPS信号强度与预设阈值的大小关系,来判断移动终端当前是否处于大楼、隧道、地铁等对磁传感器干扰强烈的环境,因为这些环境同样会影响GPS信号识别能力。By setting a preset threshold for the GPS signal strength, and comparing the relationship between the GPS signal strength and the preset threshold, it can be judged whether the mobile terminal is currently in an environment such as a building, tunnel, subway, etc. that strongly interferes with the magnetic sensor, because these environments will also Affects GPS signal recognition ability.

当GPS信号强度不小于预设阈值时,说明移动终端没有处于大楼、隧道或地铁等对磁传感器干扰强烈的环境中,因为移动终端大部分时间不会处于上述干扰强烈的环境中,所以此时对磁传感器的校准是有意义的,此时,运行磁传感器校准算法库获取相应的数据(如磁传感器的数据和加速度传感器的数据)来对所述磁传感器进行校准。当GPS信号强度小于所述预设阈值时,不运行磁传感器校准算法库,从而可以节省移动终端的功耗。When the GPS signal strength is not less than the preset threshold, it means that the mobile terminal is not in an environment with strong interference to the magnetic sensor such as buildings, tunnels or subways. It is meaningful to calibrate the magnetic sensor. At this time, the magnetic sensor calibration algorithm library is run to obtain corresponding data (such as the data of the magnetic sensor and the data of the acceleration sensor) to calibrate the magnetic sensor. When the GPS signal strength is less than the preset threshold, the magnetic sensor calibration algorithm library is not run, so that the power consumption of the mobile terminal can be saved.

本实施例的技术方案,通过当检测到磁传感器的应用程序开启时,获取GPS信号强度,当GPS信号强度不小于预设阈值时,才运行磁传感器校准算法库来对磁传感器进行校准,可以准确控制磁传感器校准算法库的运行,不用一直运行磁传感器校准算法库进行无意义的校准,从而降低了移动终端的功耗。In the technical solution of this embodiment, when it is detected that the application program of the magnetic sensor is opened, the GPS signal strength is obtained, and when the GPS signal strength is not less than a preset threshold, the magnetic sensor calibration algorithm library is run to calibrate the magnetic sensor, so that the The operation of the magnetic sensor calibration algorithm library is accurately controlled, and there is no need to run the magnetic sensor calibration algorithm library for meaningless calibration, thereby reducing the power consumption of the mobile terminal.

在上述实施例的基础上,还优选包括:On the basis of the above-mentioned embodiment, it also preferably includes:

当所述GPS信号强度小于所述预设阈值时,将所述磁传感器校准算法库进行休眠。When the GPS signal strength is less than the preset threshold, the magnetic sensor calibration algorithm library is put to sleep.

当所述GPS信号强度小于所述预设阈值时,说明移动终端没有处于大楼、隧道或地铁等对磁传感器干扰强烈的环境中,因为移动终端大部分时间不会处于上述干扰强烈的环境中,所以此时对磁传感器的校准是有意义的,此时,将所述磁传感器校准算法库进行休眠,不获取相应传感器的数据,因为即使获取了,计算出来的数据也是错误的,从而降低了移动终端的功耗。When the GPS signal strength is less than the preset threshold, it means that the mobile terminal is not in an environment with strong interference to the magnetic sensor such as buildings, tunnels or subways, because the mobile terminal will not be in the above-mentioned environment with strong interference most of the time, Therefore, it is meaningful to calibrate the magnetic sensor at this time. At this time, the magnetic sensor calibration algorithm library is put to sleep, and the data of the corresponding sensor is not obtained, because even if it is obtained, the calculated data is wrong, thereby reducing the Power consumption of mobile terminals.

实施例二Embodiment 2

图2是本发明实施例二提供的一种运行磁传感器校准算法库的方法的流程图,本实施例在实施例一的基础上进行了优化,将“运行磁传感器校准算法库对所述磁传感器进行校准”进一步优化为“运行磁传感器校准算法库;获取加速度传感器、陀螺仪以及磁传感器的数据;根据所述加速度传感器、陀螺仪以及磁传感器的数据,对所述磁传感器进行校准”,该方法具体包括如下步骤:2 is a flowchart of a method for running a magnetic sensor calibration algorithm library provided in Embodiment 2 of the present invention. This embodiment is optimized on the basis of Embodiment 1. Sensor calibration" is further optimized to "run the magnetic sensor calibration algorithm library; obtain the data of the acceleration sensor, gyroscope and magnetic sensor; calibrate the magnetic sensor according to the data of the acceleration sensor, gyroscope and magnetic sensor", The method specifically includes the following steps:

步骤210,当检测到磁传感器的应用程序开启时,获取GPS信号强度。Step 210, when it is detected that the application program of the magnetic sensor is started, the GPS signal strength is acquired.

步骤220,当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库。Step 220, when the GPS signal strength is not less than a preset threshold, run the magnetic sensor calibration algorithm library.

当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库,来获取相应传感器的数据,从而完成对磁传感器的校准。When the GPS signal strength is not less than the preset threshold, the magnetic sensor calibration algorithm library is run to acquire the data of the corresponding sensor, thereby completing the calibration of the magnetic sensor.

步骤230,获取加速度传感器、陀螺仪以及磁传感器的数据。Step 230: Acquire the data of the acceleration sensor, the gyroscope and the magnetic sensor.

运行磁传感器校准算法库后,磁传感器校准算法库会获取加速度传感器、陀螺仪以及磁传感器的数据,从而根据各个传感器的数据完成对磁传感器的校准。After running the magnetic sensor calibration algorithm library, the magnetic sensor calibration algorithm library will obtain the data of the acceleration sensor, gyroscope and magnetic sensor, so as to complete the calibration of the magnetic sensor according to the data of each sensor.

步骤240,根据所述加速度传感器、陀螺仪以及磁传感器的数据,对所述磁传感器进行校准。In step 240, the magnetic sensor is calibrated according to the data of the acceleration sensor, the gyroscope and the magnetic sensor.

根据所述加速度传感器、陀螺仪以及磁传感器的数据,利用磁传感器校准算法库来对所述磁传感器进行校准。可以将所述加速度传感器、陀螺仪和磁传感器的数据代入磁传感器校准算法库的相应算法的相应位置,运行磁传感器校准算法库完成对磁传感器的校准。According to the data of the acceleration sensor, the gyroscope and the magnetic sensor, the magnetic sensor is calibrated by using a magnetic sensor calibration algorithm library. The data of the acceleration sensor, the gyroscope and the magnetic sensor can be substituted into the corresponding position of the corresponding algorithm of the magnetic sensor calibration algorithm library, and the magnetic sensor calibration algorithm library is run to complete the calibration of the magnetic sensor.

本实施例的技术方案,在上述实施例的基础上,通过当GPS信号强度不小于所述预设阈值时,运行磁传感器校准算法库,获取加速度传感器、陀螺仪以及磁传感器的数据,根据获取的数据对磁传感器进行校准,从而降低了移动终端的功耗。The technical solution of this embodiment is based on the above-mentioned embodiment, by running the magnetic sensor calibration algorithm library when the GPS signal strength is not less than the preset threshold, to obtain the data of the acceleration sensor, the gyroscope and the magnetic sensor, according to the obtained data The data of the magnetic sensor is calibrated, thereby reducing the power consumption of the mobile terminal.

实施例三Embodiment 3

图3是本发明实施例三提供的一种运行磁传感器校准算法库的方法的流程图,本实施例在上述实施例的基础上进行了优化,在运行磁传感器校准算法库对所述磁传感器进行校准之后,增加了“获取校准后的磁传感器的数据,并将该磁传感器的数据上报给磁传感器的应用程序”,该方法具体包括如下步骤:FIG. 3 is a flowchart of a method for running a magnetic sensor calibration algorithm library provided by Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiment. When running the magnetic sensor calibration algorithm library, the magnetic sensor After the calibration, "obtain the data of the magnetic sensor after calibration, and report the data of the magnetic sensor to the application program of the magnetic sensor" is added, and the method specifically includes the following steps:

步骤310,当检测到磁传感器的应用程序开启时,获取GPS信号强度。Step 310, when it is detected that the application program of the magnetic sensor is started, the GPS signal strength is acquired.

步骤320,当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准。Step 320, when the GPS signal strength is not less than a preset threshold, run a magnetic sensor calibration algorithm library to calibrate the magnetic sensor.

步骤330,获取校准后的磁传感器的数据,并将该磁传感器的数据上报给磁传感器的应用程序。Step 330: Acquire the data of the magnetic sensor after calibration, and report the data of the magnetic sensor to the application program of the magnetic sensor.

对磁传感器的校准完成后,获取磁传感器的数据,将获取的磁传感器的数据上报给磁传感器的应用程序,从而,磁传感器的应用程序可以根据磁传感器的数据计算得到相应的展示数据,展示给用户。如,地图应用计算得到正确的前进方向,指南针应用计算得到正确的指南针的指向。After the calibration of the magnetic sensor is completed, the data of the magnetic sensor is obtained, and the obtained data of the magnetic sensor is reported to the application of the magnetic sensor, so that the application of the magnetic sensor can calculate and obtain the corresponding display data according to the data of the magnetic sensor. to users. For example, the map application calculates the correct heading, and the compass application calculates the correct compass pointing.

本实施例的技术方案,通过当GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对磁传感器校准后,获取磁传感器的数据,并上报给磁传感器的应用程序,使得磁传感器的应用程序可以根据磁传感器的数据计算得到相应的展示数据,使得展示数据更加准确。In the technical solution of this embodiment, when the GPS signal strength is not less than the preset threshold, after the magnetic sensor is calibrated by running the magnetic sensor calibration algorithm library, the data of the magnetic sensor is obtained and reported to the application program of the magnetic sensor, so that the The application can calculate the corresponding display data according to the data of the magnetic sensor, which makes the display data more accurate.

实施例四Embodiment 4

图4是本发明实施例四提供的一种运行磁传感器校准算法库的装置的结构示意图,如图4所示,本实施例所述的运行磁传感器校准算法库的装置包括:GPS信号强度获取模块410和磁传感器校准模块420。FIG. 4 is a schematic structural diagram of a device for running a magnetic sensor calibration algorithm library provided in Embodiment 4 of the present invention. As shown in FIG. 4 , the device for running a magnetic sensor calibration algorithm library according to this embodiment includes: GPS signal strength acquisition Module 410 and Magnetic Sensor Calibration Module 420.

其中,GPS信号强度获取模块410,用于当检测到磁传感器的应用程序开启时,获取GPS信号强度;Wherein, the GPS signal strength acquisition module 410 is used to acquire the GPS signal strength when it is detected that the application program of the magnetic sensor is opened;

磁传感器校准模块420,用于当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准。The magnetic sensor calibration module 420 is configured to run a magnetic sensor calibration algorithm library to calibrate the magnetic sensor when the GPS signal strength is not less than a preset threshold.

可选的,还包括:Optionally, also include:

休眠模块,用于当所述GPS信号强度小于所述预设阈值时,将所述磁传感器校准算法库进行休眠。A sleep module, configured to sleep the magnetic sensor calibration algorithm library when the GPS signal strength is less than the preset threshold.

可选的,所述磁传感器校准模块包括:Optionally, the magnetic sensor calibration module includes:

运行单元,用于运行磁传感器校准算法库;A running unit for running the magnetic sensor calibration algorithm library;

数据获取单元,用于获取加速度传感器、陀螺仪以及磁传感器的数据;The data acquisition unit is used to acquire the data of the acceleration sensor, the gyroscope and the magnetic sensor;

磁传感器校准单元,用于根据所述加速度传感器、陀螺仪以及磁传感器的数据,对所述磁传感器进行校准。The magnetic sensor calibration unit is used for calibrating the magnetic sensor according to the data of the acceleration sensor, the gyroscope and the magnetic sensor.

可选的,还包括:Optionally, also include:

数据上报模块,用于在运行磁传感器校准算法库对所述磁传感器进行校准之后,获取校准后的磁传感器的数据,并将该磁传感器的数据上报给磁传感器的应用程序。The data reporting module is used for obtaining the data of the magnetic sensor after calibration after running the magnetic sensor calibration algorithm library to calibrate the magnetic sensor, and reporting the data of the magnetic sensor to the application program of the magnetic sensor.

其中,所述磁传感器的应用程序优选包括地图应用或者指南针应用。Wherein, the application program of the magnetic sensor preferably includes a map application or a compass application.

上述运行磁传感器校准算法库的装置可执行本发明任意实施例所提供的运行磁传感器校准算法库的方法,具备执行方法相应的功能模块和有益效果。The above apparatus for running the magnetic sensor calibration algorithm library can execute the method for running the magnetic sensor calibration algorithm library provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

实施例五Embodiment 5

本实施例提供了一种移动终端,该移动终端可以包括本发明任意实施例提供的运行磁传感器校准算法库的装置。图5为本发明实施例五提供的一种移动终端的结构示意图,如图5所示,该移动终端可以包括:存储器501、中央处理器(Central Processing Unit,以下简称CPU)502、外设接口503、RF(Radio Frequency,射频)电路505、音频电路506、扬声器511、电源管理芯片508、输入/输出(I/O)子系统509、触摸屏512、其他输入/控制设备510以及外部端口504,这些部件通过一个或多个通信总线或信号线507来通信。This embodiment provides a mobile terminal, and the mobile terminal may include the apparatus for running the magnetic sensor calibration algorithm library provided in any embodiment of the present invention. FIG. 5 is a schematic structural diagram of a mobile terminal according to Embodiment 5 of the present invention. As shown in FIG. 5 , the mobile terminal may include: a memory 501 , a central processing unit (Central Processing Unit, CPU for short) 502 , and a peripheral interface 503, an RF (Radio Frequency, radio frequency) circuit 505, an audio circuit 506, a speaker 511, a power management chip 508, an input/output (I/O) subsystem 509, a touch screen 512, other input/control devices 510, and an external port 504, These components communicate through one or more communication buses or signal lines 507 .

应该理解的是,图示移动终端500仅仅是移动终端的一个范例,并且移动终端500可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 500 is merely an example of a mobile terminal, and that the mobile terminal 500 may have more or fewer components than those shown in the figures, two or more components may be combined, Or can have different component configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.

下面就本实施例提供的用于运行磁传感器校准算法库的移动终端进行详细的描述,该移动终端以手机为例。The following will describe in detail the mobile terminal provided in this embodiment for running the magnetic sensor calibration algorithm library, and the mobile terminal is a mobile phone as an example.

存储器501,所述存储器501可以被CPU502、外设接口503等访问,所述存储器501可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 501, which can be accessed by CPU 502, peripheral interface 503, etc., said memory 501 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage devices, flash memory devices , or other volatile solid-state storage devices.

外设接口503,所述外设接口503可以将设备的输入和输出外设连接到CPU502和存储器501。A peripheral interface 503 that can connect the input and output peripherals of the device to the CPU 502 and the memory 501 .

I/O子系统509,所述I/O子系统509可以将设备上的输入输出外设,例如触摸屏502(相当于上述实施例中的屏幕)和其他输入/控制设备510,连接到外设接口503。I/O子系统509可以包括显示控制器5091和用于控制其他输入/控制设备510的一个或多个输入控制器5092。其中,一个或多个输入控制器5092从其他输入/控制设备510接收电信号或者向其他输入/控制设备510发送电信号,其他输入/控制设备510可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器5092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 509, which can connect input and output peripherals on the device, such as touch screen 502 (equivalent to the screen in the above embodiment) and other input/control devices 510, to the peripherals interface 503. The I/O subsystem 509 may include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510 . Among them, one or more input controllers 5092 receive electrical signals from or send electrical signals to other input/control devices 510, which may include physical buttons (push buttons, rocker buttons, etc. ), dial pad, slide switch, joystick, click wheel. Notably, the input controller 5092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.

触摸屏512,所述触摸屏512是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。The touch screen 512, which is an input interface and an output interface between the user terminal and the user, displays visual output to the user, and the visual output may include graphics, text, icons, videos, and the like.

I/O子系统509中的显示控制器5091从触摸屏512接收电信号或者向触摸屏512发送电信号。触摸屏512检测触摸屏上的接触,显示控制器5091将检测到的接触转换为与显示在触摸屏512上的用户界面对象的交互,即实现人机交互,显示在触摸屏512上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。Display controller 5091 in I/O subsystem 509 receives electrical signals from touch screen 512 or sends electrical signals to touch screen 512 . The touch screen 512 detects the contact on the touch screen, and the display controller 5091 converts the detected contact into interaction with the user interface object displayed on the touch screen 512, that is, to realize human-computer interaction, and the user interface object displayed on the touch screen 512 can be run. Icons for games, icons for connecting to the corresponding network, etc. It is worth noting that the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the touch-sensitive surface formed by a touch screen.

RF电路505,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路505接收并发送RF信号,RF信号也称为电磁信号,RF电路505将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路505可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 505 is mainly used to establish the communication between the mobile phone and the wireless network (ie, the network side), and realize the data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving text messages, e-mails, etc. Specifically, the RF circuit 505 receives and transmits RF signals, also known as electromagnetic signals, the RF circuit 505 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with communication networks and other devices through the electromagnetic signals to communicate. RF circuitry 505 may include known circuitry for performing these functions including, but not limited to, antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, CODECs ( COder-DECoder, codec) chip set, subscriber identity module (Subscriber Identity Module, SIM) and so on.

音频电路506,主要用于从外设接口503接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器511。The audio circuit 506 is mainly used for receiving audio data from the peripheral interface 503 , converting the audio data into an electrical signal, and sending the electrical signal to the speaker 511 .

扬声器511,用于将手机通过RF电路505从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 511 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 505 to sound and play the sound to the user.

电源管理芯片508,用于为CPU502、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 508 is used for power supply and power management for the hardware connected to the CPU 502, the I/O subsystem and the peripheral interface.

本发明实施例提供的CPU502可执行如下操作:The CPU 502 provided in the embodiment of the present invention may perform the following operations:

当检测到磁传感器的应用程序开启时,获取全球定位系统GPS信号强度;Get the GPS signal strength of the global positioning system when the application that detects the magnetic sensor is opened;

当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准。When the GPS signal strength is not less than a preset threshold, the magnetic sensor calibration algorithm library is run to calibrate the magnetic sensor.

上述移动终端可执行本发明任意实施例所提供的方法,具备执行方法相应的功能模块和有益效果。The above mobile terminal can execute the method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.

Claims (9)

1.一种运行磁传感器校准算法库的方法,其特征在于,所述方法包括:1. A method for running a magnetic sensor calibration algorithm library, wherein the method comprises: 通过磁传感器的应用程序获取全球定位系统GPS信号强度;Get the GPS signal strength of the global positioning system through the application of the magnetic sensor; 当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准;When the GPS signal strength is not less than a preset threshold, run the magnetic sensor calibration algorithm library to calibrate the magnetic sensor; 当所述GPS信号强度小于所述预设阈值时,将所述磁传感器校准算法库进行休眠。When the GPS signal strength is less than the preset threshold, the magnetic sensor calibration algorithm library is put to sleep. 2.根据权利要求1所述的方法,其特征在于,运行磁传感器校准算法库对所述磁传感器进行校准包括:2. The method according to claim 1, wherein, running a magnetic sensor calibration algorithm library to calibrate the magnetic sensor comprises: 运行磁传感器校准算法库;Run the magnetic sensor calibration algorithm library; 获取加速度传感器、陀螺仪以及磁传感器的数据;Obtain data from accelerometers, gyroscopes and magnetic sensors; 根据所述加速度传感器、陀螺仪以及磁传感器的数据,对所述磁传感器进行校准。The magnetic sensor is calibrated according to the data of the acceleration sensor, the gyroscope and the magnetic sensor. 3.根据权利要求1所述的方法,其特征在于,在运行磁传感器校准算法库对所述磁传感器进行校准之后,还包括:3. The method according to claim 1, wherein after running the magnetic sensor calibration algorithm library to calibrate the magnetic sensor, the method further comprises: 获取校准后的磁传感器的数据,通过磁传感器的应用程序获取该磁传感器的数据。Obtain the data of the calibrated magnetic sensor, and obtain the data of the magnetic sensor through the application of the magnetic sensor. 4.根据权利要求1-3任一项所述的方法,其特征在于,所述磁传感器的应用程序包括地图应用或者指南针应用。4. The method according to any one of claims 1-3, wherein the application program of the magnetic sensor comprises a map application or a compass application. 5.一种运行磁传感器校准算法库的装置,其特征在于,所述装置包括:5. A device for running a magnetic sensor calibration algorithm library, wherein the device comprises: GPS信号强度获取模块,用于通过磁传感器的应用程序,获取GPS信号强度;The GPS signal strength acquisition module is used to obtain the GPS signal strength through the application program of the magnetic sensor; 磁传感器校准模块,用于当所述GPS信号强度不小于预设阈值时,运行磁传感器校准算法库对所述磁传感器进行校准;a magnetic sensor calibration module, configured to run a magnetic sensor calibration algorithm library to calibrate the magnetic sensor when the GPS signal strength is not less than a preset threshold; 休眠模块,用于当所述GPS信号强度小于所述预设阈值时,将所述磁传感器校准算法库进行休眠。A sleep module, configured to sleep the magnetic sensor calibration algorithm library when the GPS signal strength is less than the preset threshold. 6.根据权利要求5所述的装置,其特征在于,所述磁传感器校准模块包括:6. The apparatus according to claim 5, wherein the magnetic sensor calibration module comprises: 运行单元,用于运行磁传感器校准算法库;A running unit for running the magnetic sensor calibration algorithm library; 数据获取单元,用于获取加速度传感器、陀螺仪以及磁传感器的数据;The data acquisition unit is used to acquire the data of the acceleration sensor, the gyroscope and the magnetic sensor; 磁传感器校准单元,用于根据所述加速度传感器、陀螺仪以及磁传感器的数据,对所述磁传感器进行校准。The magnetic sensor calibration unit is used for calibrating the magnetic sensor according to the data of the acceleration sensor, the gyroscope and the magnetic sensor. 7.根据权利要求5所述的装置,其特征在于,还包括:7. The apparatus of claim 5, further comprising: 数据上报模块,用于在运行磁传感器校准算法库对所述磁传感器进行校准之后,获取校准后的磁传感器的数据,通过磁传感器的应用程序获取该磁传感器的数据。The data reporting module is used to obtain the data of the calibrated magnetic sensor after running the magnetic sensor calibration algorithm library to calibrate the magnetic sensor, and obtain the data of the magnetic sensor through the application program of the magnetic sensor. 8.根据权利要求5-7任一项所述的装置,其特征在于,所述磁传感器的应用程序包括地图应用或者指南针应用。8. The device according to any one of claims 5-7, wherein the application program of the magnetic sensor comprises a map application or a compass application. 9.一种移动终端,其特征在于,所述移动终端集成了如权利要求5-7任一项所述的运行磁传感器校准算法库的装置。9. A mobile terminal, characterized in that, the mobile terminal integrates the device for running a magnetic sensor calibration algorithm library according to any one of claims 5-7.
CN201610665666.8A 2016-08-12 2016-08-12 Method and device for operating magnetic sensor calibration algorithm library and mobile terminal Expired - Fee Related CN106293006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610665666.8A CN106293006B (en) 2016-08-12 2016-08-12 Method and device for operating magnetic sensor calibration algorithm library and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610665666.8A CN106293006B (en) 2016-08-12 2016-08-12 Method and device for operating magnetic sensor calibration algorithm library and mobile terminal

Publications (2)

Publication Number Publication Date
CN106293006A CN106293006A (en) 2017-01-04
CN106293006B true CN106293006B (en) 2019-07-02

Family

ID=57671025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610665666.8A Expired - Fee Related CN106293006B (en) 2016-08-12 2016-08-12 Method and device for operating magnetic sensor calibration algorithm library and mobile terminal

Country Status (1)

Country Link
CN (1) CN106293006B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107607898B (en) * 2017-09-04 2021-01-08 维沃移动通信有限公司 Calibration method and mobile terminal
CN115655310B (en) * 2022-10-26 2024-04-05 荣耀终端有限公司 Data calibration method, electronic device and readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336064B1 (en) * 1997-09-29 2002-01-01 Aichi Steel Works, Ltd. Magnetic apparatus for detecting position of vehicle
JP4093981B2 (en) * 2004-03-31 2008-06-04 京セラ株式会社 Mobile communication terminal, information display method thereof, and error correction method of geomagnetic sensor
CN101149427B (en) * 2006-09-21 2010-08-25 环达电脑(上海)有限公司 Global positioning system direction correction device and method
US8825426B2 (en) * 2010-04-09 2014-09-02 CSR Technology Holdings Inc. Method and apparatus for calibrating a magnetic sensor
CN103399175B (en) * 2013-07-11 2015-03-11 广东欧珀移动通信有限公司 Acceleration sensor calibrating method and mobile terminal
CN103558617B (en) * 2013-10-30 2017-01-18 无锡赛思汇智科技有限公司 Positioning method and device
CN104135576B (en) * 2014-08-25 2017-02-01 广东欧珀移动通信有限公司 Compass positioning optimization method and system for mobile terminal

Also Published As

Publication number Publication date
CN106293006A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106225806B (en) Method, device and mobile terminal for calibrating magnetic sensor
CN107667542B (en) Location determination using companion devices
US10353571B2 (en) Method and apparatus for preventing touchscreen misoperation
CN107504994B (en) Calibration method and device of proximity sensor, mobile terminal and readable storage medium
CN106358290B (en) A kind of detection method, device and the mobile terminal of the GPS positioning interference of mobile terminal
CN107943345A (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN112415554B (en) Positioning method and device, electronic equipment and computer readable storage medium
CN108592947B (en) Gyroscope calibration method and device, storage medium and terminal equipment
CN109104521B (en) Proximity state correction method, device, mobile terminal and storage medium
CN106790978B (en) Method, device and mobile terminal for controlling screen state of mobile terminal
CN108362310B (en) Method, device, storage medium and terminal for determining geomagnetic accuracy
CN108055635A (en) Method, device, storage medium and terminal for acquiring location information
CN107025002A (en) Terminal applies control method, device and terminal
CN108093373B (en) Positioning control method, device, storage medium and terminal device
CN117271027A (en) Authentication window display method and device
CN108012237B (en) Positioning control method and device, storage medium and terminal equipment
CN108093362B (en) Control method and device of positioning module, storage medium and terminal
CN106293006B (en) Method and device for operating magnetic sensor calibration algorithm library and mobile terminal
CN106500751A (en) Calibration method of proximity sensor and mobile terminal
CN108111580B (en) Region determination method, device, storage medium, mobile terminal and server
CN106679691B (en) Pedometer data adjusting method and device and mobile terminal
CN108731666A (en) Processing method, device, storage medium and the terminal of Geomagnetism Information
CN106708332B (en) threshold setting method and device of proximity sensor and terminal
CN106502819B (en) Control method and device based on proximity sensor and mobile terminal
CN106525067B (en) Control method and device of pedometer and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190702

CF01 Termination of patent right due to non-payment of annual fee