CN108494946B - Method and device for correcting electronic compass in mobile terminal - Google Patents

Method and device for correcting electronic compass in mobile terminal Download PDF

Info

Publication number
CN108494946B
CN108494946B CN201810134326.1A CN201810134326A CN108494946B CN 108494946 B CN108494946 B CN 108494946B CN 201810134326 A CN201810134326 A CN 201810134326A CN 108494946 B CN108494946 B CN 108494946B
Authority
CN
China
Prior art keywords
mobile terminal
interference
electronic compass
correction parameter
azimuth angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810134326.1A
Other languages
Chinese (zh)
Other versions
CN108494946A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810134326.1A priority Critical patent/CN108494946B/en
Publication of CN108494946A publication Critical patent/CN108494946A/en
Application granted granted Critical
Publication of CN108494946B publication Critical patent/CN108494946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • 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/02Magnetic compasses
    • G01C17/28Electromagnetic compasses
    • G01C17/32Electron compasses
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/21Combinations with auxiliary equipment, e.g. with clocks or memoranda pads

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Electromagnetism (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method and a device for correcting an electronic compass in a mobile terminal, wherein the method comprises the following steps: acquiring current information of the current charging current of the mobile terminal and an azimuth angle of the mobile terminal electronic device; determining an interference deviation correction parameter corresponding to the current information according to the current information of the mobile terminal, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions; and correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter. The method of the embodiment of the invention can effectively correct the electronic compass interfered by the charging current when the mobile terminal is charged, and provides an accurate direction for a user so as to increase the convenience in use.

Description

Method and device for correcting electronic compass in mobile terminal
Technical Field
The invention relates to the field of terminals, in particular to a method and a device for correcting an electronic compass in a mobile terminal.
Background
With the development of smart phones, electronic compasses have become standard fittings in mobile phones, and the function of the electronic compasses is to provide directional directions for users. The principle of the electronic compass is to detect the strength of the earth' S magnetic field to identify the direction, and the earth has two magnetic poles, like other magnets, with a magnetic south pole (S) near a geographical north pole and a magnetic north pole (N) near a geographical south pole. The strength of the earth's magnetic field is typically 40-60 μ T depending on the geographic location.
However, because the earth magnetic field is weak, the mobile phone is limited in size, and a large current inevitably flows near the electronic compass, especially in a charging state. When a user charges the mobile phone by using the charge pal and also uses the electronic compass for navigation, the electronic compass is interfered by charging, so that the direction provided by the electronic compass is influenced to cause inaccuracy.
Disclosure of Invention
The embodiment of the invention provides a method and a device for correcting an electronic compass in a mobile terminal, which are used for solving the problem that the electronic compass is easily interfered and cannot accurately provide direction pointing when the mobile terminal is charged.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, a method for correcting an electronic compass in a mobile terminal is provided, where the method includes:
acquiring current information of the current charging current of the mobile terminal and an azimuth angle of the mobile terminal;
determining an interference deviation correction parameter corresponding to the current information according to the current information, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions;
and correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter.
In a second aspect, a correction device for an electronic compass in a mobile terminal is provided, the correction device comprising:
the acquisition module is used for acquiring current information of the current charging current of the mobile terminal and an azimuth angle of the mobile terminal;
the determining module is coupled with the obtaining module, receives the current information and determines an interference deviation correction parameter corresponding to the current information according to the current information, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions;
and the correction module is coupled with the electronic compass, the acquisition module and the determination module, and is used for receiving and correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter.
In a third aspect, a mobile terminal is provided, comprising a processor, a memory and a computer program stored on the memory and being executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to the first aspect.
In the embodiment of the invention, the current information of the current charging current of the mobile terminal and the azimuth angle of the mobile terminal are obtained; determining an interference deviation correction parameter corresponding to the current information according to the current information, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions; according to the azimuth angle of the mobile terminal and the interference deviation correction parameter, the electronic compass is corrected, so that the electronic compass interfered by the charging current can be effectively corrected when the mobile terminal is charged, an accurate direction is provided for a user, and convenience in use is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a method for correcting an electronic compass in a mobile terminal according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of three levels of a mobile terminal according to one embodiment of the invention.
Fig. 3 is a schematic structural diagram of a correction apparatus for an electronic compass in a mobile terminal according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for correcting an electronic compass in a mobile terminal according to an embodiment of the present invention. As shown in fig. 1, a method 100 for correcting an electronic compass in a mobile terminal, the method 100 comprising:
and S110, acquiring current information of the current charging current of the mobile terminal and an azimuth angle of the mobile terminal.
For example, when the mobile terminal is in a charging state, the current information of the present charging current, that is, the current magnitude of the present charging current, may be obtained through a charging management circuit configured in the mobile terminal. Meanwhile, the current azimuth information of the mobile terminal can be acquired through a gravity sensor configured for the mobile terminal, that is, the direction in which the current mobile terminal is located, that is, the included angles between the mobile terminal and the X-axis, the Y-axis and the Z-axis are found. Wherein, the X-axis, the Y-axis, and the Z-axis respectively move three horizontal planes of the terminal, as shown in fig. 2. For convenience of description, in the present embodiment, the direction in which the mobile terminal points, for example, with the Y axis, is the front side. However, the present invention is not limited thereto, and in other embodiments, the direction pointed by the X-axis or the Z-axis may be the front direction.
And S120, determining an interference deviation correction parameter corresponding to the current information according to the current information, wherein the interference deviation correction parameter is used for correcting the interference deviation of the mobile terminal in multiple directions. That is, the mobile terminal may store the corresponding relationship between the interference offset correction parameter and the current information in advance, so that when the current information is obtained, the mobile terminal may quickly determine the interference offset correction parameter corresponding to the current information according to the current information.
Alternatively, in some embodiments, the interference deviation correction parameters include multiple sets of interference deviation correction parameters, and in S130, one of the multiple sets of interference deviation correction parameters may be selected according to the current information of the present charging current, that is, the selected interference deviation correction parameter is matched with the present current information to determine the interference deviation correction parameter corresponding to the current information. For example, assume that the plurality of sets of interference offset correction parameters are 4 sets, and correspond to 4 different current steps, such as 0-0.5A, 0.5A-1A, 1-1.5A, and 1.5A-2A, respectively, so as to select the interference offset correction parameter corresponding to the current information from the 4 sets of interference offset correction parameters according to the current information.
When the current information is 0.3A, an interference offset correction parameter corresponding to a current level of 0-0.5A, such as-3 deg., may be selected. When the current information is 0.9A, an interference offset correction parameter corresponding to a current level of 0.5-1A, for example +3 deg., can be selected. The rest of the selection methods are analogized.
In the above embodiment, the sets of the disturbance deviation correction parameters are illustrated by taking 4 and respectively correspond to 4 different current bits as an example, but the present invention is not limited thereto, and the sets of the disturbance deviation correction parameters may be, for example, 2, 3 or more than 4 and respectively correspond to 2, 3 or more than 4 different current bits, and all belong to the protection scope of the present invention. For example, 2, 3, or more than 4 interference offset correction parameters may be implemented by referring to the description of the foregoing embodiments, and are not repeated here to avoid repetition.
Optionally, in some embodiments, the mobile terminal comprises 3 x 2 interference bias in multiple directionsNInterference deviation in each direction, wherein N is a positive integer greater than or equal to 0. For example, when N is equal to 0, then 1 (2) can be obtained0) The interference deviation in one direction, and the 1 direction is, for example, 0 °, 90 °, 180 °, or 270 °. When N is equal to 1, then 2 (2) can be obtained1) The interference deviation in one direction, and these 2 directions are for example 0 ° and 180 ° or 90 ° and 270 °. When N is equal to 2, then 4 (2) can be obtained2) The interference deviation in the 4 directions, and the 4 directions are, for example, 0 °, 90 °, 180 °, 270 °. When N is equal to 3, then 8 (2) can be obtained3) The interference deviation in 8 directions, and these 8 directions are, for example, 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °. When N is equal to 4, then 16 (2) can be obtained4) The interference deviation in one direction, and this direction is, for example, 0 °, 22.5 °, 45 °, 67.5 °, 90 °, 112.5 °, 135 °, 157.5 °, 180 °, 2025 °, 225 °, 247.5 °, 270 °, 292.5 °, 315 °, 337.5 °. The rest is analogized. And, as the value of N is larger, it means that interference deviations in more directions can be obtained, and the subsequent correction processing can be made more accurate. Wherein, "3 x 2N"3" in "indicates the X-axis, Y-axis, and Z-axis of the mobile terminal.
In some embodiments, the interference offset is determined from geomagnetic information and an azimuth of the mobile terminal. The mobile terminal of this embodiment uses the Y axis as the front direction, and describes the calculation process of the interference deviation by taking the Y axis as an example. For example, at this time, the X axis is fixed, the mobile terminal moves in a plane formed by the Z axis and the Y axis, and it is assumed that the angle between the mobile terminal and the Y axis is θ, and the component of the magnetic field detected on the Y axis, which is the geomagnetic field, on the Y axis is G × sin θ, where G represents geomagnetic information, and θ is, for example, the azimuth angle of the mobile terminal. And, through the component G sin theta of the earth magnetic field on the Y axis, the interference deviation corresponding to the azimuth angle at the moment can be determined. In other embodiments, the mobile terminal may also be located right ahead in the direction pointed by the X axis or the Z axis, and the components of the geomagnetic field on the X axis or the Z axis may refer to the above description, and are not repeated here to avoid repetition.
Optionally, in some embodiments, the interference deviation includes a charging current interference magnitude or a magnetic field interference magnitude.
S130, correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter.
For example, when the azimuth angle of the mobile terminal is 42 ° and the interference offset correction parameter is +3 °, the azimuth angle of the mobile terminal is compensated by the interference offset correction parameter to correct the electronic compass, so that the electronic compass outputs an azimuth angle of, for example, 45 ° to conform to the actual azimuth angle. When the azimuth angle of the mobile terminal is 48 ° and the interference offset correction parameter is-3 °, the azimuth angle of the mobile terminal is compensated by the interference offset correction parameter to correct the electronic compass, so that the electronic compass outputs an azimuth angle of, for example, 45 ° to conform to the actual azimuth angle.
According to the correction method of the electronic compass in the mobile terminal, the current information of the current charging current of the mobile terminal and the azimuth angle of the mobile terminal are obtained; determining an interference deviation correction parameter corresponding to the current information according to the current information, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions; according to the azimuth angle of the mobile terminal and the interference deviation correction parameter, the electronic compass is corrected, so that the electronic compass interfered by the charging current can be effectively corrected when the mobile terminal is charged, an accurate direction is provided for a user, and convenience in use is improved.
Fig. 1 above describes in detail a method for correcting an electronic compass in a mobile terminal according to an embodiment of the present invention, and a network device according to an embodiment of the present invention will be described in detail below with reference to fig. 3.
Fig. 3 is a block diagram showing a correction apparatus of an electronic compass in a mobile terminal according to an embodiment of the present invention. As shown in fig. 3, the correction apparatus 300 for an electronic compass in a mobile terminal includes:
an obtaining module 310, configured to obtain current information of a current charging current of the mobile terminal and an azimuth angle of the mobile terminal;
a determining module 320, coupled to the obtaining module 320, for receiving and determining an interference offset correction parameter corresponding to the current information according to the current information, where the interference offset correction parameter is used to correct interference offsets of the mobile terminal in multiple directions;
a correction module 330, coupled to the obtaining module 320 and the determining module 330, for receiving and correcting the electronic compass according to the azimuth of the mobile terminal and the interference offset correction parameter.
Optionally, as an embodiment, the interference offset correction parameters are a plurality of sets of interference offset correction parameters,
wherein the determining module 330 is specifically configured to:
and determining interference deviation correction parameters corresponding to the current information from the multiple groups of interference deviation correction parameters.
Optionally, as an embodiment, the interference deviation of the mobile terminal in the multiple directions includes interference deviation in 3 × 2N directions, where N is a positive integer greater than or equal to 0.
Optionally, as an embodiment, the interference offset is determined according to geomagnetic information and an azimuth of the mobile terminal.
Optionally, as an embodiment, the interference deviation includes a charging current interference magnitude or a magnetic field interference magnitude.
The correction device of the electronic compass in the mobile terminal provided by the embodiment of the present invention can implement each process implemented in the method embodiment of fig. 1, and is not described herein again in order to avoid repetition.
Figure 4 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 410 is configured to obtain current information of a current charging current of the mobile terminal and an azimuth angle of the mobile terminal; determining an interference deviation correction parameter corresponding to the current information according to the current information of the mobile terminal, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions; and correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter.
According to the mobile terminal provided by the embodiment of the invention, the current information of the current charging current of the mobile terminal and the azimuth angle of the mobile terminal are obtained; determining an interference deviation correction parameter corresponding to the current information according to the current information of the mobile terminal, wherein the interference deviation correction parameter is used for correcting interference deviations of the mobile terminal in multiple directions; according to the azimuth angle of the mobile terminal and the interference deviation correction parameter, the electronic compass is corrected, so that the electronic compass interfered by the charging current can be effectively corrected when the mobile terminal is charged, an accurate direction is provided for a user, and convenience in use is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more components within the mobile terminal 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the above-mentioned method for correcting an electronic compass in the mobile terminal, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program realizes each process of the embodiment of the method for correcting the electronic compass in the mobile terminal, and can achieve the same technical effect, and is not repeated here to avoid repetition. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A method for correcting an electronic compass in a mobile terminal is characterized by comprising the following steps:
acquiring current information of the current charging current of the mobile terminal and an azimuth angle of the mobile terminal;
determining an interference deviation correction parameter corresponding to the current information according to the current information, wherein the interference deviation correction parameter is an angle and is used for correcting interference deviations of the mobile terminal in multiple directions, and the interference deviations are determined according to geomagnetic information and an azimuth angle of the mobile terminal; the interference deviation of the mobile terminal in multiple directions comprises 3 x 2NInterference deviation in a plurality of directions, wherein N is a positive integer greater than or equal to 0;
correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter; the correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference offset correction parameter includes: and compensating the azimuth angle of the mobile terminal by the interference deviation correction parameter so as to correct the electronic compass.
2. The method of calibrating an electronic compass in a mobile terminal according to claim 1, wherein said interference offset correction parameters include a plurality of sets of interference offset correction parameters,
wherein the determining of the interference deviation correction parameter corresponding to the current information includes:
and determining interference deviation correction parameters corresponding to the current information from the multiple groups of interference deviation correction parameters.
3. The method for calibrating an electronic compass in a mobile terminal according to claim 1, wherein said interference deviation comprises a magnitude of a charging current interference or a magnitude of a magnetic field interference.
4. A correction device of an electronic compass in a mobile terminal is characterized by comprising:
the acquisition module is used for acquiring current information of the current charging current of the mobile terminal and an azimuth angle of the mobile terminal;
a determining module, coupled to the obtaining module, configured to receive and determine an interference offset correction parameter corresponding to the current information according to the current information, where the interference offset correction parameter is an angle, and the interference offset correction parameter is used to correct interference offsets of the mobile terminal in multiple directions, where the interference offsets are determined according to geomagnetic information and an azimuth angle of the mobile terminal; the interference deviation of the mobile terminal in multiple directions comprises 3 x 2NInterference deviation in a plurality of directions, wherein N is a positive integer greater than or equal to 0;
the correction module is coupled with the electronic compass, the acquisition module and the determination module, receives and corrects the electronic compass according to the azimuth angle of the mobile terminal and the interference deviation correction parameter; the correcting the electronic compass according to the azimuth angle of the mobile terminal and the interference offset correction parameter includes: and compensating the azimuth angle of the mobile terminal by the interference deviation correction parameter so as to correct the electronic compass.
5. The apparatus for correcting an electronic compass in a mobile terminal according to claim 4, wherein said interference deviation correction parameters are a plurality of sets of interference deviation correction parameters,
wherein the determining module is specifically configured to:
and determining interference deviation correction parameters corresponding to the current information from the multiple groups of interference deviation correction parameters.
6. The apparatus for correcting an electronic compass in a mobile terminal according to claim 4, wherein said interference deviation comprises a magnitude of a charging current interference or a magnitude of a magnetic field interference.
CN201810134326.1A 2018-02-09 2018-02-09 Method and device for correcting electronic compass in mobile terminal Active CN108494946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810134326.1A CN108494946B (en) 2018-02-09 2018-02-09 Method and device for correcting electronic compass in mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810134326.1A CN108494946B (en) 2018-02-09 2018-02-09 Method and device for correcting electronic compass in mobile terminal

Publications (2)

Publication Number Publication Date
CN108494946A CN108494946A (en) 2018-09-04
CN108494946B true CN108494946B (en) 2021-09-28

Family

ID=63340124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810134326.1A Active CN108494946B (en) 2018-02-09 2018-02-09 Method and device for correcting electronic compass in mobile terminal

Country Status (1)

Country Link
CN (1) CN108494946B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111060086B (en) * 2019-12-25 2022-03-22 维沃移动通信有限公司 Navigation device and electronic equipment
CN111854721A (en) * 2020-07-30 2020-10-30 北京小米移动软件有限公司 Geomagnetic data correction method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102460069A (en) * 2009-06-05 2012-05-16 苹果公司 Calibration techniques for an electronic compass in a portable device
CN102937447A (en) * 2012-10-22 2013-02-20 广东欧珀移动通信有限公司 Electronic compass interference eliminating method
CN105157691A (en) * 2015-10-15 2015-12-16 广东欧珀移动通信有限公司 Determination method and device for azimuth of compass
CN105277995A (en) * 2014-06-20 2016-01-27 中兴通讯股份有限公司 Interference compensation method and device of geomagnetic sensor
CN106918790A (en) * 2017-03-24 2017-07-04 深圳市沃特沃德股份有限公司 The calibration method of magnetic field intensity, device and terminal device
CN107202572A (en) * 2017-07-21 2017-09-26 深圳市泰衡诺科技有限公司上海分公司 Calibration method, electronic compass and the electronic equipment of electronic compass

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101487707B (en) * 2008-01-16 2011-03-16 宏达国际电子股份有限公司 Portable electronic device with correctable azimuth angle and its correction method
CN102506837A (en) * 2011-10-10 2012-06-20 海能达通信股份有限公司 Terminal positioning method and terminal with electronic compass
CN104931028B (en) * 2015-06-30 2017-03-01 北京联合大学 A kind of three axle magneto-electronic compass error compensation methods based on deep learning

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102460069A (en) * 2009-06-05 2012-05-16 苹果公司 Calibration techniques for an electronic compass in a portable device
CN102937447A (en) * 2012-10-22 2013-02-20 广东欧珀移动通信有限公司 Electronic compass interference eliminating method
CN105277995A (en) * 2014-06-20 2016-01-27 中兴通讯股份有限公司 Interference compensation method and device of geomagnetic sensor
CN105157691A (en) * 2015-10-15 2015-12-16 广东欧珀移动通信有限公司 Determination method and device for azimuth of compass
CN106918790A (en) * 2017-03-24 2017-07-04 深圳市沃特沃德股份有限公司 The calibration method of magnetic field intensity, device and terminal device
CN107202572A (en) * 2017-07-21 2017-09-26 深圳市泰衡诺科技有限公司上海分公司 Calibration method, electronic compass and the electronic equipment of electronic compass

Also Published As

Publication number Publication date
CN108494946A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN109862504B (en) Display method and terminal equipment
CN108337368B (en) Method for updating positioning data and mobile terminal
CN108769893B (en) Terminal detection method and terminal
CN108174109B (en) Photographing method and mobile terminal
CN111049510B (en) Touch key, control method and electronic equipment
CN109739394B (en) SAR value processing method and mobile terminal
CN111443365B (en) Positioning method and electronic equipment
CN111601018B (en) Separable camera module positioning method and electronic equipment
EP3584768A1 (en) Method of detecting photographic direction shift, device, apparatus, and data storage medium
CN109737938B (en) Terminal device
CN111338489B (en) Parameter adjustment method and electronic equipment
CN108055399B (en) Text copying method and mobile terminal
CN110456923B (en) Gesture sensing data processing method and electronic equipment
CN110099434B (en) Power adjustment method, terminal equipment and computer readable storage medium
CN108494946B (en) Method and device for correcting electronic compass in mobile terminal
CN109936817B (en) Positioning method and terminal equipment
CN111652942A (en) Calibration method of camera module, first electronic device and second electronic device
CN111221602A (en) Interface display method and electronic equipment
CN108600517B (en) Method and terminal for switching screen state
CN110769162B (en) Electronic equipment and focusing method
CN110824516B (en) Positioning method and electronic equipment
CN109660663B (en) Antenna adjusting method and mobile terminal
CN109618278B (en) Positioning method and mobile terminal
CN109450508B (en) Antenna determination method and device and mobile terminal
CN108988413B (en) Mobile terminal charging method and mobile terminal

Legal Events

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