WO2013053093A1 - Terminal positioning method and terminal with electronic compass - Google Patents

Terminal positioning method and terminal with electronic compass Download PDF

Info

Publication number
WO2013053093A1
WO2013053093A1 PCT/CN2011/080597 CN2011080597W WO2013053093A1 WO 2013053093 A1 WO2013053093 A1 WO 2013053093A1 CN 2011080597 W CN2011080597 W CN 2011080597W WO 2013053093 A1 WO2013053093 A1 WO 2013053093A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
electronic compass
azimuth
distance
pointer
Prior art date
Application number
PCT/CN2011/080597
Other languages
French (fr)
Chinese (zh)
Inventor
徐海林
Original Assignee
海能达通信股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 海能达通信股份有限公司 filed Critical 海能达通信股份有限公司
Priority to PCT/CN2011/080597 priority Critical patent/WO2013053093A1/en
Publication of WO2013053093A1 publication Critical patent/WO2013053093A1/en

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/02Magnetic compasses
    • G01C17/28Electromagnetic compasses
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers
    • G01C21/3667Display of a road map
    • G01C21/367Details, e.g. road map scale, orientation, zooming, illumination, level of detail, scrolling of road map or positioning of current position marker

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a terminal positioning method and a terminal with an electronic compass. Background technique
  • the electronic compass is an important navigation tool that provides the heading of moving objects in real time.
  • the prior art provides a method for displaying a map that can be oriented, which can make the orientation of the north of the map displayed on the mobile terminal the same as the north orientation of the physical world.
  • the specific implementation is as follows:
  • the processor in the mobile terminal determines according to the continuous Whether the Global Positioning System (GPS) position point can determine the orientation of the map. If not, read the direction of the magnetic field of the electronic compass and calculate the orientation of the map based on the direction of the magnetic field of the electronic compass. After determining the orientation of the map, the map is oriented and displayed. As shown in Fig. 1 and Fig. 2, the top of the mobile terminal is north, so the north direction of the map displayed in the mobile terminal is toward the top of the screen, as shown in Fig. 1.
  • GPS Global Positioning System
  • the mobile terminal When the mobile terminal is rotated 90 degrees to the right, the left side of the screen is north, and the displayed map is rotated 90 degrees to the left. At this time, the north direction of the map displayed in the mobile terminal is toward the left of the screen, as shown in FIG. Ensure that the northern orientation referred to in the map is consistent with the northern orientation of the physical world.
  • the north direction in the map displayed by the mobile terminal can be aligned with the north direction of the physical world, but the positional relationship between the two mobile terminals cannot be displayed on the mobile terminal.
  • Embodiments of the present invention provide a terminal positioning method and a terminal with an electronic compass capable of displaying another terminal on an electronic compass displayed on one terminal.
  • a terminal positioning method includes:
  • the first terminal controls the electronic compass to point the pointer in the electronic compass to the horizontal plane Orientation
  • the first terminal displays the second terminal in a direction in which the direction of the pointer is clockwise offset from the azimuth on the electronic compass.
  • a terminal with an electronic compass comprising:
  • control module configured to control the electronic compass, to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane
  • An azimuth acquisition module for obtaining an azimuth of a line connecting the terminal with the electronic compass to another terminal direction
  • a processing module configured to display the other terminal in a direction in which the direction indicated by the pointer is clockwise offset from the azimuth angle on the electronic compass.
  • the first terminal in the embodiment of the present invention controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to the horizontal plane, and then displays the second terminal in a direction clockwise offset from the azimuth in the direction indicated by the pointer.
  • the azimuth angle of the connection between the first terminal and the second terminal direction so that the directional relationship between the second terminal and the first terminal can be displayed on the electronic compass of the first terminal, for example, the second terminal is at the first Front or rear of the terminal.
  • 1 is a map display manner of a mobile terminal provided by the prior art
  • FIG. 3 is a flowchart of a terminal positioning method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a physical world with three terminals according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of an electronic compass display based on the physical world shown in FIG. 5 according to an embodiment of the present invention
  • FIG. Another schematic diagram of a physical world with three mobile terminals
  • FIG. 8 is a schematic diagram of an electronic compass display based on the physical world shown in FIG. 7 according to an embodiment of the present invention
  • FIG. 9 is a structural diagram of a terminal with an electronic compass according to an embodiment of the present invention.
  • An embodiment of the present invention provides a terminal positioning method and a terminal with an electronic compass, which can display another terminal on an electronic compass on a screen of one terminal, indicating a direction relationship between the other terminal and the terminal, and further, It can indicate the distance from another terminal to the terminal, and enable one terminal to track the other terminal in real time when the positions of the two terminals change.
  • an embodiment of the present invention provides a terminal positioning method, including:
  • the first terminal controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane.
  • the pointer in this step may be a north arrow or a compass; if it is a north needle, the corresponding predetermined direction is the north direction of the magnetic field; if it is a compass, the corresponding predetermined direction is the south direction of the magnetic field.
  • the control of the electronic compass in this step includes, but is not limited to, the following two methods:
  • the first mode is: Controlling the rotation of the entire electronic compass so that when the rotated electronic compass is mapped to the horizontal plane, the pointer points to a predetermined direction.
  • the second way is: Control the rotation of the pointer in the electronic compass so that the rotated pointer points to the predetermined direction when it maps to the horizontal plane.
  • the first method can be applied to an electronic compass with indication of scale and direction information, or to an electronic compass without indication of scale and direction information; the second method is only applicable to an electronic compass without indication of scale and direction information.
  • the scale is 10, 20, 30;350 as shown in FIG. 6, and the direction information indicates ne, se, sw, nw as shown in FIG. 6, where n represents north and s represents south. w means west and e means east.
  • the first terminal acquires an azimuth of a connection between the first terminal and the second terminal.
  • the azimuth of the line connecting the first terminal to the second terminal direction is the magnetic azimuth angle of the connection, specifically, starting from the first standard direction of the starting point of the connection, clockwise a horizontal angle between the direction and the connecting line, wherein the starting point of the connecting line is the first terminal, and the first standard direction is the predetermined direction, that is, the magnetic field south direction or the magnetic field north direction.
  • the magnetic azimuth of the connection from the first terminal to the second terminal direction is the connection of the first terminal to the second terminal direction Coordinate azimuth + magnetic declination of the position of the first terminal, wherein the coordinate azimuth of the connection from the first terminal to the second terminal direction starts from the second standard direction of the starting point of the connection, and proceeds clockwise The horizontal angle between the lines, wherein the coordinate azimuth is located in the coordinate system with the equator as the X-axis and the 0-degree warp as the y-axis.
  • the y-axis is pointing in the north latitude direction
  • the X-axis is pointing in the east direction.
  • the second standard direction is the positive direction of the y-axis. If the pointer in step 301 is a compass and the corresponding predetermined direction is the south direction of the magnetic field, then The second standard direction is the y- axis negative direction.
  • the magnetic declination refers to the angle between the north and the true north when the north needle is stationary. Among them, the magnetic deviation angle is positive in the north direction and the magnetic declination is negative in the west direction.
  • the azimuth of the line connecting the first terminal to the second terminal direction is a coordinate azimuth of the connection, wherein the definition of the coordinate azimuth is the same as that in the foregoing embodiment, and is not Let me repeat. That is to say, in this other embodiment, the magnetic declination is ignored because the magnetic declination in China is up to 6 degrees, and generally 2-3 degrees, and the magnetic declination is generally negligible.
  • the first terminal calculates the azimuth (ie, the magnetic azimuth or the coordinate azimuth) by itself, and the first terminal needs to acquire the location information of the second terminal, and then according to the location information of the first terminal.
  • the location information of the second terminal determines the connection between the first terminal and the second terminal, and then determines the azimuth of the connection.
  • the first terminal can receive the azimuth (i.e., magnetic azimuth or coordinate azimuth) from the control center server, i.e., the process of calculating the azimuth by the control center server.
  • the control center server can calculate the coordinate azimuth and send it to the first terminal, which adds the coordinate azimuth to the magnetic declination to obtain a magnetic azimuth.
  • the first terminal displays the second terminal on the electronic compass in a direction in which the direction of the pointer is clockwise offset from the azimuth.
  • Displaying the second terminal in a direction in which the direction of the pointer is clockwise offset from the azimuth indicates a directional relationship between the second terminal and the first terminal, that is, the second terminal is at the first terminal. Which direction, such as front or rear.
  • the step may specifically be as follows:
  • the first terminal is on the electronic compass, clockwise in the direction indicated by the pointer Displaying the second terminal at a position offset from the origin by a certain distance in the direction of the azimuth (ie, magnetic azimuth or coordinate azimuth), the origin being the first terminal at the electronic compass
  • the mapping point in the specific point may be the center of the electronic compass, and the specific distance is the distance on the electronic compass corresponding to the physical distance of the first terminal to the second terminal.
  • the first terminal may display the direction of the azimuth offset clockwise in the north direction of the north arrow on the rotated electronic compass.
  • the second terminal If the distance between the second terminal and the first terminal is indicated on the electronic compass, the distance between the two terminals is indicated, and the first terminal is clockwise shifted in the north direction of the north arrow on the rotated electronic compass.
  • the second terminal is displayed at a position that is a certain distance from the origin in the direction of the azimuth.
  • the definition of the origin and the specific distance is the same as the above, and details are not described herein again.
  • the distance on the electronic compass corresponding to the physical distance of the first terminal to the second terminal may be calculated by the first terminal itself, in order to calculate the physical compass corresponding to the physical distance of the first terminal to the second terminal.
  • the distance before the step, further includes: receiving, by the first terminal, location information of the second terminal, and calculating a physical distance from the first terminal to the second terminal according to the location information of the first terminal and the location information of the second terminal, determining The distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal.
  • the location information of the first terminal may be a Global Positioning System (GPS) coordinate of the first terminal
  • the location information of the second terminal may be a GPS coordinate of the second terminal.
  • the first terminal receives the first The location information of the second terminal may be obtained by directly receiving the location information of the second terminal from the second terminal, or receiving the location information of the second terminal from the control center server, that is, receiving the location information of the second terminal sent by the control center server.
  • the distance on the electronic compass corresponding to the physical distance of the first terminal to the second terminal is sent by the control center server to the first terminal, that is, the foregoing calculation is performed by the control center server. the process of.
  • the control center server sends the physical distance of the first terminal to the second terminal to the first terminal, where the first terminal determines the distance on the electronic compass corresponding to the physical distance, such that , can reduce the workload of the terminal.
  • the first terminal and/or the second terminal in the embodiment of the present invention are mobile terminals.
  • the first terminal in the embodiment of the present invention controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to the horizontal plane, and then displays the direction in the direction indicated by the pointer on the electronic compass clockwise offset by a certain azimuth.
  • a second terminal the azimuth is a magnetic azimuth or azimuth of a line connecting the first terminal to the second terminal, so that the second terminal and the second terminal can be displayed on the electronic compass of the first terminal.
  • the directional relationship of a terminal that is, whether the second terminal is in front of or behind the first terminal.
  • the distance between the second terminal and the first terminal may be indicated on the electronic compass while indicating the distance between the two terminals, so that the first terminal can perform real-time on the second terminal even if the positions of the two terminals change. 3 tracks.
  • another embodiment of the present invention provides a terminal positioning method, including:
  • the first terminal acquires location information of the second terminal from the control center server.
  • the location information of the second terminal may be the GPS coordinates of the second terminal, and the GPS coordinates include two parameters of longitude and latitude.
  • the second terminal Before this step, the second terminal needs to upload the GPS coordinates of the second terminal to the control center server. Because the terminal is in a certain area, it collects satellite positioning data, obtains the GPS coordinates of the terminal, and then uploads the GPS coordinates to the control center server. Specifically, it can pass the General Packet Radio Service (GPRS) technology. Or WIFI or a dedicated communication network uploads the GPS coordinates of the terminal to the control center server.
  • GPRS General Packet Radio Service
  • WIFI Wireless Fidelity
  • the control center server sends the GPS coordinates of each terminal in the group in which the first terminal is located to the first terminal, where the group in which the first terminal is located includes all terminals belonging to the same team as the first terminal, The second terminal and the first terminal belong to the same group, so the GPS coordinates delivered by the control center server include the GPS coordinates of the second terminal.
  • the first terminal may request the control center server for the GPS coordinates of the second terminal. Specifically, the first terminal may send the phone number of the second terminal or the ID number of the second terminal to the control center server. The control center server transmits the GPS coordinates of the second terminal to the first terminal, so that the information storage amount of the first terminal can be reduced.
  • the first terminal obtains an angle at which the electronic compass should rotate, that is, a heading angle of the first terminal.
  • the first terminal includes a three-axis sensor, and the three axial directions of the three-axis sensor are an X-axis, a y-axis, and a z-axis, wherein the X-axis is perpendicular to the y-axis, and the plane and the terminal formed by the X-axis and the y-axis
  • the screens are parallel, the direction of the X-axis is from the bottom of the terminal to the top of the terminal, and the direction of the y-axis is from the left end of the terminal to the right end of the terminal, and the z-axis is perpendicular to the screen of the terminal.
  • the measured data output by the three-axis sensor are X M , Y M and Z M , respectively, and then substituted into the following formula to find ⁇ ⁇ and H x :
  • H Y Y M cos( ⁇ )+X M sin( ⁇ )sin(0)-Z M cos(0)sin( ⁇ )
  • the first terminal rotates the electronic compass to the above angle, so that the north compass points to the north magnetic field when the rotated electronic compass is mapped to the horizontal plane.
  • the first terminal calculates a magnetic azimuth of the connection of the direction of the first terminal to the second terminal according to the location information of the first terminal and the location information of the second terminal.
  • the abscissa and the ordinate Yi of the first terminal in the coordinate system are obtained according to the location information of the first terminal; and the abscissa X 2 and the vertical direction of the second terminal in the coordinate system are obtained according to the location information of the second terminal.
  • Coordinate Y 2 where, the coordinate system takes the equator as the X-axis, the 0-degree warp as the ⁇ axis, and the intersection of the equator and the 0-degree warp as the origin of the coordinate system; then the abscissa and the ordinate according to the first terminal in the coordinate system And an abscissa and an ordinate of the second terminal in the coordinate system, and calculating a rotation angle of the connection line of the first terminal to the second terminal direction in a clockwise direction with respect to a standard direction of the first terminal, wherein the embodiment The standard direction of the first terminal is parallel to the forward direction of the x-axis, and the rotation angle is the coordinate azimuth of the line connecting the first terminal to the second terminal.
  • the coordinate azimuth can be calculated by the following formula:
  • ⁇ ;
  • the minus sign is taken. If the first terminal and the second terminal are in different quadrants, the plus sign is taken;
  • is the coordinate azimuth of the line connecting the first terminal to the second terminal direction.
  • the first terminal then adds the coordinate azimuth to the local magnetic declination to obtain a magnetic azimuth.
  • the first terminal displays a second terminal in a direction clockwise offset from the north azimuth direction of the north arrow direction, and a distance from the origin to the distance determined by step 405, where the origin is an electronic compass. center.
  • the position of the first terminal is indicated by the center of the electronic compass, and the position of the distance determined by the step 405 is represented by the direction in which the magnetic azimuth angle is clockwise offset from the north direction of the north arrow.
  • the location of the second terminal so that the direction of the second terminal relative to the first terminal and the distance of the second terminal relative to the first terminal can be indicated.
  • the first terminal rotates the electronic compass, so that the north compass is pointed to the north magnetic field when the rotated electronic compass is mapped to the horizontal plane, and then clockwise on the rotating electronic compass in the north direction of the north compass.
  • the second terminal is displayed at a distance from the center of the electronic compass to the distance determined by step 405, so that the electronic terminal can display the direction relationship and the distance between the second terminal and the first terminal, so that the first The user of the terminal can know the location of the user of the second terminal relative to himself, in front of or behind himself, and how far away he is.
  • the first terminal can track the other terminal in real time. Further, the first terminal acquires the location information of the second terminal by using the control center server, and does not require the first terminal to directly communicate with the second terminal, so that no matter how far the second terminal is from the first terminal, the second terminal and the second terminal Whether a terminal joins the same network can display the location of the second terminal on the electronic compass of the first terminal.
  • the first terminal acquires the location information of the second terminal from the control center server.
  • the first terminal may directly acquire the terminal from other terminals of the group.
  • the location information for example, the second terminal and the third terminal belong to the same group as the first terminal, and the second terminal and the third terminal periodically send their own location information to the first terminal.
  • FIG. 5 Three terminals are illustrated in FIG. 5, the pointer in the upper left corner of the figure indicates the magnetic north direction, and the magnetic north direction is at an angle of 45 degrees to the heading of the first terminal (shown by reference numeral 1 in FIG. 5), that is, the heading of the first terminal.
  • the angle is 45 degrees
  • the schematic diagram of the electronic compass on the screen of the first terminal is as shown in FIG. 6, and the electronic compass is rotated by 45 degrees, so that the rotated electronic compass is in the north direction of the horizontal plane and is the same as the north direction of the magnetic field
  • the second terminal 5 and 6 are shown by reference numeral 2 and the third terminal (shown by reference numeral 3 in FIGS. 5 and 6) is displayed below the center of the electronic compass, indicating that the second terminal and the third terminal are located at the first terminal.
  • Behind the reason for the electronic north direction, the magnetic north direction is at an angle of 45 degrees to the heading of the first terminal (shown by reference numeral 1 in FIG. 5), that is
  • FIG. 7 Three terminals are illustrated in Fig. 7, the pointer in the upper left corner of the figure indicates the magnetic north direction, and the orientation of the user holding the first terminal (shown by reference numeral 5 in Fig. 7) is opposite to that in Fig. 5, in the figure, magnetic north
  • the angle between the direction and the heading of the first terminal (shown by reference numeral 5 in Fig. 7) is 135 degrees, that is, the heading angle of the first terminal is 135 degrees.
  • the schematic diagram of the electronic compass on the screen of the first terminal is as shown in FIG. 8. The electronic compass is rotated by 135 degrees, so that the rotated electronic compass is in the north direction of the horizontal plane and is the same as the north direction of the magnetic field, and the second terminal (in FIGS.
  • an embodiment of the present invention provides a terminal with an electronic compass, including:
  • the control module 10 is configured to control the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane;
  • the azimuth acquisition module 20 is configured to acquire an azimuth of a line connecting the terminal with the electronic compass to another terminal direction;
  • the processing module 30 is configured to display the other terminal in a direction in which the pointer is offset from the direction indicated by the pointer on the electronic compass.
  • the control module 10 is specifically configured to control the rotation of the electronic compass with the pointer, so that when the rotated electronic compass is mapped to a horizontal plane, the pointer points to a predetermined direction, wherein, for the definition of the pointer and the predetermined direction, see Corresponding descriptions of method embodiments are not described herein.
  • the processing module 30 specifically includes: a distance obtaining module 31, configured to acquire a specific distance, where the specific distance is a terminal with an electronic compass to another terminal, and the distance between the terminal and the terminal with the electronic compass is displayed. a distance on the electronic compass corresponding to the physical distance of the terminal; a display module 32, configured to, on the electronic compass, a certain distance from the origin in a direction of clockwise offset from the direction of the pointer The other terminal is displayed at a position, and the origin is a mapping point of the terminal with the electronic compass in the electronic compass.
  • the distance obtaining module 31 is specifically configured to determine, according to location information of the terminal with the electronic compass and location information of the other terminal, a physical distance between the terminal with the electronic compass and another terminal. Further, the distance on the electronic compass corresponding to the physical distance is determined. In this manner, the location information of the other terminal needs to be obtained. In another embodiment, the distance acquisition module 31 acquires the particular distance from the control center server.
  • the terminal with the electronic compass further includes: a communication interface 40, configured to receive location information of another terminal; in this embodiment, the azimuth is a magnetic orientation. Angle or coordinate azimuth, the azimuth acquisition module 20 is specifically configured to determine the terminal with the electronic compass to another terminal according to the location information of the terminal with the electronic compass and the location information of the other terminal received by the communication interface
  • the azimuth is a magnetic azimuth angle
  • the communication interface 40 acquires a coordinate azimuth of the connection from the terminal of the electronic compass to the direction of the other terminal from the control center server; the azimuth acquisition module 20 calculates the coordinate azimuth and The sum of the magnetic declinations of the positions of the terminals of the electronic compass obtains the magnetic azimuth.
  • the communication interface 40 is specifically configured to receive location information of another terminal sent by the control center server.
  • the terminal with the electronic compass is not required to directly communicate with the other terminal, so that no matter how far the two terminals are, whether the two terminals join the same network can display another terminal on the electronic compass. s position.
  • the terminal with an electronic compass in the embodiment of the present invention controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to the horizontal plane, and then shifts clockwise by a certain azimuth angle in the direction indicated by the pointer on the electronic compass.
  • the other terminal is displayed in the direction, which is the magnetic azimuth or coordinate azimuth of the line connecting the terminal with the electronic compass to the other terminal direction, so that the electronic compass can display the same
  • the directional relationship between the two terminals that is, whether the other terminal is in front of or behind the terminal with the electronic compass.
  • the distance relationship between the two terminals can be expressed on the electronic compass while indicating the distance between the two terminals, so that the terminal with the electronic compass can perform real-time operation on the other terminal even if the positions of the two terminals change. track.

Landscapes

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

Abstract

A terminal positioning method, including: a first terminal (1) controlling an electronic compass so that the needle in the electronic compass points to a predetermined direction when being mapped to a horizontal plane (301); the first terminal (1) acquiring an azimuth of a line from the first terminal (1) to a second terminal (2) (302); and the first terminal (1) displaying the second terminal (2) at an azimuth deviating clockwise from the direction in which the needle points on the electronic compass (303). A terminal with an electronic compass, including: a control module (10), an azimuth acquisition module (20) and a processing module (30). The terminal positioning method can display another terminal on the compass displayed on one terminal.

Description

终端定位方法及带有电子罗盘的终端 技术领域  Terminal positioning method and terminal with electronic compass
本发明涉及通信技术领域,特别涉及一种终端定位方法及带有电子罗盘的 终端。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a terminal positioning method and a terminal with an electronic compass. Background technique
电子罗盘是一种重要的导航工具, 能实时提供移动物体的航向。 随着半导 体工艺的进步和移动终端操作系统的发展, 出现了集成电子罗盘的移动终端。  The electronic compass is an important navigation tool that provides the heading of moving objects in real time. With the advancement of semiconductor technology and the development of mobile terminal operating systems, mobile terminals with integrated electronic compasses have emerged.
现有技术提供了一种能够定向的显示地图的方法,其可以使移动终端上显 示的地图北方的朝向与实体世界的北方朝向相同,具体实现方式如下: 移动终 端中的处理器确定根据连续的全球定位系统( Global Positioning System, GPS ) 位置点是否可以确定地图的朝向, 如果不能, 则读取电子罗盘的磁场方向, 根 据电子罗盘的磁场方向计算地图的朝向。在确定地图的朝向之后,对地图进行 定向并显示。 如图 1和图 2所示, 移动终端的上方为北方, 所以移动终端中所 显示的地图的北方方向朝向屏幕的上方, 如图 1 所示。 当移动终端向右旋转 90度时, 屏幕的左方是北方, 所显示的地图向左旋转 90度, 此时移动终端中 所显示的地图的北方方向朝向屏幕的左方,如图 2所示,保证地图中所指的北 方朝向与实体世界的北方朝向保持一致。  The prior art provides a method for displaying a map that can be oriented, which can make the orientation of the north of the map displayed on the mobile terminal the same as the north orientation of the physical world. The specific implementation is as follows: The processor in the mobile terminal determines according to the continuous Whether the Global Positioning System (GPS) position point can determine the orientation of the map. If not, read the direction of the magnetic field of the electronic compass and calculate the orientation of the map based on the direction of the magnetic field of the electronic compass. After determining the orientation of the map, the map is oriented and displayed. As shown in Fig. 1 and Fig. 2, the top of the mobile terminal is north, so the north direction of the map displayed in the mobile terminal is toward the top of the screen, as shown in Fig. 1. When the mobile terminal is rotated 90 degrees to the right, the left side of the screen is north, and the displayed map is rotated 90 degrees to the left. At this time, the north direction of the map displayed in the mobile terminal is toward the left of the screen, as shown in FIG. Ensure that the northern orientation referred to in the map is consistent with the northern orientation of the physical world.
现有技术具有如下缺点:  The prior art has the following disadvantages:
现有技术中,能够使该移动终端所显示的地图中的北向与实体世界的北方 朝向保持一致, 但是在该移动终端上无法显示这两个移动终端间的位置关系。 发明内容  In the prior art, the north direction in the map displayed by the mobile terminal can be aligned with the north direction of the physical world, but the positional relationship between the two mobile terminals cannot be displayed on the mobile terminal. Summary of the invention
本发明实施例提供一种终端定位方法及带有电子罗盘的终端,其能够在一 个终端所显示的电子罗盘上显示另一终端。  Embodiments of the present invention provide a terminal positioning method and a terminal with an electronic compass capable of displaying another terminal on an electronic compass displayed on one terminal.
有鉴于此, 本发明实施例提供:  In view of this, the embodiments of the present invention provide:
一种终端定位方法, 包括:  A terminal positioning method includes:
第一终端控制电子罗盘,使所述电子罗盘中的指针映射到水平面时指向预 定方向; The first terminal controls the electronic compass to point the pointer in the electronic compass to the horizontal plane Orientation
第一终端获取第一终端至第二终端方向的连线的方位角;  Obtaining, by the first terminal, an azimuth of the connection of the first terminal to the second terminal direction;
第一终端在所述电子罗盘上所述指针所指方向起顺时针偏移所述方位角 的方向上显示所述第二终端。  The first terminal displays the second terminal in a direction in which the direction of the pointer is clockwise offset from the azimuth on the electronic compass.
一种带有电子罗盘的终端, 包括:  A terminal with an electronic compass, comprising:
控制模块, 用于控制电子罗盘,使所述电子罗盘中的指针映射到水平面时 指向预定方向;  a control module, configured to control the electronic compass, to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane;
方位角获取模块,用于获取带有电子罗盘的终端至另一终端方向的连线的 方位角;  An azimuth acquisition module for obtaining an azimuth of a line connecting the terminal with the electronic compass to another terminal direction;
处理模块,用于在所述电子罗盘上所述指针所指方向起顺时针偏移所述方 位角的方向上显示所述另一终端。  And a processing module, configured to display the other terminal in a direction in which the direction indicated by the pointer is clockwise offset from the azimuth angle on the electronic compass.
本发明实施例中的第一终端控制电子罗盘,使电子罗盘中的指针映射到水 平面时指向预定方向,然后在该指针所指方向起顺时针偏移某个方位角的方向 上显示第二终端, 该方位角为第一终端至第二终端方向的连线的方位角, 以便 使第一终端的电子罗盘上能够显示第二终端与第一终端的方向关系,比如第二 终端是在第一终端的前方还是后方等。 附图说明  The first terminal in the embodiment of the present invention controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to the horizontal plane, and then displays the second terminal in a direction clockwise offset from the azimuth in the direction indicated by the pointer. The azimuth angle of the connection between the first terminal and the second terminal direction, so that the directional relationship between the second terminal and the first terminal can be displayed on the electronic compass of the first terminal, for example, the second terminal is at the first Front or rear of the terminal. DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使 用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅是本发明的一些 实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可 以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图 1是现有技术提供的一种移动终端的地图显示方式;  1 is a map display manner of a mobile terminal provided by the prior art;
图 2是现有技术提供的另一种移动终端的地图显示方式;  2 is a map display manner of another mobile terminal provided by the prior art;
图 3是本发明实施例提供的一种终端定位方法流程图;  3 is a flowchart of a terminal positioning method according to an embodiment of the present invention;
图 4是本发明实施例提供的另一种终端定位方法流程图;  4 is a flowchart of another terminal positioning method according to an embodiment of the present invention;
图 5是本发明实施例提供的一种带有 3个终端的实体世界示意图; 图 6是本发明实施例提供的基于图 5所示实体世界的电子罗盘显示示意图; 图 7是本发明实施例提供的另一种带有 3个移动终端的实体世界示意图; 图 8是本发明实施例提供的基于图 7所示实体世界的电子罗盘显示示意图; 图 9是本发明实施例提供的带有电子罗盘的终端的结构图。 具体实施方式 FIG. 5 is a schematic diagram of a physical world with three terminals according to an embodiment of the present invention; FIG. 6 is a schematic diagram of an electronic compass display based on the physical world shown in FIG. 5 according to an embodiment of the present invention; FIG. Another schematic diagram of a physical world with three mobile terminals; FIG. 8 is a schematic diagram of an electronic compass display based on the physical world shown in FIG. 7 according to an embodiment of the present invention; FIG. 9 is a structural diagram of a terminal with an electronic compass according to an embodiment of the present invention. detailed description
本发明实施例提供一种终端定位方法和带有电子罗盘的终端,其能够在一 个终端的屏幕上的电子罗盘上显示另一终端,表明另一终端与该终端的方向关 系, 进一步的, 还能够表明另一终端到该终端的距离, 能够在这两个终端的位 置发生变化时,使一个终端能够对另一终端进行实时跟踪。如下各实施例将对 本发明实施例提供的上述技术方案进行详细介绍。  An embodiment of the present invention provides a terminal positioning method and a terminal with an electronic compass, which can display another terminal on an electronic compass on a screen of one terminal, indicating a direction relationship between the other terminal and the terminal, and further, It can indicate the distance from another terminal to the terminal, and enable one terminal to track the other terminal in real time when the positions of the two terminals change. The above technical solutions provided by the embodiments of the present invention are described in detail in the following embodiments.
参阅图 3 , 本发明一实施例提供一种终端定位方法, 其包括:  Referring to FIG. 3, an embodiment of the present invention provides a terminal positioning method, including:
301、 第一终端控制电子罗盘, 使所述电子罗盘中的指针映射到水平面时 指向预定方向。  301. The first terminal controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane.
其中, 该步骤中的指针可以是指北针, 也可以是指南针; 如果是指北针, 则相应的预定方向是磁场北方向; 如果是指南针, 则相应的预定方向是磁场南 方向。  The pointer in this step may be a north arrow or a compass; if it is a north needle, the corresponding predetermined direction is the north direction of the magnetic field; if it is a compass, the corresponding predetermined direction is the south direction of the magnetic field.
该步骤中控制电子罗盘包括但不限于如下两种方式: 第一种方式为: 控制 整个电子罗盘旋转,使旋转后的电子罗盘映射到水平面时, 所述指针指向预定 方向。 第二种方式为: 控制电子罗盘中的指针旋转, 使旋转后的该指针映射到 水平面时指向预定方向。其中, 第一种方式可以适用于有刻度和方向信息指示 的电子罗盘,也可以适用于没有刻度和方向信息指示的电子罗盘; 第二种方式 仅仅适用于没有刻度和方向信息指示的电子罗盘。其中, 刻度如图 6所示的 10、 20、 30.....350等角度, 方向信息指示如图 6所示的 ne, se, sw, nw, 其中, n 表示北, s表示南, w表示西, e表示东。  The control of the electronic compass in this step includes, but is not limited to, the following two methods: The first mode is: Controlling the rotation of the entire electronic compass so that when the rotated electronic compass is mapped to the horizontal plane, the pointer points to a predetermined direction. The second way is: Control the rotation of the pointer in the electronic compass so that the rotated pointer points to the predetermined direction when it maps to the horizontal plane. Among them, the first method can be applied to an electronic compass with indication of scale and direction information, or to an electronic compass without indication of scale and direction information; the second method is only applicable to an electronic compass without indication of scale and direction information. Wherein, the scale is 10, 20, 30.....350 as shown in FIG. 6, and the direction information indicates ne, se, sw, nw as shown in FIG. 6, where n represents north and s represents south. w means west and e means east.
302、 第一终端获取第一终端至第二终端方向的连线的方位角。  302. The first terminal acquires an azimuth of a connection between the first terminal and the second terminal.
其中,在一种实施方式中, 第一终端至第二终端方向的连线的方位角是该 连线的磁方位角, 具体是从所述连线的起点的第一标准方向开始,依顺时针方 向到所述连线之间的水平夹角, 其中, 所述连线的起点为第一终端, 所述第一 标准方向为所述预定方向, 即可以为磁场南方向或者磁场北方向。 具体的, 第 一终端至第二终端方向的连线的磁方位角 =第一终端至第二终端方向的连线的 坐标方位角 +第一终端所在位置的磁偏角, 其中, 第一终端至第二终端方向的 连线的坐标方位角是从该连线的起点的第二标准方向开始,依顺时针方向到所 述连线之间的水平夹角, 其中, 该坐标方位角所在的坐标系是以赤道为 X轴, 0 度经线为 y轴。 其中, y轴正向指向北纬方向, X轴正向指向东经方向。 如果步 骤 301中的指针是指北针,相应的预定方向是磁场北方向, 则第二标准方向为 y 轴正向, 如果步骤 301中的指针是指南针, 相应的预定方向是磁场南方向, 则 第二标准方向为 y轴负向。 其中, 磁偏角是指北针静止时, 所指的北方与真正 北方的夹角, 其中, 所指的北方向东偏则磁偏角为正, 向西偏则磁偏角为负。 Wherein, in an embodiment, the azimuth of the line connecting the first terminal to the second terminal direction is the magnetic azimuth angle of the connection, specifically, starting from the first standard direction of the starting point of the connection, clockwise a horizontal angle between the direction and the connecting line, wherein the starting point of the connecting line is the first terminal, and the first standard direction is the predetermined direction, that is, the magnetic field south direction or the magnetic field north direction. Specifically, the magnetic azimuth of the connection from the first terminal to the second terminal direction is the connection of the first terminal to the second terminal direction Coordinate azimuth + magnetic declination of the position of the first terminal, wherein the coordinate azimuth of the connection from the first terminal to the second terminal direction starts from the second standard direction of the starting point of the connection, and proceeds clockwise The horizontal angle between the lines, wherein the coordinate azimuth is located in the coordinate system with the equator as the X-axis and the 0-degree warp as the y-axis. Among them, the y-axis is pointing in the north latitude direction, and the X-axis is pointing in the east direction. If the pointer in step 301 is a north arrow, and the corresponding predetermined direction is the north direction of the magnetic field, the second standard direction is the positive direction of the y-axis. If the pointer in step 301 is a compass and the corresponding predetermined direction is the south direction of the magnetic field, then The second standard direction is the y- axis negative direction. Among them, the magnetic declination refers to the angle between the north and the true north when the north needle is stationary. Among them, the magnetic deviation angle is positive in the north direction and the magnetic declination is negative in the west direction.
在另一种实施方式中,第一终端至第二终端方向的连线的方位角是该连线 的坐标方位角, 其中, 该坐标方位角的定义与上述实施方式中的相同, 在此不 再赘述。 也就是说, 在该另一种实施方式中, 忽略磁偏角, 因为我国境内磁偏 角最大可达 6度, 一般情况为 2-3度, 总体来说磁偏角可以忽略不计。  In another embodiment, the azimuth of the line connecting the first terminal to the second terminal direction is a coordinate azimuth of the connection, wherein the definition of the coordinate azimuth is the same as that in the foregoing embodiment, and is not Let me repeat. That is to say, in this other embodiment, the magnetic declination is ignored because the magnetic declination in China is up to 6 degrees, and generally 2-3 degrees, and the magnetic declination is generally negligible.
其中, 在一种方式中, 第一终端自己计算该方位角 (即磁方位角或者坐标 方位角 ), 此时第一终端需要获取第二终端的位置信息, 然后根据第一终端的 位置信息和第二终端的位置信息,确定第一终端到第二终端方向的连线, 进而 确定该连线的方位角, 具体的计算方式参见后续实施例的详细介绍。 另一种方 式中, 第一终端可以从控制中心服务器接收该方位角(即磁方位角或者坐标方 位角), 即由控制中心服务器执行上述计算方位角的过程。 在又一种实施方式 中,控制中心服务器可以计算出坐标方位角并发送给第一终端, 该第一终端将 坐标方位角与磁偏角相加, 得到磁方位角。  In one mode, the first terminal calculates the azimuth (ie, the magnetic azimuth or the coordinate azimuth) by itself, and the first terminal needs to acquire the location information of the second terminal, and then according to the location information of the first terminal. The location information of the second terminal determines the connection between the first terminal and the second terminal, and then determines the azimuth of the connection. For the specific calculation manner, refer to the detailed description of the subsequent embodiments. Alternatively, the first terminal can receive the azimuth (i.e., magnetic azimuth or coordinate azimuth) from the control center server, i.e., the process of calculating the azimuth by the control center server. In yet another embodiment, the control center server can calculate the coordinate azimuth and send it to the first terminal, which adds the coordinate azimuth to the magnetic declination to obtain a magnetic azimuth.
303、 第一终端在所述电子罗盘上, 在所述指针所指方向起顺时针偏移所 述方位角的方向上显示所述第二终端。  303. The first terminal displays the second terminal on the electronic compass in a direction in which the direction of the pointer is clockwise offset from the azimuth.
其中,在所述指针所指方向起顺时针偏移所述方位角的方向上显示所述第 二终端就表示了该第二终端与第一终端的方向关系,即第二终端在第一终端的 哪个方向, 比如前方还是后方等。  Displaying the second terminal in a direction in which the direction of the pointer is clockwise offset from the azimuth indicates a directional relationship between the second terminal and the first terminal, that is, the second terminal is at the first terminal. Which direction, such as front or rear.
为了在电子罗盘上表示第二终端与第一终端的方向关系的同时表示两者 的距离, 该步骤具体可以采用如下方式: 第一终端在电子罗盘上, 在所述指针 所指方向起顺时针偏移所述方位角(即磁方位角或者坐标方位角)的方向上距 离原点特定距离的位置上显示所述第二终端,所述原点为第一终端在电子罗盘 中的映射点, 具体可以是所述电子罗盘的中心, 所述特定距离是第一终端到第 二终端的物理距离所对应的电子罗盘上的距离。 In order to indicate the distance between the second terminal and the first terminal on the electronic compass, the step may specifically be as follows: The first terminal is on the electronic compass, clockwise in the direction indicated by the pointer Displaying the second terminal at a position offset from the origin by a certain distance in the direction of the azimuth (ie, magnetic azimuth or coordinate azimuth), the origin being the first terminal at the electronic compass The mapping point in the specific point may be the center of the electronic compass, and the specific distance is the distance on the electronic compass corresponding to the physical distance of the first terminal to the second terminal.
具体的,如果步骤 301中的指针是指北针, 则第一终端可以在旋转后的电 子罗盘上,在指北针的指北方向起顺时针偏移所述方位角的方向上显示所述第 二终端。如果想在电子罗盘上表示第二终端与第一终端的方向关系的同时表示 两者的距离, 则第一终端在旋转后的电子罗盘上,在指北针的指北方向起顺时 针偏移所述方位角的方向上距离原点特定距离的位置上显示所述第二终端,其 中, 所述原点与所述特定距离的定义与上述相同, 在此不再赘述。  Specifically, if the pointer in step 301 is a north arrow, the first terminal may display the direction of the azimuth offset clockwise in the north direction of the north arrow on the rotated electronic compass. The second terminal. If the distance between the second terminal and the first terminal is indicated on the electronic compass, the distance between the two terminals is indicated, and the first terminal is clockwise shifted in the north direction of the north arrow on the rotated electronic compass. The second terminal is displayed at a position that is a certain distance from the origin in the direction of the azimuth. The definition of the origin and the specific distance is the same as the above, and details are not described herein again.
其中,上述第一终端到第二终端的物理距离所对应的电子罗盘上的距离可 以是第一终端自己计算的,为了计算该第一终端到第二终端的物理距离所对应 的电子罗盘上的距离, 在该步骤之前, 还包括: 第一终端接收第二终端的位置 信息, 并根据第一终端的位置信息和第二终端的位置信息,计算第一终端到第 二终端的物理距离,确定第一终端到第二终端的物理距离所对应的电子罗盘上 的距离, 具体的计算过程参见后续实施例的详细描述。 其中, 第一终端的位置 信息可以是第一终端的全球定位系统 (Global Positioning System, GPS)坐标, 第二终端的位置信息可以是第二终端的 GPS坐标, 该实施例中第一终端接收 第二终端的位置信息的方式可以是直接从第二终端接收第二终端的位置信息, 也可以是从控制中心服务器接收第二终端的位置信息,即接收控制中心服务器 发送的第二终端的位置信息。 可选的, 在另一种实施方式中, 上述第一终端到 第二终端的物理距离所对应的电子罗盘上的距离是控制中心服务器发送给第 一终端的, 即由控制中心服务器执行上述计算的过程。 可选的, 在又一种实施 方式中, 控制中心服务器将第一终端到第二终端的物理距离发送给第一终端, 由第一终端确定该物理距离所对应的电子罗盘上的距离, 这样, 可以减少终端 的工作量。  The distance on the electronic compass corresponding to the physical distance of the first terminal to the second terminal may be calculated by the first terminal itself, in order to calculate the physical compass corresponding to the physical distance of the first terminal to the second terminal. The distance, before the step, further includes: receiving, by the first terminal, location information of the second terminal, and calculating a physical distance from the first terminal to the second terminal according to the location information of the first terminal and the location information of the second terminal, determining The distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal. For the specific calculation process, refer to the detailed description of the subsequent embodiments. The location information of the first terminal may be a Global Positioning System (GPS) coordinate of the first terminal, and the location information of the second terminal may be a GPS coordinate of the second terminal. In this embodiment, the first terminal receives the first The location information of the second terminal may be obtained by directly receiving the location information of the second terminal from the second terminal, or receiving the location information of the second terminal from the control center server, that is, receiving the location information of the second terminal sent by the control center server. . Optionally, in another implementation manner, the distance on the electronic compass corresponding to the physical distance of the first terminal to the second terminal is sent by the control center server to the first terminal, that is, the foregoing calculation is performed by the control center server. the process of. Optionally, in another implementation manner, the control center server sends the physical distance of the first terminal to the second terminal to the first terminal, where the first terminal determines the distance on the electronic compass corresponding to the physical distance, such that , can reduce the workload of the terminal.
其中, 本发明实施例中的第一终端和 /或第二终端为可移动的终端。  The first terminal and/or the second terminal in the embodiment of the present invention are mobile terminals.
本发明实施例中的第一终端控制电子罗盘,使电子罗盘中的指针映射到水 平面时指向预定方向,然后在电子罗盘上该指针所指方向起顺时针偏移某个方 位角的方向上显示第二终端,该方位角为第一终端至第二终端方向的连线的磁 方位角或者坐标方位角,以便使第一终端的电子罗盘上能够显示第二终端与第 一终端的方向关系, 即第二终端是在第一终端的前方还是后方等。 进一步的, 可以在电子罗盘上表示第二终端与第一终端的方向关系的同时表示两者的距 离, 这样, 即使这两个终端的位置发生变化, 第一终端也能够对第二终端进行 实时 3艮踪。 The first terminal in the embodiment of the present invention controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to the horizontal plane, and then displays the direction in the direction indicated by the pointer on the electronic compass clockwise offset by a certain azimuth. a second terminal, the azimuth is a magnetic azimuth or azimuth of a line connecting the first terminal to the second terminal, so that the second terminal and the second terminal can be displayed on the electronic compass of the first terminal The directional relationship of a terminal, that is, whether the second terminal is in front of or behind the first terminal. Further, the distance between the second terminal and the first terminal may be indicated on the electronic compass while indicating the distance between the two terminals, so that the first terminal can perform real-time on the second terminal even if the positions of the two terminals change. 3 tracks.
参阅图 4, 本发明另一实施例提供一种终端定位方法, 其包括:  Referring to FIG. 4, another embodiment of the present invention provides a terminal positioning method, including:
401、 第一终端从控制中心服务器获取第二终端的位置信息。  401. The first terminal acquires location information of the second terminal from the control center server.
其中, 第二终端的位置信息可以为第二终端的 GPS坐标, GPS坐标包括 经度和纬度两个参数。  The location information of the second terminal may be the GPS coordinates of the second terminal, and the GPS coordinates include two parameters of longitude and latitude.
在该步骤之前, 第二终端需要将第二终端的 GPS坐标上传给控制中心服 务器。 因为终端在某一区域时, 会收集卫星定位数据, 得到该终端的 GPS坐 标, 然后将该 GPS坐标上传给控制中心服务器, 具体的, 可以通过通用分组 无线服务( General Packet Radio Service, GPRS )技术或者 WIFI或者专用通 信网络将该终端的 GPS坐标上传给控制中心服务器。  Before this step, the second terminal needs to upload the GPS coordinates of the second terminal to the control center server. Because the terminal is in a certain area, it collects satellite positioning data, obtains the GPS coordinates of the terminal, and then uploads the GPS coordinates to the control center server. Specifically, it can pass the General Packet Radio Service (GPRS) technology. Or WIFI or a dedicated communication network uploads the GPS coordinates of the terminal to the control center server.
在一种实施方式中,控制中心服务器将第一终端所在组中的各终端的 GPS 坐标下发给第一终端, 其中, 第一终端所在组包括与第一终端属于同一团队的 所有终端,第二终端和第一终端属于同一组,所以控制中心服务器下发的 GPS 坐标中包括第二终端的 GPS坐标。 在另一种实施方式中, 第一终端可以向控 制中心服务器请求第二终端的 GPS坐标, 具体的, 第一终端可以向控制中心 服务器发送第二终端的电话号码或者第二终端的 ID号, 控制中心服务器就将 第二终端的 GPS坐标发送给第一终端, 这样, 可以减少第一终端的信息存储 量。  In an embodiment, the control center server sends the GPS coordinates of each terminal in the group in which the first terminal is located to the first terminal, where the group in which the first terminal is located includes all terminals belonging to the same team as the first terminal, The second terminal and the first terminal belong to the same group, so the GPS coordinates delivered by the control center server include the GPS coordinates of the second terminal. In another embodiment, the first terminal may request the control center server for the GPS coordinates of the second terminal. Specifically, the first terminal may send the phone number of the second terminal or the ID number of the second terminal to the control center server. The control center server transmits the GPS coordinates of the second terminal to the first terminal, so that the information storage amount of the first terminal can be reduced.
402、 第一终端获得电子罗盘应旋转的角度, 即第一终端的航向角。  402. The first terminal obtains an angle at which the electronic compass should rotate, that is, a heading angle of the first terminal.
具体的, 第一终端中包括三轴传感器, 三轴传感器的三个轴向为 X轴、 y 轴和 z轴, 其中, X轴与 y轴垂直, 且 X轴与 y轴形成的平面与终端的屏幕平 行, X轴的方向从终端底部指向终端顶部, y轴的方向从终端左端指向终端右 端, z轴与终端的屏幕垂直。 终端在空中倾斜放置时, 三轴传感器输出的测量 数据分别为 XM、 YM和 ZM, 然后代入如下公式, 求出 Ηγ和 Hx: Specifically, the first terminal includes a three-axis sensor, and the three axial directions of the three-axis sensor are an X-axis, a y-axis, and a z-axis, wherein the X-axis is perpendicular to the y-axis, and the plane and the terminal formed by the X-axis and the y-axis The screens are parallel, the direction of the X-axis is from the bottom of the terminal to the top of the terminal, and the direction of the y-axis is from the left end of the terminal to the right end of the terminal, and the z-axis is perpendicular to the screen of the terminal. When the terminal is tilted in the air, the measured data output by the three-axis sensor are X M , Y M and Z M , respectively, and then substituted into the following formula to find Η γ and H x :
HY=YMcos( Θ )+XMsin( Θ )sin(0)-ZMcos(0)sin( θ )H Y =Y M cos( Θ )+X M sin( Θ )sin(0)-Z M cos(0)sin( θ )
Figure imgf000008_0001
ZMsin(O) 其中, Φ为 x轴与水平面的夹角, Θ为 y轴与水平面的夹角。 然后根据上述 Ηγ和 Ηχ, 获得第一终端的航向角。
Figure imgf000008_0001
Z M sin(O) Where Φ is the angle between the x-axis and the horizontal plane, and Θ is the angle between the y-axis and the horizontal plane. Then, according to the above Η γ and Η χ , the heading angle of the first terminal is obtained.
其中, 上述仅示意出一种计算第一终端航向角的方式, 也可以采用其他计 算第一终端航向角的方法, 不影响本发明的实现。  Wherein, the foregoing only illustrates a manner of calculating the heading angle of the first terminal, and other methods of calculating the heading angle of the first terminal may be employed, without affecting the implementation of the present invention.
403、 第一终端将电子罗盘旋转上述角度, 使旋转后的电子罗盘映射到水 平面时指北针指向磁场北。  403. The first terminal rotates the electronic compass to the above angle, so that the north compass points to the north magnetic field when the rotated electronic compass is mapped to the horizontal plane.
404、 第一终端根据第一终端的位置信息和第二终端的位置信息, 计算第 一终端至第二终端的方向的连线的磁方位角。  404. The first terminal calculates a magnetic azimuth of the connection of the direction of the first terminal to the second terminal according to the location information of the first terminal and the location information of the second terminal.
具体的, 根据第一终端的位置信息, 获得第一终端在坐标系中的横坐标 和纵坐标 Yi; 根据第二终端的位置信息, 获得第二终端在坐标系中的横坐 标 X2和纵坐标 Y2; 其中, 该坐标系以赤道为 X轴, 0度经线为 Υ轴, 赤道与 0度经线的交点为坐标系的原点; 然后根据第一终端在坐标系中的横坐标和纵 坐标、 以及第二终端在坐标系中的横坐标和纵坐标,计算第一终端至第二终端 方向的连线相对于第一终端的标准方向在顺时针方向上的旋转角度, 其中, 该 实施例中第一终端的标准方向与 Υ轴正向平行, 该旋转角度为第一终端至第 二终端方向的连线的坐标方位角,具体的,可以采用如下公式计算坐标方位角: | Χ1 | + | Χ2 | =Χ; Specifically, the abscissa and the ordinate Yi of the first terminal in the coordinate system are obtained according to the location information of the first terminal; and the abscissa X 2 and the vertical direction of the second terminal in the coordinate system are obtained according to the location information of the second terminal. Coordinate Y 2 ; where, the coordinate system takes the equator as the X-axis, the 0-degree warp as the Υ axis, and the intersection of the equator and the 0-degree warp as the origin of the coordinate system; then the abscissa and the ordinate according to the first terminal in the coordinate system And an abscissa and an ordinate of the second terminal in the coordinate system, and calculating a rotation angle of the connection line of the first terminal to the second terminal direction in a clockwise direction with respect to a standard direction of the first terminal, wherein the embodiment The standard direction of the first terminal is parallel to the forward direction of the x-axis, and the rotation angle is the coordinate azimuth of the line connecting the first terminal to the second terminal. Specifically, the coordinate azimuth can be calculated by the following formula: | Χ1 | | Χ2 | =Χ;
| Υ1 | + | Υ2 | =Υ; | Υ1 | + | Υ2 | =Υ;
其中, 如果第一终端和第二终端位于同一象限, 则取减号, 如果第一终端和第二 终端位于不同象限, 则取加号; If the first terminal and the second terminal are in the same quadrant, the minus sign is taken. If the first terminal and the second terminal are in different quadrants, the plus sign is taken;
当 Χ>0 Υ>0, α= 90-lartan(Y/X)l; When Χ>0 Υ>0, α= 90-lartan(Y/X)l;
当 X<0 Y>0, α= 360-lartan(Y/X)l; When X<0 Y>0, α= 360-lartan(Y/X)l;
当 Χ<0 Υ<0, α= 180+lartan(Y/X)l; When Χ<0 Υ<0, α= 180+lartan(Y/X)l;
当 Χ>0 Υ<0, α= 180-lartan(Y/X)l; When Χ>0 Υ<0, α= 180-lartan(Y/X)l;
其中, α为第一终端至第二终端方向的连线的坐标方位角。  Where α is the coordinate azimuth of the line connecting the first terminal to the second terminal direction.
然后第一终端将坐标方位角与本地的磁偏角相加, 得到磁方位角。  The first terminal then adds the coordinate azimuth to the local magnetic declination to obtain a magnetic azimuth.
405、 第一终端根据第一终端的位置信息和第二终端的位置信息, 计算第 一终端到第二终端的物理距离,并确定第一终端到第二终端的物理距离所对应 的电子罗盘上的距离。 具体的,依据实际的单位物理距离与屏幕上单位距离的比例关系,确定第 一终端到第二终端的物理距离对应的屏幕上的距离,如果屏幕上单位距离为像 素间距, 实际的单位物理距离与屏幕上单位距离的比值为 S, 则该步骤确定第 一终端到第二终端的物理距离对应的屏幕上的距离为 N个像素间距, 其中, N=L/S, L表示第一终端到第二终端的物理距离。 405. The first terminal calculates a physical distance from the first terminal to the second terminal according to the location information of the first terminal and the location information of the second terminal, and determines an electronic compass corresponding to the physical distance of the first terminal to the second terminal. the distance. Specifically, the distance on the screen corresponding to the physical distance of the first terminal to the second terminal is determined according to the actual ratio of the unit physical distance to the unit distance on the screen. If the unit distance on the screen is the pixel spacing, the actual unit physical distance The ratio of the unit distance to the screen is S, and the step determines that the distance on the screen corresponding to the physical distance of the first terminal to the second terminal is N pixel pitches, where N=L/S, L represents the first terminal to The physical distance of the second terminal.
406、第一终端在指北针的指北方向起顺时针偏移上述磁方位角的方向上, 距离原点为步骤 405所确定的距离的位置上显示第二终端, 其中,原点为电子 罗盘的中心。  406. The first terminal displays a second terminal in a direction clockwise offset from the north azimuth direction of the north arrow direction, and a distance from the origin to the distance determined by step 405, where the origin is an electronic compass. center.
该实施例是以电子罗盘的中心表示第一终端所在的位置,在指北针的指北 方向起顺时针偏移上述磁方位角的方向上,距离原点为步骤 405所确定的距离 的位置表示第二终端所在的位置, 这样, 就可以表示出第二终端相对于第一终 端的方向以及第二终端相对于第一终端的距离。  In this embodiment, the position of the first terminal is indicated by the center of the electronic compass, and the position of the distance determined by the step 405 is represented by the direction in which the magnetic azimuth angle is clockwise offset from the north direction of the north arrow. The location of the second terminal, so that the direction of the second terminal relative to the first terminal and the distance of the second terminal relative to the first terminal can be indicated.
本发明实施例中的第一终端将电子罗盘旋转,使旋转后的电子罗盘映射到 水平面时指北针指向磁场北, 然后在旋转后的电子罗盘上,在指北针指北方向 起顺时针偏移上述磁方位角的方向上,距离电子罗盘中心为步骤 405所确定的 距离的地方显示第二终端,使电子罗盘上能够显示第二终端与第一终端的方向 关系以及距离, 使第一终端的用户能够知道第二终端的用户相对于自己的位 置, 在自己的前方还是后方, 以及距离自己多远。 这样, 即使这两个终端的位 置发生变化, 第一终端能也能够对另一终端进行实时跟踪。 进一步的, 第一终 端通过控制中心服务器获取第二终端的位置信息,不需要第一终端与第二终端 直接通信, 这样无论第二终端与第一终端的距离有多远, 第二终端与第一终端 是否加入同一网络, 都能在第一终端的电子罗盘上显示第二终端的位置。  In the embodiment of the present invention, the first terminal rotates the electronic compass, so that the north compass is pointed to the north magnetic field when the rotated electronic compass is mapped to the horizontal plane, and then clockwise on the rotating electronic compass in the north direction of the north compass. In a direction offset from the magnetic azimuth angle, the second terminal is displayed at a distance from the center of the electronic compass to the distance determined by step 405, so that the electronic terminal can display the direction relationship and the distance between the second terminal and the first terminal, so that the first The user of the terminal can know the location of the user of the second terminal relative to himself, in front of or behind himself, and how far away he is. Thus, even if the positions of the two terminals change, the first terminal can track the other terminal in real time. Further, the first terminal acquires the location information of the second terminal by using the control center server, and does not require the first terminal to directly communicate with the second terminal, so that no matter how far the second terminal is from the first terminal, the second terminal and the second terminal Whether a terminal joins the same network can display the location of the second terminal on the electronic compass of the first terminal.
需要说明的是, 前述实施例描述中所采用的第一、 第二的说法, 没有限定 顺序的意思, 仅为方便区分而已。  It should be noted that the first and second statements used in the description of the foregoing embodiments are not intended to limit the order, and are merely for convenience of distinction.
需要说明的是,前述实施例仅以第一终端的电子罗盘上显示第二终端为例 进行描述, 本领域技术人员可以理解的是, 采用与上面类似的方式, 第一终端 的电子罗盘上还可以显示其他终端。  It should be noted that the foregoing embodiment is described by taking the second terminal on the electronic compass of the first terminal as an example. It can be understood by those skilled in the art that, in a manner similar to the above, the electronic compass of the first terminal is further Other terminals can be displayed.
需要说明的是,前述实施例中步骤 401中第一终端从控制中心服务器获取 第二终端的位置信息, 可选的, 第一终端可以直接从本组的其他终端获取终端 的位置信息, 比如第二终端和第三终端与第一终端属于同一组, 则第二终端和 第三终端周期性的将自己的位置信息上 给第一终端。 It should be noted that, in the foregoing step 401, the first terminal acquires the location information of the second terminal from the control center server. Optionally, the first terminal may directly acquire the terminal from other terminals of the group. The location information, for example, the second terminal and the third terminal belong to the same group as the first terminal, and the second terminal and the third terminal periodically send their own location information to the first terminal.
如下为了使本发明实施例提供的技术方案更加清楚明白, 举实例进行描 述:  In order to make the technical solutions provided by the embodiments of the present invention more clear, the following examples are described:
图 5中示意出三个终端, 图的左上角的指针指示磁北方向,磁北方向与第 一终端 (图 5中以标号 1示出) 的航向的夹角为 45度, 即第一终端的航向角 为 45度, 则该第一终端屏幕上的电子罗盘示意图如图 6所示, 电子罗盘旋转 了 45度, 使旋转后的电子罗盘在水平面的指北方向与磁场北向相同, 第二终 端 (图 5和图 6中以标号 2示出)和第三终端 (图 5和图 6中以标号 3示出) 显示在电子罗盘中心的下方, 表示第二终端和第三终端位于第一终端的后面。  Three terminals are illustrated in FIG. 5, the pointer in the upper left corner of the figure indicates the magnetic north direction, and the magnetic north direction is at an angle of 45 degrees to the heading of the first terminal (shown by reference numeral 1 in FIG. 5), that is, the heading of the first terminal. The angle is 45 degrees, the schematic diagram of the electronic compass on the screen of the first terminal is as shown in FIG. 6, and the electronic compass is rotated by 45 degrees, so that the rotated electronic compass is in the north direction of the horizontal plane and is the same as the north direction of the magnetic field, and the second terminal ( 5 and 6 are shown by reference numeral 2 and the third terminal (shown by reference numeral 3 in FIGS. 5 and 6) is displayed below the center of the electronic compass, indicating that the second terminal and the third terminal are located at the first terminal. Behind.
图 7中示意出三个终端, 图的左上角的指针指示磁北方向,持有第一终端 (图 7中以标号 5示出)的用户的朝向与图 5中的相反, 该图中, 磁北方向与 第一终端(图 7中以标号 5示出)的航向的夹角为 135度, 即第一终端的航向 角为 135度。该第一终端屏幕上的电子罗盘示意图如图 8所示, 电子罗盘旋转 了 135度,使旋转后的电子罗盘在水平面的指北方向与磁场北向相同, 第二终 端(图 7和图 8中以标号 6示出)和第三终端(图 7和图 8以标号 7示出)显 示在电子罗盘中心的上方, 表示第二终端和第三终端位于第一终端的前面。 参阅图 9, 本发明实施例提供一种带有电子罗盘的终端, 包括:  Three terminals are illustrated in Fig. 7, the pointer in the upper left corner of the figure indicates the magnetic north direction, and the orientation of the user holding the first terminal (shown by reference numeral 5 in Fig. 7) is opposite to that in Fig. 5, in the figure, magnetic north The angle between the direction and the heading of the first terminal (shown by reference numeral 5 in Fig. 7) is 135 degrees, that is, the heading angle of the first terminal is 135 degrees. The schematic diagram of the electronic compass on the screen of the first terminal is as shown in FIG. 8. The electronic compass is rotated by 135 degrees, so that the rotated electronic compass is in the north direction of the horizontal plane and is the same as the north direction of the magnetic field, and the second terminal (in FIGS. 7 and 8) Shown with reference numeral 6 and a third terminal (shown by reference numeral 7 in FIGS. 7 and 8) are displayed above the center of the electronic compass, indicating that the second terminal and the third terminal are located in front of the first terminal. Referring to FIG. 9, an embodiment of the present invention provides a terminal with an electronic compass, including:
控制模块 10, 用于控制电子罗盘,使所述电子罗盘中的指针映射到水平面 时指向预定方向;  The control module 10 is configured to control the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane;
方位角获取模块 20,用于获取带有电子罗盘的终端至另一终端方向的连线 的方位角;  The azimuth acquisition module 20 is configured to acquire an azimuth of a line connecting the terminal with the electronic compass to another terminal direction;
处理模块 30,用于在所述电子罗盘上所述指针所指方向起顺时针偏移所述 方位角的方向上显示所述另一终端。  The processing module 30 is configured to display the other terminal in a direction in which the pointer is offset from the direction indicated by the pointer on the electronic compass.
其中, 所述控制模块 10具体用于控制带有所述指针的电子罗盘旋转,使旋 转后的电子罗盘映射到水平面时, 所述指针指向预定方向, 其中, 对于指针和 预定方向的定义请参见方法实施例的相应描述, 在此不再赘述。  The control module 10 is specifically configured to control the rotation of the electronic compass with the pointer, so that when the rotated electronic compass is mapped to a horizontal plane, the pointer points to a predetermined direction, wherein, for the definition of the pointer and the predetermined direction, see Corresponding descriptions of method embodiments are not described herein.
其中,为了在电子罗盘上显示另一终端相对于带有电子罗盘的终端的方向 的同时, 显示该另一终端相对于该带有电子罗盘的终端的距离, 处理模块 30 具体包括: 距离获取模块 31 , 用于获取特定距离, 所述特定距离是带有电子罗 盘的终端到另一终端的物理距离所对应的电子罗盘上的距离; 显示模块 32, 用 于在所述电子罗盘上,在所述指针所指方向起顺时针偏移所述方位角的方向上 距离原点特定距离的位置上显示所述另一终端,所述原点为所述带有电子罗盘 的终端在电子罗盘中的映射点。 其中, 在一种实施方式中, 距离获取模块 31 具体用于根据带有电子罗盘的终端的位置信息和另一终端的位置信息,确定带 有电子罗盘的终端到另一终端间的物理距离,进而确定该物理距离所对应的电 子罗盘上的距离, 这种方式中需要获得另一终端的位置信息。在另一种实施方 式中, 距离获取模块 31从控制中心服务器获取该特定距离。 Wherein, in order to display the direction of the other terminal relative to the terminal with the electronic compass on the electronic compass The processing module 30 specifically includes: a distance obtaining module 31, configured to acquire a specific distance, where the specific distance is a terminal with an electronic compass to another terminal, and the distance between the terminal and the terminal with the electronic compass is displayed. a distance on the electronic compass corresponding to the physical distance of the terminal; a display module 32, configured to, on the electronic compass, a certain distance from the origin in a direction of clockwise offset from the direction of the pointer The other terminal is displayed at a position, and the origin is a mapping point of the terminal with the electronic compass in the electronic compass. In an embodiment, the distance obtaining module 31 is specifically configured to determine, according to location information of the terminal with the electronic compass and location information of the other terminal, a physical distance between the terminal with the electronic compass and another terminal. Further, the distance on the electronic compass corresponding to the physical distance is determined. In this manner, the location information of the other terminal needs to be obtained. In another embodiment, the distance acquisition module 31 acquires the particular distance from the control center server.
其中, 为了获得另一终端的位置信息, 该带有电子罗盘的终端还包括: 通 信接口 40, 用于接收另一终端的位置信息; 此时, 一种实施方式中, 该方位角 为磁方位角或者坐标方位角,方位角获取模块 20具体用于根据带有电子罗盘的 终端的位置信息和通信接口所接收的所述另一终端的位置信息,确定带有电子 罗盘的终端至另一终端方向的连线的方位角; 在另一种实施方式中, 方位角获 取模块 20从控制中心服务器获取该方位角(该方位角为磁方位角或者坐标方位 角); 在又一种实施方式中, 该方位角为磁方位角, 通信接口 40从控制中心服 务器获取带有电子罗盘的终端至另一终端方向的连线的坐标方位角;方位角获 取模块 20计算所述坐标方位角与带有电子罗盘的终端所在位置的磁偏角的和, 得到所述磁方位角。 其中, 该实施中关于磁方位角、 坐标方位角的相关定义与 方法实施例中的相关描述相同, 在此不再赘述。  The terminal with the electronic compass further includes: a communication interface 40, configured to receive location information of another terminal; in this embodiment, the azimuth is a magnetic orientation. Angle or coordinate azimuth, the azimuth acquisition module 20 is specifically configured to determine the terminal with the electronic compass to another terminal according to the location information of the terminal with the electronic compass and the location information of the other terminal received by the communication interface The azimuth of the line of the direction; in another embodiment, the azimuth acquisition module 20 acquires the azimuth from the control center server (the azimuth is a magnetic azimuth or azimuth); in yet another embodiment The azimuth is a magnetic azimuth angle, and the communication interface 40 acquires a coordinate azimuth of the connection from the terminal of the electronic compass to the direction of the other terminal from the control center server; the azimuth acquisition module 20 calculates the coordinate azimuth and The sum of the magnetic declinations of the positions of the terminals of the electronic compass obtains the magnetic azimuth. The related definitions of the magnetic azimuth and the coordinate azimuth are the same as those in the method embodiment, and are not described herein again.
可选的,所述通信接口 40具体用于接收控制中心服务器发送的另一终端的 位置信息。 这样, 就不需要该带有电子罗盘的终端与另一终端直接通信, 这样 无论这两个终端的距离有多远, 这两个终端是否加入同一网络,都能在电子罗 盘上显示另一终端的位置。  Optionally, the communication interface 40 is specifically configured to receive location information of another terminal sent by the control center server. In this way, the terminal with the electronic compass is not required to directly communicate with the other terminal, so that no matter how far the two terminals are, whether the two terminals join the same network can display another terminal on the electronic compass. s position.
本发明实施例中的带有电子罗盘的终端控制电子罗盘,使电子罗盘中的指 针映射到水平面时指向预定方向,然后在电子罗盘上该指针所指方向起顺时针 偏移某个方位角的方向上显示另一终端,该方位角为带有电子罗盘的终端至另 一终端方向的连线的磁方位角或者坐标方位角,以便使电子罗盘上能够显示这 两个终端的方向关系,即另一终端是在该带有电子罗盘的终端的前方还是后方 等。进一步的, 可以在电子罗盘上表示两个终端的方向关系的同时表示两者的 距离, 这样, 即使这两个终端的位置发生变化, 该带有电子罗盘的终端也能够 对另一终端进行实时跟踪。 The terminal with an electronic compass in the embodiment of the present invention controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to the horizontal plane, and then shifts clockwise by a certain azimuth angle in the direction indicated by the pointer on the electronic compass. The other terminal is displayed in the direction, which is the magnetic azimuth or coordinate azimuth of the line connecting the terminal with the electronic compass to the other terminal direction, so that the electronic compass can display the same The directional relationship between the two terminals, that is, whether the other terminal is in front of or behind the terminal with the electronic compass. Further, the distance relationship between the two terminals can be expressed on the electronic compass while indicating the distance between the two terminals, so that the terminal with the electronic compass can perform real-time operation on the other terminal even if the positions of the two terminals change. track.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中, 例如只读存储器, 磁盘或光盘等。  A person skilled in the art can understand that all or part of the steps of implementing the foregoing embodiments may be performed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, such as a read only memory. Disk or disc, etc.
以上对本发明实施例所提供的终端定位方法及带有电子罗盘的终端进行 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时,对于 本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均 会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。  The foregoing description of the terminal positioning method and the terminal with the electronic compass provided by the embodiment of the present invention is only for helping to understand the method and the core idea of the present invention. Meanwhile, for those skilled in the art, according to the present invention, The present invention is not limited by the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种终端定位方法, 其特征在于, 包括:  A terminal positioning method, comprising:
第一终端控制电子罗盘,使所述电子罗盘中的指针映射到水平面时指向预 定方向;  The first terminal controls the electronic compass to point the pointer in the electronic compass to a predetermined direction when mapped to a horizontal plane;
第一终端获取第一终端至第二终端方向的连线的方位角;  Obtaining, by the first terminal, an azimuth of the connection of the first terminal to the second terminal direction;
第一终端在所述电子罗盘上所述指针所指方向起顺时针偏移所述方位角 的方向上显示所述第二终端。  The first terminal displays the second terminal in a direction in which the direction of the pointer is clockwise offset from the azimuth on the electronic compass.
2、 根据权利要求 1所述的方法, 其特征在于,  2. The method of claim 1 wherein
第一终端控制电子罗盘,使所述电子罗盘中的指针映射到水平面时指向预 定方向包括:  The first terminal controls the electronic compass such that when the pointer in the electronic compass is mapped to the horizontal plane, the pointing direction is:
第一终端控制带有所述指针的电子罗盘旋转,使旋转后的电子罗盘映射到 水平面时, 所述指针指向预定方向。  The first terminal controls the rotation of the electronic compass with the pointer such that when the rotated electronic compass is mapped to a horizontal plane, the pointer points in a predetermined direction.
3、 根据权利要求 1所述的方法, 其特征在于,  3. The method of claim 1 wherein:
第一终端在所述电子罗盘上所述指针所指方向起顺时针偏移所述方位角 的方向上显示所述第二终端包括:  Displaying, by the first terminal, the second terminal in a direction in which the direction of the pointer is clockwise offset by the azimuth on the electronic compass comprises:
第一终端获取特定距离,所述特定距离是第一终端到第二终端的物理距离 所对应的电子罗盘上的距离;  The first terminal acquires a specific distance, where the specific distance is a distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal;
第一终端在所述电子罗盘上,在所述指针所指方向起顺时针偏移所述方位 角的方向上距离原点特定距离的位置上显示所述第二终端,所述原点为所述第 一终端在电子罗盘中的映射点。  The first terminal displays the second terminal on the electronic compass at a position that is clockwise offset from the direction of the azimuth by a specific distance from the origin in the direction indicated by the pointer, where the origin is the The mapping point of a terminal in an electronic compass.
4、 根据权利要求 3所述的方法, 其特征在于,  4. The method of claim 3, wherein
第一终端获取特定距离包括:  The first terminal acquires a specific distance including:
所述第一终端从控制中心服务器接收第一终端到第二终端的物理距离 ,确 定所述物理距离所对应的电子罗盘上的距离;  Receiving, by the first terminal, a physical distance from the first terminal to the second terminal, and determining a distance on the electronic compass corresponding to the physical distance;
或者,  Or,
该方法还包括: 第一终端接收第二终端的位置信息;  The method further includes: receiving, by the first terminal, location information of the second terminal;
第一终端获取特定距离包括:  The first terminal acquires a specific distance including:
所述第一终端根据第一终端的位置信息和第二终端的位置信息,计算第一 终端到第二终端的物理距离; 确定所述物理距离所对应的电子罗盘上的距离。 The first terminal calculates a physical distance from the first terminal to the second terminal according to the location information of the first terminal and the location information of the second terminal, and determines a distance on the electronic compass corresponding to the physical distance.
5、 根据权利要求 1所述的方法, 其特征在于, 5. The method of claim 1 wherein:
所述方位角是磁方位角或者坐标方位角; 该方法还包括: 第一终端接收第 二终端的位置信息;  The azimuth angle is a magnetic azimuth or azimuth; the method further includes: receiving, by the first terminal, location information of the second terminal;
第一终端获取第一终端至第二终端方向的连线的方位角包括:  The azimuth of the connection of the first terminal to the direction of the first terminal to the second terminal includes:
第一终端根据第一终端的位置信息和所述第二终端的位置信息,确定第一 终端至第二终端方向的连线的方位角;  Determining, by the first terminal, an azimuth of the connection between the first terminal and the second terminal according to the location information of the first terminal and the location information of the second terminal;
或者,  Or,
所述方位角是磁方位角;  The azimuth angle is a magnetic azimuth angle;
所述第一终端获取第一终端至第二终端方向的连线的方位角包括: 第一终端从控制中心服务器获取第一终端至第二终端方向的连线的坐标 方位角,计算所述坐标方位角与第一终端所在位置的磁偏角的和,得到所述磁 方位角。  Obtaining, by the first terminal, the azimuth of the connection of the first terminal to the second terminal direction: the first terminal acquires a coordinate azimuth of the connection of the first terminal to the second terminal direction from the control center server, and calculates the coordinate The sum of the azimuth angle and the magnetic declination of the position of the first terminal obtains the magnetic azimuth.
6、 根据权利要求 4或者 5所述的方法, 其特征在于,  6. A method according to claim 4 or 5, characterized in that
所述第一终端接收第二终端的位置信息包括:  The receiving, by the first terminal, the location information of the second terminal includes:
所述第一终端接收控制中心服务器发送的第二终端的位置信息。  The first terminal receives location information of the second terminal sent by the control center server.
7、 一种带有电子罗盘的终端, 其特征在于, 包括:  7. A terminal with an electronic compass, characterized in that it comprises:
控制模块, 用于控制电子罗盘,使所述电子罗盘中的指针映射到水平面时 指向预定方向;  a control module, configured to control the electronic compass, to point the pointer in the electronic compass to a predetermined direction when mapping to a horizontal plane;
方位角获取模块,用于获取带有电子罗盘的终端至另一终端方向的连线的 方位角;  An azimuth acquisition module for obtaining an azimuth of a line connecting the terminal with the electronic compass to another terminal direction;
处理模块,用于在所述电子罗盘上所述指针所指方向起顺时针偏移所述方 位角的方向上显示所述另一终端。  And a processing module, configured to display the other terminal in a direction in which the direction indicated by the pointer is clockwise offset from the azimuth angle on the electronic compass.
8、 根据权利要求 7所述的终端, 其特征在于,  8. The terminal of claim 7, wherein:
所述控制模块, 用于控制带有所述指针的电子罗盘旋转,使旋转后的电子 罗盘映射到水平面时, 所述指针指向预定方向。  The control module is configured to control the rotation of the electronic compass with the pointer, and when the rotated electronic compass is mapped to a horizontal plane, the pointer points to a predetermined direction.
9、 根据权利要求 7所述的终端, 其特征在于,  9. The terminal of claim 7, wherein:
所述处理模块包括:  The processing module includes:
距离获取模块, 用于获取特定距离, 所述特定距离是带有电子罗盘的终端 到另一终端的物理距离所对应的电子罗盘上的距离; 显示模块, 用于在所述电子罗盘上,在所述指针所指方向起顺时针偏移所 述方位角的方向上距离原点特定距离的位置上显示所述另一终端,所述原点为 所述带有电子罗盘的终端在电子罗盘中的映射点。 a distance obtaining module, configured to acquire a specific distance, where the specific distance is a distance on an electronic compass corresponding to a physical distance from the terminal with the electronic compass to the other terminal; a display module, configured to display, on the electronic compass, the other terminal at a position that is a certain distance from the origin in a direction in which the direction of the pointer is clockwise offset from the origin, the origin is A mapping point of a terminal with an electronic compass in an electronic compass.
10、 根据权利要求 7所述的终端, 其特征在于,  10. The terminal of claim 7, wherein:
所述方位角是磁方位角或者坐标方位角;  The azimuth angle is a magnetic azimuth or azimuth;
还包括: 通信接口, 用于接收另一终端的位置信息;  The method further includes: a communication interface, configured to receive location information of another terminal;
所述方位角获取模块,用于根据带有电子罗盘的终端的位置信息和所述另 一终端的位置信息, 确定带有电子罗盘的终端至另一终端方向的连线的方位 角;  The azimuth acquisition module is configured to determine an azimuth of a line connecting the terminal with the electronic compass to another terminal direction according to the position information of the terminal with the electronic compass and the position information of the other terminal;
或者,  Or,
所述方位角是磁方位角;  The azimuth angle is a magnetic azimuth angle;
还包括: 通信接口, 用于从控制中心服务器获取带有电子罗盘的终端至另 一终端方向的连线的坐标方位角;  The method further includes: a communication interface, configured to acquire, from the control center server, a coordinate azimuth of the connection from the terminal with the electronic compass to the direction of the other terminal;
所述方位角获取模块,用于计算所述坐标方位角与带有电子罗盘的终端所 在位置的磁偏角的和, 得到所述磁方位角。  The azimuth acquisition module is configured to calculate a sum of a magnetic azimuth of the coordinate azimuth and a position of the terminal with the electronic compass to obtain the magnetic azimuth.
11、 根据权利要求 10所述的终端, 其特征在于,  11. The terminal of claim 10, wherein:
所述通信接口具体用于接收控制中心服务器发送的另一终端的位置信息。  The communication interface is specifically configured to receive location information of another terminal sent by the control center server.
PCT/CN2011/080597 2011-10-10 2011-10-10 Terminal positioning method and terminal with electronic compass WO2013053093A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/080597 WO2013053093A1 (en) 2011-10-10 2011-10-10 Terminal positioning method and terminal with electronic compass

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/080597 WO2013053093A1 (en) 2011-10-10 2011-10-10 Terminal positioning method and terminal with electronic compass

Publications (1)

Publication Number Publication Date
WO2013053093A1 true WO2013053093A1 (en) 2013-04-18

Family

ID=48081338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/080597 WO2013053093A1 (en) 2011-10-10 2011-10-10 Terminal positioning method and terminal with electronic compass

Country Status (1)

Country Link
WO (1) WO2013053093A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0170725A1 (en) * 1984-07-03 1986-02-12 Siemens Aktiengesellschaft Navigation apparatus for land vehicles
US5173709A (en) * 1991-06-03 1992-12-22 Motorola, Inc. Electronic direction finder
FR2774760A1 (en) * 1998-02-11 1999-08-13 Eurocopter France Navigation control indicator for display of an aircraft position in a horizontal plane
CN1474934A (en) * 2000-11-21 2004-02-11 �����ɷ� Method and device for orienting map display in mobile or portable device
CN101201255A (en) * 2007-12-21 2008-06-18 四川川大智胜软件股份有限公司 Vehicle combined navigation system based on intelligent navigation algorithm
US20080163057A1 (en) * 2005-04-29 2008-07-03 Tracker Oy Method For Displaying Objects to be Positioned on a Display of a Positioning Device, a Positioning Device and an Application
JP2009111856A (en) * 2007-10-31 2009-05-21 Sony Corp Terminal device, method of displaying search object, recording medium, display program, and system for displaying search object
CN201259427Y (en) * 2008-05-12 2009-06-17 晨星软件研发(深圳)有限公司 Hand-hold electronic device having positioning function
CN102300149A (en) * 2010-06-23 2011-12-28 上海博路信息技术有限公司 Target recognition mobile phone system based on global positioning system (GPS) and electronic compass

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0170725A1 (en) * 1984-07-03 1986-02-12 Siemens Aktiengesellschaft Navigation apparatus for land vehicles
US5173709A (en) * 1991-06-03 1992-12-22 Motorola, Inc. Electronic direction finder
FR2774760A1 (en) * 1998-02-11 1999-08-13 Eurocopter France Navigation control indicator for display of an aircraft position in a horizontal plane
CN1474934A (en) * 2000-11-21 2004-02-11 �����ɷ� Method and device for orienting map display in mobile or portable device
US20080163057A1 (en) * 2005-04-29 2008-07-03 Tracker Oy Method For Displaying Objects to be Positioned on a Display of a Positioning Device, a Positioning Device and an Application
JP2009111856A (en) * 2007-10-31 2009-05-21 Sony Corp Terminal device, method of displaying search object, recording medium, display program, and system for displaying search object
CN101201255A (en) * 2007-12-21 2008-06-18 四川川大智胜软件股份有限公司 Vehicle combined navigation system based on intelligent navigation algorithm
CN201259427Y (en) * 2008-05-12 2009-06-17 晨星软件研发(深圳)有限公司 Hand-hold electronic device having positioning function
CN102300149A (en) * 2010-06-23 2011-12-28 上海博路信息技术有限公司 Target recognition mobile phone system based on global positioning system (GPS) and electronic compass

Similar Documents

Publication Publication Date Title
US11397086B2 (en) Correction of motion sensor and global navigation satellite system data of a mobile device in a vehicle
WO2022088799A1 (en) Three-dimensional reconstruction method, three-dimensional reconstruction apparatus and storage medium
CN102435140B (en) Method for constructing geographic coordinate system with laser tracker
TW201142749A (en) Orientation determination of a mobile station using side and top view images
JP2008158583A (en) Image-related information display system
US20160252605A1 (en) Method and system for guiding the position
US20120293550A1 (en) Localization device and localization method with the assistance of augmented reality
US10412196B2 (en) Mapless user interfaces for limited network conditions
CN104599232A (en) Augmented reality method based on topocentric coordinate system and perspective projection
CN108958462A (en) A kind of methods of exhibiting and device of virtual objects
CN105334525B (en) A kind of geography information display methods based on augmented reality
US8463299B1 (en) Displaying a digital version of a paper map and a location of a mobile device on the digital version of the map
CN102149041A (en) Equipment and method for positioning spatial orientation and marking additional information
US11016198B2 (en) Broadcast transmission of information indicative of a pseudorange correction
CN102506837A (en) Terminal positioning method and terminal with electronic compass
CN110779516A (en) Mobile terminal map positioning method, terminal equipment and storage medium
JP5572053B2 (en) Orientation estimation apparatus and program
JP2003058048A (en) Electronic map display apparatus
CN104125390A (en) Method and device for locating spherical camera
WO2013053093A1 (en) Terminal positioning method and terminal with electronic compass
US11861864B2 (en) System and method for determining mediated reality positioning offset for a virtual camera pose to display geospatial object data
CN105120166B (en) Intelligence adjusts the method and system of camera direction
US11391596B2 (en) System and method for converging mediated reality positioning data and geographic positioning data
WO2017088149A1 (en) Method and apparatus for indicating direction
CN108834044B (en) Shared bicycle WiFi positioning method based on three-dimensional calibration

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11874121

Country of ref document: EP

Kind code of ref document: A1