WO2015070451A1 - 电子罗盘校准方法和终端 - Google Patents

电子罗盘校准方法和终端 Download PDF

Info

Publication number
WO2015070451A1
WO2015070451A1 PCT/CN2013/087306 CN2013087306W WO2015070451A1 WO 2015070451 A1 WO2015070451 A1 WO 2015070451A1 CN 2013087306 W CN2013087306 W CN 2013087306W WO 2015070451 A1 WO2015070451 A1 WO 2015070451A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinate data
electronic compass
terminal
unit
motion track
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.)
Ceased
Application number
PCT/CN2013/087306
Other languages
English (en)
French (fr)
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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to PCT/CN2013/087306 priority Critical patent/WO2015070451A1/zh
Priority to CN201380068698.4A priority patent/CN104884895B/zh
Publication of WO2015070451A1 publication Critical patent/WO2015070451A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

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 invention relates to the field of communications technologies, and in particular, to an electronic compass calibration method and a terminal. Background technique
  • GPS navigation terminal applications are more and more widely used.
  • the electronic compass is often added to the terminal to assist the navigation direction.
  • the electronic compass is easily interfered by the external magnetic field generated by the electronic device, which leads to inaccurate pointing. Therefore, it needs to be periodically calibrated.
  • the manual calibration methods are the plane calibration method, the stereo 8-character calibration method, and the ten-sided calibration method. The calibration methods of these electronic compasses are complicated to operate, and the method is not correct for the user or the calibration method is forgotten.
  • the invention is based on the above problems, and proposes a new electronic compass calibration technology, which calculates the angle between the linear motion trajectory and a specific geographic direction by acquiring the linear motion trajectory of the terminal, and based on the angle, the electronic compass is performed.
  • Calibration provides a quick and easy way to electronically calibrate.
  • an electronic compass calibration method including: acquiring a motion trajectory of a terminal and determining whether the motion trajectory is a linear motion trajectory; and determining that the motion trajectory is a linear motion trajectory Calculating an angle between the motion trajectory and a specified geographic direction; calibrating the electronic compass according to the included angle.
  • the electronic compass In order to calibrate the orientation of the electronic compass, it is necessary to compare the orientation with the geographic direction. Therefore, it is necessary to obtain the angle between the linear motion trajectory and the geographic direction, and use the angle to the electronic compass.
  • the magnetic pole direction is compensated.
  • the step of calibrating the electronic compass according to the angle includes: determining, according to an angular difference between a magnetic pole direction and a geographic direction, the angle and the linear motion trajectory The direction of the magnetic pole of the electronic compass is calibrated to determine the direction of the magnetic pole of the electronic compass.
  • the angle difference to finally determine the angle between the magnetic pole direction and the linear motion trajectory, so that the accurate magnetic pole direction of the earth can be determined.
  • the magnetic pole direction of the electronic compass is adjusted to coincide with the calculated magnetic pole direction.
  • the step of acquiring a motion track of the terminal and determining whether the motion track is a linear motion track comprises: collecting three coordinate data of the terminal by a predetermined distance; detecting the adjacent Whether the three coordinate data are on the same straight line; if the three coordinate data are on the same straight line, it is determined that the motion track of the terminal is a linear motion track.
  • the coordinate data of the terminal can be collected at a predetermined time or a predetermined distance. Since three lines can determine a straight line, three coordinate data can be used to determine whether the motion trajectory of the terminal is a straight line.
  • any one of the above technical solutions preferably, if the three coordinate data are not on the same line, discard the first coordinate data of the three coordinate data and collect new coordinate data; Whether the remaining two coordinate data in the coordinate data and the new coordinate data are on the same straight line.
  • At least one geographic direction is determined according to at least two coordinate data of the three coordinate data, and one of the at least one geographic direction is used as the specified geographic direction.
  • the coordinate data contains geographic coordinate information, such as latitude and longitude information.
  • XY coordinate data can be obtained.
  • the X-axis direction and the y-axis direction in the coordinate system can be determined, and the four directions of the coordinate system are It is equivalent to the geographical direction of Zhengbei, Zhengnan, Zhengdong and Zhengxi.
  • one of the geographic directions may be designated as the specified geographic direction to calculate the angle between the specified geographic direction and the linear motion trajectory. Since the geographic direction is accurate, the geographic direction is calculated based on the geographic direction. The direction of the magnetic pole is also accurate.
  • the coordinate data is positioning data acquired by using a global positioning system or a Beidou positioning system.
  • the method further includes: when the terminal starts the positioning system, reminding the user whether to start the electronic compass calibration system; detecting the moving speed of the terminal, if the moving speed is greater than a preset value, Obtaining a motion trajectory of the terminal.
  • the electronic compass calibration system proposed by the present invention it is not necessary to perform a user-specific operation to calibrate the electronic compass, and only the electronic compass calibration function proposed by the present invention can be activated. Moreover, in order to obtain an accurate linear motion trajectory, the motion trajectory of the terminal is generally acquired only when the motion speed is large, and the probability of finding three coordinate data on a straight line can also be improved, thereby avoiding the terminal being continuously The detection and judgment action is performed, thereby reducing the power consumption of the terminal.
  • a terminal including: a determining unit, configured to acquire a motion track of the terminal and determine whether the motion track is a linear motion track; and a calculating unit, connected to the determining unit, When determining that the motion trajectory is a linear motion trajectory, Calculating an angle between the motion trajectory and a specified geographic direction; a calibration unit coupled to the calculation unit for calibrating the electronic compass according to the included angle.
  • the calibration method enriches the current calibration method, and it is quick and easy to obtain an accurate magnetic pole direction, which is used as a reference to calibrate the direction of the electronic compass.
  • the calibration unit is further configured to determine a magnetic pole direction of the electronic compass according to an angular difference between the magnetic pole direction and the geographic direction, the angle and the linear motion trajectory, and the determined The electronic compass is calibrated in the direction of the magnetic pole of the electronic compass.
  • the angle difference to finally determine the angle between the magnetic pole direction and the linear motion trajectory, so that the accurate magnetic pole direction of the earth can be determined.
  • the magnetic pole direction of the electronic compass is adjusted to coincide with the calculated magnetic pole direction.
  • the determining unit includes: an collecting unit, configured to collect three coordinate data of the terminal at a predetermined distance; and a detecting unit, detecting whether the adjacent three coordinate data are in On the same straight line, if the three coordinate data are on the same straight line, it is determined that the motion track of the terminal is a linear motion track.
  • the coordinate data of the terminal can be collected at a predetermined time or a predetermined distance. Since three lines can determine a straight line, three coordinate data can be used to determine whether the motion trajectory of the terminal is a straight line.
  • the detecting unit is further configured to: when the three coordinate data are not on the same line, discard the first coordinate data of the three coordinate data, and notify the collecting The unit acquires new coordinate data and detects remaining in the three coordinate data Whether the remaining two coordinate data and the new coordinate data are on the same straight line.
  • the first acquired coordinate data may be discarded, and the remaining two coordinate data and the newly acquired coordinate data constitute the next set of coordinate data for judgment until acquired. Up to three adjacent coordinate data on the same line.
  • the calculating unit includes: a direction determining unit, determining at least one geographic direction according to at least two coordinate data of the three coordinate data, where the at least one geographic direction is A geographic direction is used as the specified geographic direction.
  • the coordinate data contains geographic coordinate information, such as latitude and longitude information.
  • XY coordinate data can be obtained.
  • the X-axis direction and the y-axis direction in the coordinate system can be determined, and the four directions of the coordinate system are It is equivalent to the geographical direction of Zhengbei, Zhengnan, Zhengdong and Zhengxi.
  • one of the geographic directions may be designated as the specified geographic direction to calculate the angle between the specified geographic direction and the linear motion trajectory. Since the geographic direction is accurate, the geographic direction is calculated based on the geographic direction. The direction of the magnetic pole is also accurate.
  • the collecting unit is a global positioning system or a Beidou positioning system.
  • the collecting unit is a global positioning system or a Beidou positioning system.
  • a positioning system capable of obtaining accurate terminal coordinate data. Since the base station positioning relative error is large, relatively accurate GPS positioning and Beidou positioning are prioritized in the present invention.
  • the method further includes: a reminding unit, when the terminal starts the collecting unit, reminding the user whether to start the electronic compass calibration; the speed calculating unit detects the moving speed of the terminal, if the motion When the speed is greater than the preset value, the determining unit is notified to acquire the motion track of the terminal.
  • the electronic compass calibration system proposed by the present invention it is not necessary to perform a user-specific operation to calibrate the electronic compass, and only the electronic compass calibration function proposed by the present invention can be activated. Moreover, in order to obtain an accurate linear motion trajectory, the motion trajectory of the terminal is generally acquired only when the motion speed is large, and the probability of finding three coordinate data on a straight line can also be improved, thereby avoiding the terminal being continuously The detection and judgment action is performed, thereby reducing the power consumption of the terminal.
  • a storage in a non-transitory machine readable medium a program product for electronic compass calibration, the program product comprising machine executable instructions for causing a computer system to: obtain a motion trajectory of the terminal and determine whether the motion trajectory is a linear motion trajectory; When the motion trajectory is a linear motion trajectory, an angle between the motion trajectory and a specified geographic direction is calculated; and the electronic compass is calibrated according to the included angle.
  • a non-transitory machine readable medium storing a program product for electronic compass calibration, the program product comprising machine executable instructions for causing a computer system to perform the following steps: Obtaining a motion trajectory of the terminal and determining whether the motion trajectory is a linear motion trajectory; when determining that the motion trajectory is a linear motion trajectory, calculating an angle between the motion trajectory and a specified geographic direction; The electronic compass is calibrated.
  • a machine readable program the program causing a machine to perform the electronic compass calibration method of any of the above-described aspects.
  • a storage medium storing a machine readable program, wherein the machine readable program causes the machine to perform the electronic compass calibration method according to any one of the technical solutions described above.
  • FIG. 1 shows a schematic diagram of an electronic compass calibration method according to an embodiment of the present invention
  • FIG. 2 shows a schematic diagram of motion trajectory calculation according to an embodiment of the present invention
  • FIG. 3 is a flow chart showing an electronic compass calibration method according to another embodiment of the present invention.
  • 5A and 5B are schematic views respectively showing an automatic calibration function menu according to an embodiment of the present invention.
  • Figure 6 shows a block diagram of a terminal in accordance with an embodiment of the present invention. detailed description
  • an electronic compass calibration method may include the following steps: Step 102: Acquire a motion track of a terminal and determine whether the motion track is a linear motion track; Step 104: Determine a motion track as a straight line When the motion trajectory is calculated, the angle between the motion trajectory and the specified geographic direction is calculated; Step 106, the electronic compass is calibrated according to the angle.
  • the calibration method enriches the current calibration method, and it is quick and easy to obtain an accurate magnetic pole direction, which is used as a reference to calibrate the direction of the electronic compass.
  • the step of calibrating the electronic compass according to the angle includes: determining, according to an angular difference between a magnetic pole direction and a geographic direction, the angle and the linear motion trajectory The direction of the magnetic pole of the electronic compass is calibrated to determine the direction of the magnetic pole of the electronic compass.
  • the step 106 includes: collecting three coordinate data of the terminal at a predetermined distance; detecting whether the adjacent three coordinate data are on the same line; if the three coordinate data On the same straight line, it is determined that the motion trajectory of the terminal is a linear motion trajectory.
  • the auto-calibration function can be used as a sub-menu of the GPS menu, which can be turned on and off after the user turns on the GPS.
  • the coordinate data of the terminal can be collected at a predetermined time or a predetermined distance. Since three lines can determine a straight line, three coordinate data can be used to determine whether the motion trajectory of the terminal is a straight line.
  • any one of the above technical solutions preferably, if the three coordinate data are not on the same line, discard the first coordinate data of the three coordinate data and collect new coordinate data; Whether the remaining two coordinate data in the coordinate data and the new coordinate data are on the same straight line.
  • the first acquired coordinate data may be discarded, and the remaining two coordinate data and the newly acquired coordinate data constitute the next set of coordinate data for judgment until acquired. Up to three adjacent coordinate data on the same line.
  • the method for obtaining the specified geographic direction includes: determining, according to at least two coordinate data of the three coordinate data, at least one geographic direction, where the at least one geographic direction is A geographic direction is used as the specified geographic direction.
  • the coordinate data contains geographic coordinate information, such as latitude and longitude information.
  • XY coordinate data can be obtained.
  • the X-axis direction and the y-axis direction in the coordinate system can be determined, and the four directions of the coordinate system are It is equivalent to the geographical direction of Zhengbei, Zhengnan, Zhengdong and Zhengxi.
  • one of the geographic directions may be designated as the specified geographic direction to calculate the angle between the specified geographic direction and the linear motion trajectory. Since the geographic direction is accurate, the geographic direction is calculated based on the geographic direction. The direction of the magnetic pole is also accurate.
  • the coordinate data is positioning data acquired by using a global positioning system or a Beidou positioning system.
  • the method further includes: when the terminal starts the positioning system, reminding the user whether to start the electronic compass calibration system; detecting the moving speed of the terminal, if the moving speed is greater than a preset value, Obtaining a motion trajectory of the terminal.
  • the electronic compass calibration system proposed by the present invention it is not necessary to perform a user-specific operation to calibrate the electronic compass, and only the electronic compass calibration function proposed by the present invention can be activated. Moreover, in order to obtain an accurate linear motion trajectory, the motion trajectory of the terminal is generally acquired only when the motion speed is large, and the probability of finding three coordinate data on a straight line can also be improved, thereby avoiding the terminal being continuously The detection and judgment action is performed, thereby reducing the power consumption of the terminal.
  • Step 302 When the user turns on the positioning system, such as the GPS positioning system, the user may be reminded whether to enable the automatic calibration function of the electronic compass. If the auto-calibration function of the electronic compass is turned on, it is judged whether the moving speed of the terminal is greater than the set value. If the moving speed is greater than the set value (for example, 10Km/h), the track point of the terminal can be started.
  • the set value for example, 10Km/h
  • Step 304 first collect GPS track point 1.
  • Step 306 after the segment distance, collect the GPS track point 2.
  • Step 310 Determine whether the speed requirement is between the three points collected, that is, whether the three points collected are collected when the speed of the terminal is greater than a preset value, and the scene that truly satisfies the linear motion is truly satisfied. If yes, go to step 312, otherwise go back to step 304.
  • the calibration program will detect the GPS coordinates of the intelligent terminal in real time, and record the track point once every interval (denoted as S, for example, 20m).
  • S for example, 20m
  • the system records the GPS track point from the position 1 shown by the line a shown in Figure 2, according to the above track point recording rule, when the recording is completed.
  • the coordinates of the user's position 3 three points can determine a straight line, so in general, the trajectory judgment is performed every three points), it can be judged that the user is not doing linear motion.
  • Step 312 If the motion track is not a linear motion, proceed to step 314, the coordinates of position 1 are invalid, and position 1 is discarded. Continue the effective track point acquisition, and re-determine position 2 as the starting position, as shown by the b route in Figure 2, and so on until three consecutive effective track points are found. If the motion trajectory is a linear motion, then step 316 is entered.
  • a straight line is calculated according to the GPS coordinates of points 2 and 3 (since the distance interval is small, the spherical arc of two points can be ignored), and then it is checked whether the first point is on the line. If it is on a straight line, the three points are valid points for data processing; otherwise, the first point is discarded, the second point is the first effective point of the acquisition sequence, and the third point is the second effective point of the acquisition sequence. , and so on, until three consecutive valid points are collected.
  • Step 316 Calculate an angle between the linear motion trajectory and the specified geographic direction, and calibrate the electronic compass according to the angle.
  • the terminal can acquire GPS coordinate data of the track point 1 and the track point 2, and the coordinate data is latitude and longitude data, and the latitude and longitude data is converted to obtain XY coordinate data, and the X-axis direction and the X-axis direction can be obtained according to the XY coordinate data.
  • the Y-axis direction therefore, the angle between the linear motion trajectory and the X-axis or the Y-axis can be calculated, and the angle between the linear motion trajectory and the true geographical direction, that is, the X-axis direction, Y
  • the direction of the axis is the true geographical direction. You can specify one of the four geographic directions to be the specified geographic direction, such as the geographic north.
  • the angle between the straight line trajectory ( 1 -2 ) calculated in Figure 4 and the geographic north is ⁇ 1 . After determining the angle, how to determine the magnetic pole direction.
  • the angle between the linear trajectory and the magnetic pole direction can be determined by using the deflection angle. As shown in Fig. 4, assuming that the deflection angle is westward ⁇ 2 , the angle between the north pole direction and the straight line trajectory is ⁇ 2+ ⁇ 1.
  • the magnetic pole direction of the earth can be calculated, and the magnetic pole direction of the electronic compass is calibrated based on the magnetic pole direction, thereby completing the automatic calibration of the electronic compass.
  • the auto-calibration function can be used as a sub-menu of the GPS menu, which can be turned on and off after the user turns on the GPS. As shown in Figure 5A, the auto-calibration feature is not available when GPS is not turned on. As shown in Figure 5B, after the GPS function is turned on, the auto-calibration function can be selected by the user and can be used normally.
  • the user does not need to perform any calibration operation, and the user only needs to start the calibration function to automatically complete the calibration of the electronic compass, thereby avoiding the problem that the user memorizes the calibration rule and forgetting to calibrate the electronic compass, thereby improving the calibration efficiency and Calibration accuracy.
  • Figure 6 shows a block diagram of a terminal in accordance with an embodiment of the present invention.
  • the terminal 600 may include: a determining unit 602, configured to acquire a motion track of the terminal and determine whether the motion track is a linear motion track; and a calculating unit 604, connected to the determining
  • the unit 602 is configured to calculate an angle between the motion trajectory and a specified geographic direction when determining that the motion trajectory is a linear motion trajectory;
  • a calibration unit 606 is connected to the calculation unit 604, according to the clip The electronic compass is calibrated at an angle.
  • the calibration method enriches the current calibration method, and it is quick and easy to obtain an accurate magnetic pole direction, which is used as a reference to calibrate the direction of the electronic compass.
  • the calibration unit 606 is further configured to determine a magnetic pole direction of the electronic compass according to an angular difference between the magnetic pole direction and the geographic direction, the angle and the linear motion trajectory, and the determined The electronic compass is calibrated in the direction of the magnetic pole of the electronic compass.
  • the determining unit 602 includes: an acquiring unit 6022, configured to collect three coordinate data of the terminal at a predetermined distance; and a detecting unit 6024, detecting the adjacent three coordinates Whether the data is on the same straight line, if the three coordinate data are on the same straight line, it is determined that the motion track of the terminal is a linear motion track.
  • the coordinate data of the terminal can be collected at a predetermined time or a predetermined distance. Since three lines can determine a straight line, three coordinate data can be used to determine whether the motion trajectory of the terminal is a straight line.
  • the detecting unit 6024 is further configured to: when the three coordinate data are not on the same line, discard the first coordinate data of the three coordinate data, and notify the The acquisition unit acquires new coordinate data, and detects whether the remaining two coordinate data of the three coordinate data and the new coordinate data are on the same straight line.
  • the first acquired coordinate data may be discarded, and the remaining two coordinate data and the newly acquired coordinate data constitute the next set of coordinate data for judgment until acquired. Up to three adjacent coordinate data on the same line.
  • the calculating unit 604 includes: a direction determining unit 6042, determining at least one geographic direction according to at least two coordinate data of the three coordinate data, and the at least one geographic direction One of the geographic directions is the specified geographic direction.
  • the coordinate data contains geographic coordinate information, such as latitude and longitude information.
  • XY coordinate data can be obtained.
  • the X-axis direction and the y-axis direction in the coordinate system can be determined, and the four directions of the coordinate system are It is equivalent to the geographical direction of Zhengbei, Zhengnan, Zhengdong and Zhengxi.
  • one of the geographic directions may be designated as the specified geographic direction to calculate the angle between the specified geographic direction and the linear motion trajectory. Since the geographic direction is accurate, the geographic direction is calculated based on the geographic direction. The direction of the magnetic pole is also accurate.
  • the collecting unit 6022 is a global positioning system or a Beidou positioning system.
  • the collecting unit 6022 is a global positioning system or a Beidou positioning system.
  • a positioning system capable of obtaining accurate terminal coordinate data. Since the base station positioning relative error is large, relatively accurate GPS positioning and Beidou positioning are prioritized in the present invention.
  • the terminal 600 may further include: a reminding unit 608, when the terminal starts the collecting unit, reminding the user whether to start the electronic compass calibration; the speed calculating unit 610, detecting the moving speed of the terminal And if the motion speed is greater than a preset value, notifying the determining unit 602 to acquire a motion trajectory of the terminal.
  • the terminal 600 described above may be a portable terminal such as a mobile phone or a tablet computer.
  • the electronic compass calibration system proposed by the present invention it is not necessary to perform a user-specific operation to calibrate the electronic compass, and only the electronic compass calibration function proposed by the present invention can be activated. Moreover, in order to obtain an accurate linear motion trajectory, the motion trajectory of the terminal is generally acquired only when the motion speed is large, and the probability of finding three coordinate data on a straight line can also be improved, thereby avoiding the terminal being continuously The detection and judgment action is performed, thereby reducing the power consumption of the terminal.
  • a program product stored on a non-transitory machine readable medium for electronic compass calibration, the program product comprising a machine executable for causing a computer system to perform the following steps Command: acquiring a motion trajectory of the terminal and determining whether the motion trajectory is a linear motion trajectory; determining the angle between the motion trajectory and the specified geographic direction when determining that the motion trajectory is a linear motion trajectory; The electronic compass is calibrated at an angle.
  • a non-volatile machine readable medium storing a program product for electronic compass calibration, the program product comprising machine executable instructions for causing a computer system to perform the following steps: a motion trajectory of the terminal and determining whether the motion trajectory is a linear motion trajectory; when determining that the motion trajectory is a linear motion trajectory, calculating an angle between the motion trajectory and a specified geographic direction; The electronic compass is calibrated.
  • a machine readable program the program causing a machine to perform the electronic compass calibration method according to any one of the technical solutions described above.
  • a storage medium storing a machine readable program, wherein the machine readable program causes the machine to perform the electronic compass calibration method according to any one of the above-described aspects.
  • the storage medium may be an optical disk, a hard disk, a floppy disk, a flash memory, or the like.
  • the invention adopts a convenient and fast electronic compass calibration method to solve the technical problem that the user is difficult to manually calibrate or forget to periodically calibrate the electronic compass on the GPS navigation terminal, improves the navigation accuracy and the navigation accuracy, and enhances the user experience.

Landscapes

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

Abstract

提供了一种电子罗盘校准方法和一种终端;其中电子罗盘校准方法包括如下步骤:获取终端的运动轨迹并判断运动轨迹是否是直线运动轨迹;在确定运动轨迹为直线运动轨迹时,计算运动轨迹与指定地理方向之间的夹角;根据夹角对电子罗盘进行校准。本方法利用终端的直线运动轨迹来对终端的电子罗盘进行校准,通过简便的方式能够快速、准确地确定电子罗盘的磁极方向,丰富了电子罗盘的校准方式。

Description

电子罗盘校准方法和终端
技术领域
本发明涉及通信技术领域, 具体而言, 涉及一种电子罗盘校准方法和 一种终端。 背景技术
GPS 导航终端应用越来越广泛, 为避免 GPS 导航失向, 终端中常加 入电子罗盘做导航方向的辅助, 但电子罗盘很容易受到电子设备产生的外 界磁场干扰而导致指向不准, 因此需要定期校准, 目前常用的是手动校准 方法有平面校准方法、 立体 8字校准法、 十面校准法等。 这些电子罗盘的 校准方法操作起来都较为复杂, 对用户来说方法掌握不正确或忘记校准方 法都会引起指向偏差。
因此, 如何采用筒便地方式来对电子罗盘进行校准成为亟待解决的技 术问题。 发明内容
本发明正是基于上述问题, 提出了一种新的电子罗盘校准技术, 通过 获取终端的直线运动轨迹来计算该直线运动轨迹与特定的地理方向的夹 角, 基于该夹角来对电子罗盘进行校准, 提供了一种快捷、 方便地电子逻 辑校准方式。
有鉴于此, 根据本发明的一个方面, 提供了一种电子罗盘校准方法, 包括: 获取终端的运动轨迹并判断所述运动轨迹是否是直线运动轨迹; 在 确定所述运动轨迹为直线运动轨迹时, 计算所述运动轨迹与指定地理方向 之间的夹角; 根据所述夹角对所述电子罗盘进行校准。
为了对电子罗盘的指向进行校准, 需以地理方向为基准进行比较, 因 此需获取直线运动轨迹与地理方向之间的夹角, 并以该夹角来对电子罗盘 的磁极方向进行补偿, 通过采用这样的技术方案, 可自动根据终端的运动 轨迹对电子罗盘进行校准, 无需用户手动对电子罗盘进行校准, 省去了记 忆校准操作的麻烦, 也避免了操作不恰当所引起的校准误差。 因此该校准 方法丰富了当前的校准方式, 能够快捷方便地获取准确的磁极方向, 以此 为基准对电子罗盘的指向进行校准。
在上述技术方案中, 优选的, 所述根据所述夹角对所述电子罗盘进行 校准的步骤包括: 根据磁极方向与地理方向之间的角度差、 所述夹角和所 述直线运动轨迹确定电子罗盘的磁极方向, 以确定的所述电子罗盘的磁极 方向对所述电子罗盘进行校准。
地球的磁极方向与真正意义上的地理方向之间具有一个角度差 (称为 利用该角度差来最终确定磁极方向与直线运动轨迹之间的夹角, 从而可以 确定地球准确的磁极方向, 以此来对电子罗盘的磁极方向进行校准, 即将 电子罗盘的磁极方向调整为与计算出的磁极方向一致。
在上述技术方案中, 优选的, 所述获取终端的运动轨迹并判断所述运 动轨迹是否是直线运动轨迹的步骤包括: 间隔预定距离采集所述终端的三 个坐标数据; 检测相邻的所述三个坐标数据是否处于同一直线上; 若所述 三个坐标数据处于同一直线上, 则确定所述终端的运动轨迹是直线运动轨 迹。
为了获取终端的运动轨迹, 可间隔预定时间或预定距离来采集终端的 坐标数据, 由于三点就可以确定一条直线, 因此可利用三个坐标数据来确 定终端的运动轨迹是否是直线的。
需说明的是, 由于地球是圓形的, 为了能够忽略两点之间的球面弧 度, 可设置每间隔很小的距离就采集终端的坐标数据。
在上述任一技术方案中, 优选的, 若所述三个坐标数据不在同一直线 上, 则舍弃所述三个坐标数据中的第一个坐标数据并采集新的坐标数据; 检测所述三个坐标数据中的剩余两个坐标数据和所述新的坐标数据是否在 同一直线上。
若已经采集的三个坐标数据不在同一直线上, 则可以舍弃第一个采集 的坐标数据, 并将剩余的两个坐标数据与新采集的坐标数据构成下一组坐 标数据进行判断, 直到获取到处于同一直线上的三个相邻的坐标数据为 止。
在上述任一技术方案中, 优选的, 根据所述三个坐标数据中的至少两 个坐标数据确定至少一个地理方向, 将所述至少一个地理方向中的一个地 理方向作为所述指定地理方向。
坐标数据中包含有地理坐标信息, 例如经纬度信息, 通过坐标变换, 可以得到 XY坐标数据, 根据两点坐标数据就能够确定坐标系中的 X轴方 向以及 y 轴方向, 坐标系的四个方向就等同于地理上的正北、 正南、 正 东、 正西方向。 在确定了四个地理方向之后, 可以指定其中的一个地理方 向作为指定地理方向来计算该指定地理方向与直线运动轨迹之间的夹角, 由于地理方向是准确的, 故基于该地理方向计算出的磁极方向也是准确 的。
在上述任一技术方案中, 优选的, 所述坐标数据为采用全球定位系统 或北斗定位系统获取的定位数据。
为了能够得到地理方向, 因此需要采用能够获得准确的终端坐标数据 的定位系统, 由于基站定位相对误差较大, 因此在本发明中优先考虑相对 准确的 GPS定位以及北斗定位。
在上述任一技术方案中, 优选的, 还可以包括: 在终端启动定位系统 时, 提醒用户是否启动电子罗盘校准系统; 检测所述终端的运动速度, 若 所述运动速度大于预设值, 则获取所述终端的运动轨迹。
在本发明提出的电子罗盘校准系统中, 无需用户专门操作来对电子罗 盘进行校准, 仅仅启动本发明提出的电子罗盘校准功能即可。 并且为了能 够获取准确的直线运动轨迹, 一般只在运动速度较大时, 才获取终端的运 动轨迹, 并且也能够提高查找到处于一条直线上的三个坐标数据的概率, 避免终端一直在不断地执行检测判断动作, 从而减少终端的功耗。
根据本发明的另一方面, 还提供了一种终端, 包括: 判断单元, 用于 获取终端的运动轨迹并判断所述运动轨迹是否是直线运动轨迹; 计算单 元, 连接至所述判断单元, 用于在确定所述运动轨迹为直线运动轨迹时, 计算所述运动轨迹与指定地理方向之间的夹角; 校准单元, 连接至所述计 算单元, 用于根据所述夹角对所述电子罗盘进行校准。
为了对电子罗盘的指向进行校准, 需以地理方向为基准进行比较, 因 此需获取直线运动轨迹与地理方向之间的夹角, 并以该夹角来对电子罗盘 的磁极方向进行补偿, 通过采用这样的技术方案, 可自动根据终端的运动 轨迹对电子罗盘进行校准, 无需用户手动对电子罗盘进行校准, 省去了记 忆校准操作的麻烦, 也避免了操作不恰当所引起的校准误差。 因此该校准 方法丰富了当前的校准方式, 能够快捷方便地获取准确的磁极方向, 以此 为基准对电子罗盘的指向进行校准。
在上述技术方案中, 优选的, 所述校准单元还用于根据磁极方向与地 理方向之间的角度差、 所述夹角和所述直线运动轨迹确定电子罗盘的磁极 方向, 以确定的所述电子罗盘的磁极方向对所述电子罗盘进行校准。
地球的磁极方向与真正意义上的地理方向之间具有一个角度差 (称为 利用该角度差来最终确定磁极方向与直线运动轨迹之间的夹角, 从而可以 确定地球准确的磁极方向, 以此来对电子罗盘的磁极方向进行校准, 即将 电子罗盘的磁极方向调整为与计算出的磁极方向一致。
在上述任一技术方案中, 优选的, 所述判断单元包括: 采集单元, 用 于间隔预定距离采集所述终端的三个坐标数据; 检测单元, 检测相邻的所 述三个坐标数据是否处于同一直线上, 若所述三个坐标数据处于同一直线 上, 则确定所述终端的运动轨迹是直线运动轨迹。
为了获取终端的运动轨迹, 可间隔预定时间或预定距离来采集终端的 坐标数据, 由于三点就可以确定一条直线, 因此可利用三个坐标数据来确 定终端的运动轨迹是否是直线的。
需说明的是, 由于地球是圓形的, 为了能够忽略两点之间的球面弧 度, 可设置每间隔很小的距离就采集终端的坐标数据。
在上述任一技术方案中, 优选的, 所述检测单元还用于在所述三个坐 标数据不在同一直线上时, 舍弃所述三个坐标数据中的第一个坐标数据, 通知所述采集单元采集新的坐标数据, 以及检测所述三个坐标数据中的剩 余两个坐标数据和所述新的坐标数据是否在同一直线上。
若已经采集的三个坐标数据不在同一直线上, 则可以舍弃第一个采集 的坐标数据, 并将剩余的两个坐标数据与新采集的坐标数据构成下一组坐 标数据进行判断, 直到获取到处于同一直线上的三个相邻的坐标数据为 止。
在上述任一技术方案中, 优选的, 所述计算单元包括: 方向确定单 元, 根据所述三个坐标数据中的至少两个坐标数据确定至少一个地理方 向, 将所述至少一个地理方向中的一个地理方向作为所述指定地理方向。
坐标数据中包含有地理坐标信息, 例如经纬度信息, 通过坐标变换, 可以得到 XY坐标数据, 根据两点坐标数据就能够确定坐标系中的 X轴方 向以及 y 轴方向, 坐标系的四个方向就等同于地理上的正北、 正南、 正 东、 正西方向。 在确定了四个地理方向之后, 可以指定其中的一个地理方 向作为指定地理方向来计算该指定地理方向与直线运动轨迹之间的夹角, 由于地理方向是准确的, 故基于该地理方向计算出的磁极方向也是准确 的。
在上述任一技术方案中, 优选的, 所述采集单元为全球定位系统或北 斗定位系统。 为了能够得到地理方向, 因此需要采用能够获得准确的终端 坐标数据的定位系统, 由于基站定位相对误差较大, 因此在本发明中优先 考虑相对准确的 GPS定位以及北斗定位。
在上述任一技术方案中, 优选的, 还包括: 提醒单元, 在终端启动所 述采集单元时, 提醒用户是否启动电子罗盘校准; 速度计算单元, 检测所 述终端的运动速度, 若所述运动速度大于预设值, 则通知所述判断单元获 取所述终端的运动轨迹。
在本发明提出的电子罗盘校准系统中, 无需用户专门操作来对电子罗 盘进行校准, 仅仅启动本发明提出的电子罗盘校准功能即可。 并且为了能 够获取准确的直线运动轨迹, 一般只在运动速度较大时, 才获取终端的运 动轨迹, 并且也能够提高查找到处于一条直线上的三个坐标数据的概率, 避免终端一直在不断地执行检测判断动作, 从而减少终端的功耗。
根据本发明的再一方面, 还提供了一种存储在非易失性机器可读介质 上的程序产品, 用于电子罗盘校准, 所述程序产品包括用于使计算机系统 执行以下步骤的机器可执行指令: 获取终端的运动轨迹并判断所述运动轨 迹是否是直线运动轨迹; 在确定所述运动轨迹为直线运动轨迹时, 计算所 述运动轨迹与指定地理方向之间的夹角; 根据所述夹角对所述电子罗盘进 行校准。
根据本发明的再一方面, 还提供了一种非易失机器可读介质, 存储有 用于电子罗盘校准的程序产品, 所述程序产品包括用于使计算机系统执行 以下步骤的机器可执行指令: 获取终端的运动轨迹并判断所述运动轨迹是 否是直线运动轨迹; 在确定所述运动轨迹为直线运动轨迹时, 计算所述运 动轨迹与指定地理方向之间的夹角; 根据所述夹角对所述电子罗盘进行校 准。
根据本发明的又一方面, 还提供了一种机器可读程序, 所述程序使机 器执行如上所述技术方案中任一所述的电子罗盘校准方法。
根据本发明的又一方面, 还提供了一种存储有机器可读程序的存储介 质, 其中, 所述机器可读程序使得机器执行如上所述技术方案中任一所述 的电子罗盘校准方法。 附图说明
图 1示出了根据本发明的一个实施例的电子罗盘校准方法的示意图; 图 2示出了根据本发明的实施例的运动轨迹计算示意图;
图 3示出了根据本发明的另一实施例的电子罗盘校准方法的流程图; 角示意图;
图 5A 和图 5B 分别示出了根据本发明的实施例的自动校准功能菜单 示意图;
图 6示出了根据本发明的实施例的终端的框图。 具体实施方式
为了能够更清楚地理解本发明的上述目的、 特征和优点, 下面结合附 图和具体实施方式对本发明进行进一步的详细描述。 需要说明的是, 在不 沖突的情况下, 本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明, 但是, 本发明还可以采用其他不同于在此描述的其他方式来实施, 因此, 本发明 的保护范围并不受下面公开的具体实施例的限制。
图 1示出了根据本发明的一个实施例的电子罗盘校准方法的示意图。 如图 1所示, 根据本发明的实施例的电子罗盘校准方法可以包括以下 步骤: 步骤 102 , 获取终端的运动轨迹并判断该运动轨迹是否是直线运动 轨迹; 步骤 104 , 在确定运动轨迹为直线运动轨迹时, 计算该运动轨迹与 指定地理方向之间的夹角; 步骤 106 , 根据夹角对电子罗盘进行校准。
为了对电子罗盘的指向进行校准, 需以地理方向为基准进行比较, 因 此需获取直线运动轨迹与地理方向之间的夹角, 并以该夹角来对电子罗盘 的磁极方向进行补偿, 通过采用这样的技术方案, 可自动根据终端的运动 轨迹对电子罗盘进行校准, 无需用户手动对电子罗盘进行校准, 省去了记 忆校准操作的麻烦, 也避免了操作不恰当所引起的校准误差。 因此该校准 方法丰富了当前的校准方式, 能够快捷方便地获取准确的磁极方向, 以此 为基准对电子罗盘的指向进行校准。
在上述技术方案中, 优选的, 所述根据所述夹角对所述电子罗盘进行 校准的步骤包括: 根据磁极方向与地理方向之间的角度差、 所述夹角和所 述直线运动轨迹确定电子罗盘的磁极方向, 以确定的所述电子罗盘的磁极 方向对所述电子罗盘进行校准。
地球的磁极方向与真正意义上的地理方向之间具有一个角度差 (称为 利用该角度差来最终确定磁极方向与直线运动轨迹之间的夹角, 从而可以 确定地球准确的磁极方向, 以此来对电子罗盘的磁极方向进行校准, 即将 电子罗盘的磁极方向调整为与计算出的磁极方向一致。 在上述技术方案中, 优选的, 步骤 106具体包括: 间隔预定距离采集 所述终端的三个坐标数据; 检测相邻的所述三个坐标数据是否处于同一直 线上; 若所述三个坐标数据处于同一直线上, 则确定所述终端的运动轨迹 是直线运动轨迹。
为增强用户体验, 自动校准功能可以作为 GPS 菜单的子菜单, 用户 开启 GPS后才能进行该功能的开启和关闭操作。
为了获取终端的运动轨迹, 可间隔预定时间或预定距离来采集终端的 坐标数据, 由于三点就可以确定一条直线, 因此可利用三个坐标数据来确 定终端的运动轨迹是否是直线的。
需说明的是, 由于地球是圓形的, 为了能够忽略两点之间的球面弧 度, 可设置每间隔很小的距离就采集终端的坐标数据。
在上述任一技术方案中, 优选的, 若所述三个坐标数据不在同一直线 上, 则舍弃所述三个坐标数据中的第一个坐标数据并采集新的坐标数据; 检测所述三个坐标数据中的剩余两个坐标数据和所述新的坐标数据是否在 同一直线上。
若已经采集的三个坐标数据不在同一直线上, 则可以舍弃第一个采集 的坐标数据, 并将剩余的两个坐标数据与新采集的坐标数据构成下一组坐 标数据进行判断, 直到获取到处于同一直线上的三个相邻的坐标数据为 止。
在上述任一技术方案中, 优选的, 获取所述指定地理方向的方法包 括: 根据所述三个坐标数据中的至少两个坐标数据确定至少一个地理方 向, 将所述至少一个地理方向中的一个地理方向作为所述指定地理方向。
坐标数据中包含有地理坐标信息, 例如经纬度信息, 通过坐标变换, 可以得到 XY坐标数据, 根据两点坐标数据就能够确定坐标系中的 X轴方 向以及 y 轴方向, 坐标系的四个方向就等同于地理上的正北、 正南、 正 东、 正西方向。 在确定了四个地理方向之后, 可以指定其中的一个地理方 向作为指定地理方向来计算该指定地理方向与直线运动轨迹之间的夹角, 由于地理方向是准确的, 故基于该地理方向计算出的磁极方向也是准确 的。 在上述任一技术方案中, 优选的, 所述坐标数据为采用全球定位系统 或北斗定位系统获取的定位数据。
为了能够得到地理方向, 因此需要采用能够获得准确的终端坐标数据 的定位系统, 由于基站定位相对误差较大, 因此在本发明中优先考虑相对 准确的 GPS定位以及北斗定位。
在上述任一技术方案中, 优选的, 还可以包括: 在终端启动定位系统 时, 提醒用户是否启动电子罗盘校准系统; 检测所述终端的运动速度, 若 所述运动速度大于预设值, 则获取所述终端的运动轨迹。
在本发明提出的电子罗盘校准系统中, 无需用户专门操作来对电子罗 盘进行校准, 仅仅启动本发明提出的电子罗盘校准功能即可。 并且为了能 够获取准确的直线运动轨迹, 一般只在运动速度较大时, 才获取终端的运 动轨迹, 并且也能够提高查找到处于一条直线上的三个坐标数据的概率, 避免终端一直在不断地执行检测判断动作, 从而减少终端的功耗。
接下来结合图 2至图 3进一步说明根据本发明的实施例的电子罗盘校 准方法。
在进行根据本发明的电子罗盘校准方法时, 需进行有效轨迹点的采 集。
步骤 302 , 在用户开启定位系统例如 GPS定位系统时, 可提醒用户是 否开启电子罗盘的自动校准功能。 若开启电子罗盘的自动校准功能, 判断 终端的运动速度是否大于设定值, 若运动速度大于设定值 (例如 10Km/h ) , 则可以开始采集终端的轨迹点。
步骤 304 , 首先采集 GPS 轨迹点 1。 步骤 306 , —段距离后, 采集 GPS轨迹点 2。 步骤 308 , —段距离后, 采集 GPS轨迹点 3。
步骤 310, 判断采集的三个点之间是否速度要求, 即采集的这三个点 是否是均是在终端的速度大于预设值时采集的, 真正满足直线运动的场 景。 若是, 则进入步骤 312 , 否则回到步骤 304。
校准程序会实时检测智能终端的 GPS 坐标, 每间隔一段距离 (记为 S , 例如取 20m ) 记录一次轨迹点。 假设系统从图 2 中所示的线路 a所示 的位置①处开始记录 GPS 轨迹点, 按照以上轨迹点记录规则, 当记录完 用户位置③的坐标 (三点可确定一条直线, 因此一般情况下是每采集三个 点进行一次轨迹判断) 时, 即可判断用户不是在做直线运动。
步骤 312 , 若该运动轨迹不是直线运动, 则进入步骤 314 , 位置①的 坐标被是无效的, 舍弃位置①。 继续进行有效轨迹点采集, 把位置②重新 作为起始位置进行判定, 如图 2中的 b路线所示, 以此类推直至找到三个 连续的有效轨迹点。 若该运动轨迹是直线运动, 则进入步骤 316。
也就是说, 根据第 2、 第 3点的 GPS坐标计算出一条直线 (由于距离 间隔较小, 可以忽略两点的球面弧度) , 然后检验第 1 点是否在该直线 上。 若在一条直线上, 则三点为有效点, 进行数据处理; 否则舍弃第 1 点, 以第 2点为采集序列的第一个有效点, 以第 3点为采集序列的第二个 有效点, 以此类推, 直到采集完三个连续的有效点。
步骤 316 , 计算直线运动轨迹与指定地理方向之间的夹角, 根据该夹 角对电子罗盘进校准。
下面说明是如何确定指定地理方向的。
为了对电子罗盘进行准确的校准, 需获取准确的地理方向。
如图 4所示, 终端能够获取轨迹点 1 和轨迹点 2的 GPS坐标数据, 该坐标数据是经纬度数据, 将该经纬度数据进行转换得到 XY坐标数据, 根据该 XY坐标数据能够得到 X轴方向和 Y轴方向, 因此, 可计算出该 直线运动轨迹与 X轴或 Y轴之间的夹角, 而该夹角即直线运动轨迹与真 正意义上的地理方向的夹角, 即 X轴方向、 Y轴方向即真正意义上的地理 方向。 可以指定四个地理方向中的一个地理方向为指定地理方向, 例如地 理北。
在图 4 中计算出的直线轨迹( 1 -2 ) 与地理北之间的夹角为 θ 1 , 确定 了该夹角之后, 如何确定磁极方向呢。
由于地球的磁极方向与地理方向存在一个偏向角, 故利用该偏向角就 可以确定直线轨迹与磁极方向之间的夹角。 如图 4所示, 假设偏向角是向 西偏 Θ 2 , 那么磁极北方向与直线轨迹之间的夹角为 θ 2+ Θ 1。
根据上述方法就能够计算出地球的磁极方向, 以该磁极方向为依据, 对电子罗盘的磁极方向进行校准, 至此完成了电子罗盘的自动校准。 为增强用户体验, 自动校准功能可以作为 GPS 菜单的子菜单, 用户 开启 GPS后才能进行该功能的开启和关闭操作。 如图 5A所示, 在没有开 启 GPS 时, 自动校准的功能无法使用。 如图 5B所示, 在开启 GPS 功能 之后, 自动校准的功能可以供用户选择并且可以正常使用。
上述电子罗盘校准方法中无需用户做任何校准操作, 用户只需要启动 校准功能就可以自动地完成电子罗盘的校准, 避免了用户记忆校准规则以 及忘记对电子罗盘进行校准的问题, 提高了校准效率以及校准准确度。
图 6示出了根据本发明的实施例的终端的框图。
如图 6 所示, 根据本发明的实施例的终端 600 可以包括: 判断单元 602 , 用于获取终端的运动轨迹并判断所述运动轨迹是否是直线运动轨 迹; 计算单元 604 , 连接至所述判断单元 602 , 用于在确定所述运动轨迹 为直线运动轨迹时, 计算所述运动轨迹与指定地理方向之间的夹角; 校准 单元 606 , 连接至所述计算单元 604 , 用于根据所述夹角对所述电子罗盘 进行校准。
为了对电子罗盘的指向进行校准, 需以地理方向为基准进行比较, 因 此需获取直线运动轨迹与地理方向之间的夹角, 并以该夹角来对电子罗盘 的磁极方向进行补偿, 通过采用这样的技术方案, 可自动根据终端的运动 轨迹对电子罗盘进行校准, 无需用户手动对电子罗盘进行校准, 省去了记 忆校准操作的麻烦, 也避免了操作不恰当所引起的校准误差。 因此该校准 方法丰富了当前的校准方式, 能够快捷方便地获取准确的磁极方向, 以此 为基准对电子罗盘的指向进行校准。
在上述技术方案中, 优选的, 所述校准单元 606还用于根据磁极方向 与地理方向之间的角度差、 所述夹角和所述直线运动轨迹确定电子罗盘的 磁极方向, 以确定的所述电子罗盘的磁极方向对所述电子罗盘进行校准。
地球的磁极方向与真正意义上的地理方向之间具有一个角度差 (称为 利用该角度差来最终确定磁极方向与直线运动轨迹之间的夹角, 从而可以 确定地球准确的磁极方向, 以此来对电子罗盘的磁极方向进行校准, 即将 电子罗盘的磁极方向调整为与计算出的磁极方向一致。 在上述任一技术方案中, 优选的, 所述判断单元 602 包括: 采集单元 6022 , 用于间隔预定距离采集所述终端的三个坐标数据; 检测单元 6024 , 检测相邻的所述三个坐标数据是否处于同一直线上, 若所述三个坐 标数据处于同一直线上, 则确定所述终端的运动轨迹是直线运动轨迹。
为了获取终端的运动轨迹, 可间隔预定时间或预定距离来采集终端的 坐标数据, 由于三点就可以确定一条直线, 因此可利用三个坐标数据来确 定终端的运动轨迹是否是直线的。
需说明的是, 由于地球是圓形的, 为了能够忽略两点之间的球面弧 度, 可设置每间隔很小的距离就采集终端的坐标数据。
在上述任一技术方案中, 优选的, 所述检测单元 6024 还用于在所述 三个坐标数据不在同一直线上时, 舍弃所述三个坐标数据中的第一个坐标 数据, 通知所述采集单元采集新的坐标数据, 以及检测所述三个坐标数据 中的剩余两个坐标数据和所述新的坐标数据是否在同一直线上。
若已经采集的三个坐标数据不在同一直线上, 则可以舍弃第一个采集 的坐标数据, 并将剩余的两个坐标数据与新采集的坐标数据构成下一组坐 标数据进行判断, 直到获取到处于同一直线上的三个相邻的坐标数据为 止。
在上述任一技术方案中, 优选的, 所述计算单元 604 包括: 方向确定 单元 6042 , 根据所述三个坐标数据中的至少两个坐标数据确定至少一个 地理方向, 将所述至少一个地理方向中的一个地理方向作为所述指定地理 方向。
坐标数据中包含有地理坐标信息, 例如经纬度信息, 通过坐标变换, 可以得到 XY坐标数据, 根据两点坐标数据就能够确定坐标系中的 X轴方 向以及 y 轴方向, 坐标系的四个方向就等同于地理上的正北、 正南、 正 东、 正西方向。 在确定了四个地理方向之后, 可以指定其中的一个地理方 向作为指定地理方向来计算该指定地理方向与直线运动轨迹之间的夹角, 由于地理方向是准确的, 故基于该地理方向计算出的磁极方向也是准确 的。 在上述任一技术方案中, 优选的, 所述采集单元 6022 为全球定位系 统或北斗定位系统。 为了能够得到地理方向, 因此需要采用能够获得准确 的终端坐标数据的定位系统, 由于基站定位相对误差较大, 因此在本发明 中优先考虑相对准确的 GPS定位以及北斗定位。
在上述任一技术方案中, 优选的, 终端 600 还可以包括: 提醒单元 608 , 在终端启动所述采集单元时, 提醒用户是否启动电子罗盘校准; 速 度计算单元 610 , 检测所述终端的运动速度, 若所述运动速度大于预设 值, 则通知所述判断单元 602获取所述终端的运动轨迹。
上述终端 600可以是例如手机、 平板电脑等便携式终端。
在本发明提出的电子罗盘校准系统中, 无需用户专门操作来对电子罗 盘进行校准, 仅仅启动本发明提出的电子罗盘校准功能即可。 并且为了能 够获取准确的直线运动轨迹, 一般只在运动速度较大时, 才获取终端的运 动轨迹, 并且也能够提高查找到处于一条直线上的三个坐标数据的概率, 避免终端一直在不断地执行检测判断动作, 从而减少终端的功耗。
根据本发明的实施方式, 还提供了一种存储在非易失性机器可读介质 上的程序产品, 用于电子罗盘校准, 所述程序产品包括用于使计算机系统 执行以下步骤的机器可执行指令: 获取终端的运动轨迹并判断所述运动轨 迹是否是直线运动轨迹; 在确定所述运动轨迹为直线运动轨迹时, 计算所 述运动轨迹与指定地理方向之间的夹角; 根据所述夹角对所述电子罗盘进 行校准。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有 用于电子罗盘校准的程序产品, 所述程序产品包括用于使计算机系统执行 以下步骤的机器可执行指令: 获取终端的运动轨迹并判断所述运动轨迹是 否是直线运动轨迹; 在确定所述运动轨迹为直线运动轨迹时, 计算所述运 动轨迹与指定地理方向之间的夹角; 根据所述夹角对所述电子罗盘进行校 准。
根据本发明的实施方式, 还提供了一种机器可读程序, 所述程序使机 器执行如上所述技术方案中任一所述的电子罗盘校准方法。 根据本发明的实施方式, 还提供了一种存储有机器可读程序的存储介 质, 其中, 所述机器可读程序使得机器执行如上所述技术方案中任一所述 的电子罗盘校准方法。 该存储介质可以是光盘、 硬盘、 软盘、 闪存等。
本发明采用方便、 快捷的电子罗盘校准方法解决了 GPS 导航终端上 用户难以手动校准或忘记定期校准电子罗盘的技术问题, 提高了导航准确 率和导航准确率, 增强了用户体验。
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于 本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明 的保护范围之内。

Claims

权 利 要 求 书
1. 一种电子罗盘校准方法, 其特征在于, 包括:
获取终端的运动轨迹并判断所述运动轨迹是否是直线运动轨迹; 在确定所述运动轨迹为直线运动轨迹时, 计算所述运动轨迹与指定地 理方向之间的夹角;
根据所述夹角对所述电子罗盘进行校准。
2. 根据权利要求 1 所述的电子罗盘校准方法, 其特征在于, 所述根 据所述夹角对所述电子罗盘进行校准的步骤包括:
根据磁极方向与地理方向之间的角度差、 所述夹角和所述直线运动轨 迹确定电子罗盘的磁极方向, 以确定的所述电子罗盘的磁极方向对所述电 子罗盘进行校准。
3. 根据权利要求 1 所述的电子罗盘校准方法, 其特征在于, 所述获 取终端的运动轨迹并判断所述运动轨迹是否是直线运动轨迹的步骤包括: 间隔预定距离采集所述终端的三个坐标数据;
检测相邻的所述三个坐标数据是否处于同一直线上;
若所述三个坐标数据处于同一直线上, 则确定所述终端的运动轨迹是 直线运动轨迹。
4. 根据权利要求 3 所述的电子罗盘校准方法, 其特征在于, 若所述 三个坐标数据不在同一直线上, 则舍弃所述三个坐标数据中的第一个坐标 数据并采集新的坐标数据;
检测所述三个坐标数据中的剩余两个坐标数据和所述新的坐标数据是 否在同一直线上。
5. 根据权利要求 3 所述的电子罗盘校准方法, 其特征在于, 获取所 述指定地理方向的方法包括:
根据所述三个坐标数据中的至少两个坐标数据确定至少一个地理方 向, 将所述至少一个地理方向中的一个地理方向作为所述指定地理方向。
6. 根据权利要求 3 所述的电子罗盘校准方法, 其特征在于, 所述坐 标数据为采用全球定位系统或北斗定位系统获取的定位数据。 7. 根据权利要求 3 至 6 中任一项所述的电子罗盘校准方法, 其特征 在于, 还包括:
在终端启动定位系统时, 提醒用户是否启动电子罗盘校准系统; 检测所述终端的运动速度, 若所述运动速度大于预设值, 则获取所述 终端的运动轨迹。
. 一种终端, 其特征在于, 包括:
Figure imgf000018_0001
计算单元, 连接至所述判断单元, 用于在确定所述运动轨迹为直线运 动轨迹时, 计算所述运动轨迹与指定地理方向之间的夹角;
校准单元, 连接至所述计算单元, 用于根据所述夹角对所述电子罗盘 进行校准。
9. 根据权利要求 8 所述的终端, 其特征在于, 所述校准单元还用于 根据磁极方向与地理方向之间的角度差、 所述夹角和所述直线运动轨迹确 定电子罗盘的磁极方向, 以确定的所述电子罗盘的磁极方向对所述电子罗 盘进行校准。
10. 根据权利要求 8所述的终端, 其特征在于, 所述判断单元包括: 采集单元, 用于间隔预定距离采集所述终端的三个坐标数据; 检测单元, 检测相邻的所述三个坐标数据是否处于同一直线上, 若所 述三个坐标数据处于同一直线上, 则确定所述终端的运动轨迹是直线运动 轨迹。
11. 根据权利要求 10 所述的终端, 其特征在于, 所述检测单元还用 于在所述三个坐标数据不在同一直线上时, 舍弃所述三个坐标数据中的第 一个坐标数据, 通知所述采集单元采集新的坐标数据, 以及检测所述三个 坐标数据中的剩余两个坐标数据和所述新的坐标数据是否在同一直线上。
12. 根据权利要求 10 所述的终端, 其特征在于, 所述计算单元包 括:
方向确定单元, 根据所述三个坐标数据中的至少两个坐标数据确定至 少一个地理方向, 将所述至少一个地理方向中的一个地理方向作为所述指 定地理方向。
13. 根据权利要求 10 所述的终端, 其特征在于, 所述采集单元为全 球定位系统或北斗定位系统。
14. 根据权利要求 10至 13 中任一项所述的终端, 其特征在于, 还包 括:
提醒单元, 在终端启动所述采集单元时, 提醒用户是否启动电子罗盘 校准;
速度计算单元, 检测所述终端的运动速度, 若所述运动速度大于预设 值, 则通知所述判断单元获取所述终端的运动轨迹。
PCT/CN2013/087306 2013-11-18 2013-11-18 电子罗盘校准方法和终端 Ceased WO2015070451A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/087306 WO2015070451A1 (zh) 2013-11-18 2013-11-18 电子罗盘校准方法和终端
CN201380068698.4A CN104884895B (zh) 2013-11-18 2013-11-18 电子罗盘校准方法和终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/087306 WO2015070451A1 (zh) 2013-11-18 2013-11-18 电子罗盘校准方法和终端

Publications (1)

Publication Number Publication Date
WO2015070451A1 true WO2015070451A1 (zh) 2015-05-21

Family

ID=53056666

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/087306 Ceased WO2015070451A1 (zh) 2013-11-18 2013-11-18 电子罗盘校准方法和终端

Country Status (2)

Country Link
CN (1) CN104884895B (zh)
WO (1) WO2015070451A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110307857A (zh) * 2019-04-23 2019-10-08 深圳市趣创科技有限公司 指南针校准方法、装置、计算机设备及存储介质
CN112066965A (zh) * 2020-09-27 2020-12-11 四川九洲电器集团有限责任公司 一种基于定位和三维陀螺仪进行校正的电子指南针

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381607B (zh) * 2018-12-29 2021-11-30 华为技术有限公司 拍摄设备的校准方向方法和装置
CN111915873B (zh) * 2020-06-23 2021-10-29 摩拜(北京)信息技术有限公司 车辆及共享车辆系统
CN113218380B (zh) * 2021-05-21 2022-09-02 北京百度网讯科技有限公司 一种电子罗盘的校正方法、装置、电子设备及存储介质
CN113566847B (zh) * 2021-07-22 2022-10-11 北京百度网讯科技有限公司 导航校准方法和装置、电子设备、计算机可读介质
CN113566846B (zh) * 2021-07-22 2022-11-04 北京百度网讯科技有限公司 导航校准方法和装置、电子设备、计算机可读介质
CN119915265B (zh) * 2025-01-20 2025-11-25 湖北久之洋红外系统股份有限公司 一种电子罗盘的标校方法、系统、计算机设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752718A (zh) * 2004-09-20 2006-03-29 笠基企业股份有限公司 导航装置的角度相互校正方法及其装置
US20070089311A1 (en) * 2005-10-26 2007-04-26 Honeywell International Inc. Magnetic field sensing device for compassing and switching
CN101201255A (zh) * 2007-12-21 2008-06-18 四川川大智胜软件股份有限公司 基于智能导航算法的车辆组合导航系统
CN101487706A (zh) * 2009-03-05 2009-07-22 杨红红 基于动态提取有效数据计算方法的电子罗盘
CN102519450A (zh) * 2011-12-12 2012-06-27 东南大学 一种用于水下滑翔器的组合导航装置及方法
EP2660561A1 (en) * 2011-02-17 2013-11-06 Aichi Micro Intelligent Corporation Geomagnetic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5017527B2 (ja) * 2007-03-23 2012-09-05 アイチ・マイクロ・インテリジェント株式会社 電子コンパスシステム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752718A (zh) * 2004-09-20 2006-03-29 笠基企业股份有限公司 导航装置的角度相互校正方法及其装置
US20070089311A1 (en) * 2005-10-26 2007-04-26 Honeywell International Inc. Magnetic field sensing device for compassing and switching
CN101201255A (zh) * 2007-12-21 2008-06-18 四川川大智胜软件股份有限公司 基于智能导航算法的车辆组合导航系统
CN101487706A (zh) * 2009-03-05 2009-07-22 杨红红 基于动态提取有效数据计算方法的电子罗盘
EP2660561A1 (en) * 2011-02-17 2013-11-06 Aichi Micro Intelligent Corporation Geomagnetic device
CN102519450A (zh) * 2011-12-12 2012-06-27 东南大学 一种用于水下滑翔器的组合导航装置及方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110307857A (zh) * 2019-04-23 2019-10-08 深圳市趣创科技有限公司 指南针校准方法、装置、计算机设备及存储介质
CN112066965A (zh) * 2020-09-27 2020-12-11 四川九洲电器集团有限责任公司 一种基于定位和三维陀螺仪进行校正的电子指南针

Also Published As

Publication number Publication date
CN104884895B (zh) 2018-06-15
CN104884895A (zh) 2015-09-02

Similar Documents

Publication Publication Date Title
WO2015070451A1 (zh) 电子罗盘校准方法和终端
US11532136B2 (en) Registration between actual mobile device position and environmental model
CN103718062B (zh) 用于确保个人导航设备的服务的持续性的方法及其设备
US9679414B2 (en) Federated mobile device positioning
US8396661B2 (en) Using relative position data in a mobile computing device
CN103453901B (zh) 一种位置指引系统及位置指引方法
JP2012117976A (ja) 移動端末、システム及び方法
WO2016131279A1 (zh) 运动轨迹记录方法和用户设备
JP2022184942A (ja) 携帯型電子時計、表示方法および表示プログラム
CN103543289B (zh) 一种获取终端运动方向的方法及装置
WO2016198009A1 (zh) 一种检测航向的方法和装置
CN105091878A (zh) 一种基于步态的定位方法和装置
WO2016095352A1 (zh) 逆向导航方法及移动终端
CN107066472A (zh) 地图显示方法及系统、终端及地图服务器
CN103322998B (zh) 显示当前位置的信息处理装置
CN106468539B (zh) 用于生成地理坐标的方法和设备
JP2014194363A (ja) 誘導装置、誘導方法、及びプログラム
CN103499707B (zh) 一种获取终端运动方向的方法及装置
JP2015155802A (ja) 携帯電子機器、および位置算出プログラム
CN105606087B (zh) 导航方法以及装置
CN106441360B (zh) 方位校准方法及装置
CN107014373B (zh) 在定位时用来产生一地理方位的方法及定位系统
WO2017088149A1 (zh) 一种指示方向的方法和装置
JP2014182033A (ja) 移動軌跡表示装置並びにプログラム、及び移動軌跡表示方法
TWI536859B (zh) 裝置相對位置的判定方法、電子裝置及電腦程式產品

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: 13897578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27/10/2016)

122 Ep: pct application non-entry in european phase

Ref document number: 13897578

Country of ref document: EP

Kind code of ref document: A1