CN102506837A - Terminal positioning method and terminal with electronic compass - Google Patents
Terminal positioning method and terminal with electronic compass Download PDFInfo
- Publication number
- CN102506837A CN102506837A CN2011103044050A CN201110304405A CN102506837A CN 102506837 A CN102506837 A CN 102506837A CN 2011103044050 A CN2011103044050 A CN 2011103044050A CN 201110304405 A CN201110304405 A CN 201110304405A CN 102506837 A CN102506837 A CN 102506837A
- Authority
- CN
- China
- Prior art keywords
- terminal
- electronic compass
- azimuth
- pointer
- azimuth angle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Navigation (AREA)
Abstract
The embodiment of the invention provides a terminal positioning method and a terminal with an electronic compass, wherein the terminal positioning method comprises the following steps that: a first terminal controls the electronic compass, so as to enable a pointer of the electronic compass to point to a predetermined direction when mapping to the horizontal plane; the first terminal obtains an azimuth angle of a connection line in a direction from the first terminal to a second terminal; and the first terminal displays the second terminal in a direction of deviating from the azimuth angle clockwise from the direction pointed by the pointer of the electronic compass. With the technical scheme provided by the embodiment of the invention, the other terminal can be displayed on the electronic compass displayed by one terminal.
Description
Technical Field
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
The electronic compass is an important navigation tool and can provide the heading of a moving object in real time. With the progress of semiconductor processes and the development of operating systems of mobile terminals, mobile terminals integrated with electronic compasses have appeared.
The prior art provides a method for displaying a map in an oriented manner, which can make the north orientation of the map displayed on a mobile terminal the same as the north orientation of the physical world, and the specific implementation manner is as follows: a processor in the mobile terminal determines whether the orientation of the map can be determined according to continuous Global Positioning System (GPS) position points, if not, the magnetic field direction of the electronic compass is read, and the orientation of the map is calculated according to the magnetic field direction of the electronic compass. After the orientation of the map is determined, the map is oriented and displayed. As shown in fig. 1 and 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 rotates 90 degrees to the right, the left side of the screen is north, the displayed map rotates 90 degrees to the left, and the north direction of the map displayed in the mobile terminal faces the left side of the screen, as shown in fig. 2, it is ensured that the north direction pointed in the map is consistent with the north direction 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 consistent with the north direction of the physical world, but the position relation between the two mobile terminals cannot be displayed on the mobile terminal.
Disclosure of Invention
The embodiment of the invention provides a terminal positioning method and a terminal with an electronic compass, which can display another terminal on the electronic compass displayed by one terminal.
In view of this, the embodiment of the present invention provides:
a terminal positioning method comprises the following steps:
the first terminal controls the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane;
the method comprises the steps that a first terminal obtains an azimuth angle of a connecting line from the first terminal to a second terminal;
the first terminal displays the second terminal in a direction that is offset clockwise from the direction pointed by the pointer by the azimuth angle on the electronic compass.
A terminal with an electronic compass, comprising:
the control module is used for controlling the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane;
the azimuth angle acquisition module is used for acquiring an azimuth angle of a connecting line from a terminal with an electronic compass to another terminal;
and the processing module is used for displaying the other terminal in a direction which is shifted from the direction pointed by the pointer clockwise by the azimuth angle on the electronic compass.
The first terminal controls the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane, and then displays the second terminal in a direction which is shifted by a certain azimuth angle clockwise from the direction pointed by the pointer, wherein the azimuth angle is the azimuth angle of a connecting line from the first terminal to the direction of the second terminal, so that the direction relation between the second terminal and the first terminal can be displayed on the electronic compass of the first terminal, for example, whether the second terminal is in front of or behind the first terminal.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a map display mode of a mobile terminal provided in the prior art;
fig. 2 is a map display mode of another 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. 4 is a flowchart of another terminal positioning method provided in the embodiment of the present invention;
fig. 5 is a schematic view of a physical world with 3 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. 7 is a schematic view of another physical world with 3 mobile terminals according to an embodiment of the present invention;
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 block diagram of a terminal with an electronic compass according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a terminal positioning method and a terminal with an electronic compass, which can display another terminal on the electronic compass on a screen of the terminal to indicate the direction relationship between the other terminal and the terminal, further indicate the distance from the other terminal to the terminal, and enable the one terminal to track the other terminal in real time when the positions of the two terminals are changed. The following embodiments will describe the above technical solutions provided by the embodiments of the present invention in detail.
Referring to fig. 3, an embodiment of the present invention provides a terminal positioning method, which includes:
301. the first terminal controls the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to the horizontal plane.
Wherein, the pointer in the step can be a compass or a compass; if it is a north arrow, the corresponding predetermined direction is the magnetic north direction; if a compass is used, the corresponding predetermined direction is the south direction of the magnetic field.
The electronic compass controlled in this step includes, but is not limited to, the following two modes: the first mode is as follows: and controlling the whole electronic compass to rotate, so that the pointer points to a preset direction when the rotated electronic compass is mapped to the horizontal plane. The second way is: and controlling the pointer in the electronic compass to rotate so that the rotated pointer points to a preset direction when being mapped to the horizontal plane. The first mode can be suitable for an electronic compass with scales and direction information indication, and can also be suitable for an electronic compass without scales and direction information indication; the second approach is only applicable to electronic compasses without scale and directional information indication. Where the scale is shown as 10, 20, 30.. 350, etc. as shown in fig. 6, and the direction information indicates ne, se, sw, nw as shown in fig. 6, where n represents north, s represents south, w represents west, and e represents east.
302. The first terminal acquires an azimuth angle of a connecting line from the first terminal to the second terminal.
In an embodiment, an azimuth angle of a connection line from a first terminal to a second terminal is a magnetic azimuth angle of the connection line, specifically, a horizontal included angle from a first standard direction of a starting point of the connection line to the connection line in a clockwise direction, where the starting point of the connection line is the first terminal, and the first standard direction is the predetermined direction, that is, a magnetic field south direction or a magnetic field north direction. Specifically, a magnetic azimuth angle of a connection line from the first terminal to the second terminal is equal to a coordinate azimuth angle of the connection line from the first terminal to the second terminal and a magnetic declination angle of a position of the first terminal, wherein the coordinate azimuth angle of the connection line from the first terminal to the second terminal is a horizontal included angle from a second standard direction of a starting point of the connection line to the connection line along an anticlockwise direction, and a coordinate system of the coordinate azimuth angle is that an equator is taken as an x axis and a 0-degree meridian is taken as a y axis. Wherein, the positive direction of the y axis points to the north latitude direction, and the positive direction of the x axis points to the east longitude direction. If the pointer in step 301 is a north pointer and the corresponding predetermined direction is a magnetic north direction, then the second standard direction is a y-axis positive direction, and if the pointer in step 301 is a south pointer and the corresponding predetermined direction is a magnetic south direction, then the second standard direction is a y-axis negative direction. The magnetic declination is an included angle between the north and the true north when the north needle is static, wherein the north is deviated to the east so that the magnetic declination is positive, and the north is deviated to the west so that the magnetic declination is negative.
In another embodiment, an azimuth angle of a connection line from the first terminal to the second terminal is a coordinate azimuth angle of the connection line, wherein the definition of the coordinate azimuth angle is the same as that in the above embodiment, and is not described herein again. That is, in this other embodiment, the declination is ignored, because the declination in our country can be up to 6 degrees at most, typically 2-3 degrees, and the declination can be ignored overall.
In one embodiment, the first terminal calculates the azimuth (i.e., the magnetic azimuth or the coordinate azimuth), and at this time, the first terminal needs to obtain the location information of the second terminal, and then determines a connection line 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, so as to determine the azimuth of the connection line. Alternatively, the first terminal may receive the azimuth angle (i.e., the magnetic azimuth angle or the coordinate azimuth angle) from the control center server, i.e., the control center server performs the above-mentioned process of calculating the azimuth angle. In another embodiment, the control center server may calculate a coordinate azimuth angle and send the coordinate azimuth angle to the first terminal, and the first terminal adds the coordinate azimuth angle and the declination angle to obtain a declination angle.
303. The first terminal displays the second terminal on the electronic compass in a direction shifted clockwise from the direction pointed by the pointer by the azimuth angle.
And displaying the second terminal in the direction which is shifted by the azimuth angle clockwise from the direction pointed by the pointer indicates the directional relation between the second terminal and the first terminal, namely which direction the second terminal is in from the first terminal, such as front or back.
In order to represent the distance between the second terminal and the first terminal while representing the directional relationship between the two terminals on the electronic compass, the following method may be specifically adopted in the step: the first terminal displays the second terminal on the electronic compass at a position which is a specific distance away from an origin in a direction which is clockwise offset from the azimuth (namely, a magnetic azimuth or a coordinate azimuth) from the direction pointed by the pointer, wherein the origin is a mapping point of the first terminal in the electronic compass, specifically, the origin may be a center of the electronic compass, and the specific distance is a distance on the electronic compass corresponding to a physical distance from the first terminal to the second terminal.
Specifically, if the pointer in step 301 is a compass, the first terminal may display the second terminal on the rotated electronic compass in a direction that is offset clockwise from the north direction of the compass by the azimuth angle. If the distance between the second terminal and the first terminal is required to be represented while the direction relationship between the second terminal and the first terminal is required to be represented on the electronic compass, the second terminal is displayed on the rotated electronic compass at a position which is away from the origin by a specific distance in the direction of clockwise shifting the azimuth from the north direction of the compass, wherein the definition of the origin and the specific distance is the same as that described above, and the description is omitted here.
Wherein, the distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal may be calculated by the first terminal itself, and before the step, to calculate the distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal, the method further includes: the first terminal receives the location information of the second 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 from the first terminal to the second terminal, wherein the specific calculation process refers to the detailed description of the subsequent embodiments. In this embodiment, the manner in which the first terminal receives the location information of the second terminal may be 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 embodiment, the distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal is sent to the first terminal by the control center server, that is, the control center server performs the calculation process. Optionally, in another embodiment, the control center server sends the physical distance from the first terminal to the second terminal to the first terminal, and the first terminal determines the distance on the electronic compass corresponding to the physical distance, so that the workload of the terminal can be reduced.
The first terminal and/or the second terminal in the embodiment of the invention are/is a movable terminal.
The first terminal controls the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane, and then the second terminal is displayed in a direction which is shifted by a certain azimuth angle clockwise from the direction pointed by the pointer on the electronic compass, wherein the azimuth angle is a magnetic azimuth angle or a coordinate azimuth angle of a connecting line of the first terminal to the second terminal, so that the direction relation between the second terminal and the first terminal can be displayed on the electronic compass of the first terminal, namely whether the second terminal is in front of or behind the first terminal. Furthermore, the direction relationship between the second terminal and the first terminal can be displayed on the electronic compass, and the distance between the second terminal and the first terminal can be displayed, so that the first terminal can track the second terminal in real time even if the positions of the two terminals are changed.
Referring to fig. 4, another embodiment of the present invention provides a terminal positioning method, which includes:
401. the first terminal acquires the position information of the second terminal from the control center server.
The location information of the second terminal may be a GPS coordinate of the second terminal, and the GPS coordinate includes two parameters, namely longitude and latitude.
Before this step, the second terminal needs to upload the GPS coordinates of the second terminal to the control center server. When the terminal is in a certain area, the terminal collects satellite positioning data to obtain a GPS coordinate of the terminal, and then uploads the GPS coordinate to the control center server, and specifically, the GPS coordinate of the terminal may be uploaded to the control center server through a General Packet Radio Service (GPRS) technology or WIFI or a dedicated communication network.
In one embodiment, the control center server issues 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, and the second terminal and the first terminal belong to the same group, so the GPS coordinates issued 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, and 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, and the control center server sends the GPS coordinates of the second terminal to the first terminal, so that the information storage amount of the first terminal may be reduced.
402. The first terminal obtains the angle that the electronic compass should rotate, namely the heading angle of the first terminal.
Specifically, the first terminal comprises a three-axis sensor, three axial directions of the three-axis sensor are an x axis, a y axis and a z axis, the x axis is perpendicular to the y axis, a plane formed by the x axis and the y axis is parallel to a screen of the terminal, the direction of the x axis points to the top of the terminal from the bottom of the terminal, the direction of the y axis points to the right end of the terminal from the left end of the terminal, and the z axis is perpendicular to the screen of the terminal. When the terminal is obliquely placed in the air, the measurement data output by the three-axis sensor are respectively XM、YMAnd ZMThen substituting the formula to obtain HYAnd HX:
HY=YMcos(θ)+XMsin(θ)sin(Φ)-ZMcos(Φ)sin(θ)
HX=XMcos(Φ)+ZMsin(Φ)
Wherein phi is an included angle between an x axis and a horizontal plane, and theta is an included angle between a y axis and the horizontal plane.
Then according toH is describedYAnd HXAnd obtaining the course angle of the first terminal.
The above only illustrates a way of calculating the first terminal course angle, and other methods of calculating the first terminal course angle may be adopted without affecting the implementation of the present invention.
403. And the first terminal rotates the electronic compass by the angle, so that the compass points to the north of the magnetic field when the rotated electronic compass is mapped to the horizontal plane.
404. And the first terminal calculates the magnetic azimuth angle of a connecting line from the first terminal to the second terminal according to the position information of the first terminal and the position information of the second terminal.
Specifically, according to the position information of the first terminal, the abscissa X of the first terminal in the coordinate system is obtained1And ordinate Y1(ii) a According to the position information of the second terminal, acquiring an abscissa X of the second terminal in a coordinate system2And ordinate Y2(ii) a The coordinate system takes the equator as an X axis, the 0-degree meridian as a Y axis, and the intersection point of the equator and the 0-degree meridian is the origin of the coordinate system; then, according to the abscissa and the ordinate of the first terminal in the coordinate system, and the abscissa and the ordinate of the second terminal in the coordinate system, a rotation angle of a connecting line from the first terminal to the second terminal in the clockwise direction relative to a standard direction of the first terminal is calculated, where the standard direction of the first terminal is parallel to the Y-axis, and the rotation angle is a coordinate azimuth angle of the connecting line from the first terminal to the second terminal, and specifically, the coordinate azimuth angle may be calculated by using the following formula:
|X1|±|X2|=X;
|Y1|±|Y2|=Y;
if the first terminal and the second terminal are positioned in the same quadrant, subtracting the sign, and if the first terminal and the second terminal are positioned in different quadrants, adding the sign;
when X > 0Y > 0, alpha is 90- | artan (Y/X) |;
when X is less than 0Y and more than 0, alpha is 360- | artan (Y/X) |;
when X < 0Y < 0, alpha is 180+ | artan (Y/X) |;
when X > 0Y < 0, alpha is 180- | artan (Y/X) |;
wherein α is a coordinate azimuth of a connecting line from the first terminal to the second terminal.
And then the first terminal adds the coordinate azimuth angle and the local magnetic declination to obtain a magnetic azimuth angle.
405. The first terminal calculates the physical distance from the first terminal to the second terminal according to the position information of the first terminal and the position information of the second terminal, and determines the distance on the electronic compass corresponding to the physical distance from the first terminal to the second terminal.
Specifically, the on-screen distance corresponding to the physical distance from the first terminal to the second terminal is determined according to a proportional relation between the actual unit physical distance and the on-screen unit distance, and if the on-screen unit distance is a pixel pitch and a ratio of the actual unit physical distance to the on-screen unit distance is S, the step determines that the on-screen distance corresponding to the physical distance from the first terminal to the second terminal is N pixel pitches, where N is L/S, and L represents the physical distance from the first terminal to the second terminal.
406. The first terminal displays the second terminal at a position that is shifted clockwise from the north of the compass by the magnetic azimuth angle from the origin that is the center of the electronic compass, which is the distance determined in step 405.
In this embodiment, the center of the electronic compass represents the location of the first terminal, and the location of the second terminal from the origin as the distance determined in step 405 in the direction of the north-pointing direction of the compass shifted clockwise by the magnetic azimuth angle represents 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 represented.
In the embodiment of the invention, the first terminal rotates the electronic compass, the compass points to the magnetic field north when the rotated electronic compass is mapped to the horizontal plane, then the second terminal is displayed at the position which is away from the center of the electronic compass by the distance determined in the step 405 in the direction of clockwise deviation of the magnetic azimuth from the compass north direction after the compass rotates, so that the direction relation and the distance between the second terminal and the first terminal can be displayed on the electronic compass, and the user of the first terminal can know the position of the user of the second terminal relative to the user, the front or the back of the user and the distance from the user. Thus, even if the positions of the two terminals are changed, the first terminal can track the other terminal in real time. Furthermore, the first terminal acquires the position information of the second terminal through the control center server, and the first terminal does not need to be in direct communication with the second terminal, so that the position of the second terminal can be displayed on the electronic compass of the first terminal no matter how far the second terminal is away from the first terminal and whether the second terminal and the first terminal are connected to the same network.
It should be noted that the first and second expressions used in the description of the embodiments are not intended to limit the order, but are merely for convenience of distinction.
It should be noted that the foregoing embodiments have been described only by taking the example of displaying the second terminal on the electronic compass of the first terminal, and those skilled in the art will understand that other terminals can also be displayed on the electronic compass of the first terminal in a similar manner to the above.
It should be noted that, in step 401 in the foregoing embodiment, the first terminal acquires the location information of the second terminal from the control center server, and optionally, the first terminal may directly acquire the location information of the terminal from other terminals in the group, for example, if the second terminal and the third terminal belong to the same group as the first terminal, the second terminal and the third terminal periodically report their location information to the first terminal.
In order to make the technical solution provided by the embodiment of the present invention more clearly apparent, the following description is given by way of example:
three terminals are illustrated in fig. 5, the pointer at the upper left corner of the figure indicates the magnetic north direction, the angle between the magnetic north direction and the heading of the first terminal (indicated by reference numeral 1 in fig. 5) is 45 degrees, that is, the heading angle of the first terminal is 45 degrees, then the schematic diagram of the electronic compass on the screen of the first terminal is as shown in fig. 6, the electronic compass is rotated by 45 degrees, the north direction of the rotated electronic compass in the horizontal plane is the same as the magnetic north direction, and the second terminal (indicated by reference numeral 2 in fig. 5 and 6) and the third terminal (indicated by reference numeral 3 in fig. 5 and 6) are displayed below the center of the electronic compass, indicating that the second terminal and the third terminal are located behind the first terminal.
Three terminals are illustrated in fig. 7, the upper left hand pointer of which indicates the magnetic north direction, the orientation of the user holding the first terminal (shown in fig. 7 with reference numeral 5) being opposite to that of fig. 5, in which the magnetic north direction makes an angle of 135 degrees with the heading of the first terminal (shown in fig. 7 with reference numeral 5), i.e. 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 shown in fig. 8, the electronic compass is rotated by 135 degrees, so that the north direction of the rotated electronic compass in the horizontal plane is the same as the north direction of the magnetic field, and the second terminal (shown by reference numeral 6 in fig. 7 and 8) and the third terminal (shown by reference numeral 7 in fig. 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:
the control module 10 is used for controlling the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane;
an azimuth acquisition module 20, configured to acquire an azimuth of a connection line from a terminal with an electronic compass to another terminal;
a processing module 30, configured to display the other terminal on the electronic compass in a direction that is shifted clockwise from the direction pointed by the pointer by the azimuth angle.
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, where for the definition of the pointer and the predetermined direction, reference is made to the corresponding description of the method embodiment, and details are not repeated here.
In order to display the direction of the other terminal relative to the terminal with the electronic compass and simultaneously display the distance 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 obtain a specific distance, where the specific distance is a distance on an electronic compass corresponding to a physical distance from a terminal with the electronic compass to another terminal; a display module 32, configured to display the other terminal on the electronic compass at a location that is a specific distance away from an origin in a direction that is clockwise offset from the azimuth pointed by the pointer, where 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 a physical distance from the terminal with the electronic compass to the other terminal according to the location information of the terminal with the electronic compass and the location information of the other terminal, and further determine a distance on the electronic compass corresponding to the physical distance, where in this manner, the location information of the other terminal needs to be obtained. In another embodiment, the distance obtaining module 31 obtains the specific distance from the control center server.
Wherein, in order to obtain the position information of another terminal, the terminal with the electronic compass further comprises: a communication interface 40 for receiving location information of another terminal; at this time, in an embodiment, the azimuth is a magnetic azimuth or a coordinate azimuth, and the azimuth obtaining module 20 is specifically configured to determine an azimuth of a connection line from the terminal with the electronic compass to the other terminal direction 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; in another embodiment, the azimuth acquisition module 20 acquires the azimuth (the azimuth is a magnetic azimuth or a coordinate azimuth) from the control center server; in another embodiment, the azimuth is a magnetic azimuth, and the communication interface 40 obtains a coordinate azimuth of a connection line from the control center server to the terminal with the electronic compass; the azimuth acquisition module 20 calculates the sum of the coordinate azimuth and the declination of the location of the terminal with the electronic compass to obtain the magnetic azimuth. The relevant definitions of the magnetic azimuth angle and the coordinate azimuth angle in the implementation are the same as those in the relevant description of the method embodiments, and are not repeated herein.
Optionally, the communication interface 40 is specifically configured to receive location information of another terminal sent by the control center server. Therefore, the terminal with the electronic compass is not required to be in direct communication with another terminal, and the position of the other terminal can be displayed on the electronic compass no matter how far the two terminals are away from each other and whether the two terminals are connected to the same network or not.
The terminal with the electronic compass in the embodiment of the invention controls the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane, and then displays another terminal in a direction which is shifted by a certain azimuth angle clockwise from the direction pointed by the pointer on the electronic compass, wherein the azimuth angle is a magnetic azimuth angle or a coordinate azimuth angle of a connecting line from the terminal with the electronic compass to the direction of the other terminal, so that the direction relation of the two terminals can be displayed on the electronic compass, namely, whether the other terminal is in front of or behind the terminal with the electronic compass or the like. Further, the distance between the two terminals can be simultaneously represented while the direction relation of the two terminals is represented on the electronic compass, so that the terminal with the electronic compass can track the other terminal in real time even if the positions of the two terminals are changed.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by hardware that is instructed to implement by a program, and the program may be stored in a computer-readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like.
The terminal positioning method and the terminal with the electronic compass provided by the embodiment of the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the embodiment of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (11)
1. A terminal positioning method is characterized by comprising the following steps:
the first terminal controls the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane;
the method comprises the steps that a first terminal obtains an azimuth angle of a connecting line from the first terminal to a second terminal;
the first terminal displays the second terminal in a direction that is offset clockwise from the direction pointed by the pointer by the azimuth angle on the electronic compass.
2. The method of claim 1,
the first terminal controls the electronic compass to point to a preset direction when a pointer in the electronic compass is mapped to a horizontal plane, and the method comprises the following steps:
and the first terminal controls the electronic compass with the pointer to rotate, so that the pointer points to a preset direction when the rotated electronic compass is mapped to the horizontal plane.
3. The method of claim 1,
the first terminal displaying the second terminal in a direction shifted clockwise from a direction pointed by the pointer by the azimuth on the electronic compass includes:
the method comprises the steps that a first terminal obtains a specific distance, wherein the specific distance is the distance on an electronic compass corresponding to the physical distance from the first terminal to a second terminal;
and the first terminal displays the second terminal on the electronic compass at a position which is a specific distance away from an origin in the direction of clockwise deviation from the azimuth pointed by the pointer, wherein the origin is a mapping point of the first terminal in the electronic compass.
4. The method of claim 3,
the first terminal acquiring the specific distance comprises:
the first terminal receives the physical distance from the first terminal to the second terminal from the control center server, and determines the distance on the electronic compass corresponding to the physical distance;
or,
the method further comprises the following steps: the first terminal receives the position information of the second terminal;
the first terminal acquiring the specific distance comprises:
the first terminal calculates the physical distance from the first terminal to the second terminal according to the position information of the first terminal and the position information of the second terminal; and determining the distance on the electronic compass corresponding to the physical distance.
5. The method of claim 1,
the azimuth is a magnetic azimuth or a coordinate azimuth; the method further comprises the following steps: the first terminal receives the position information of the second terminal;
the first terminal acquiring the azimuth angle of the connecting line from the first terminal to the second terminal comprises the following steps:
the first terminal determines the azimuth angle of a connecting line from the first terminal to the second terminal according to the position information of the first terminal and the position information of the second terminal;
or,
the azimuth is a magnetic azimuth;
the first terminal acquiring an azimuth angle of a connecting line from the first terminal to the second terminal comprises the following steps:
the first terminal obtains a coordinate azimuth angle of a connecting line from the first terminal to the second terminal from the control center server, and calculates the sum of the coordinate azimuth angle and a magnetic declination angle of the position of the first terminal to obtain the magnetic azimuth angle.
6. The method according to claim 4 or 5,
the receiving, by the first terminal, the location information of the second terminal includes:
and the first terminal receives the position information of the second terminal sent by the control center server.
7. A terminal with an electronic compass, comprising:
the control module is used for controlling the electronic compass to enable a pointer in the electronic compass to point to a preset direction when the pointer is mapped to a horizontal plane;
the azimuth angle acquisition module is used for acquiring an azimuth angle of a connecting line from a terminal with an electronic compass to another terminal;
and the processing module is used for displaying the other terminal in a direction which is shifted from the direction pointed by the pointer clockwise by the azimuth angle on the electronic compass.
8. The terminal of claim 7,
the control module is used for controlling the rotation of the electronic compass with the pointer, so that the pointer points to a preset direction when the rotated electronic compass is mapped to a horizontal plane.
9. The terminal of claim 7,
the processing module comprises:
the distance acquisition module is used for acquiring a specific distance, wherein the specific distance is a distance on an electronic compass corresponding to a physical distance from a terminal with the electronic compass to another terminal;
and the display module is used for displaying the other terminal on the electronic compass at a position which is a specific distance away from an origin in the direction which is clockwise offset from the azimuth pointed by the pointer, wherein the origin is a mapping point of the terminal with the electronic compass in the electronic compass.
10. The terminal of claim 7,
the azimuth is a magnetic azimuth or a coordinate azimuth;
further comprising: a communication interface for receiving location information of another terminal;
the azimuth angle acquisition module is used for determining an azimuth angle of a connecting line from the terminal with the electronic compass to the other 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 is a magnetic azimuth;
further comprising: the communication interface is used for acquiring a coordinate azimuth of a connecting line from the terminal with the electronic compass to the other terminal from the control center server;
and the azimuth angle acquisition module is used for calculating the sum of the coordinate azimuth angle and the magnetic declination of the position of the terminal with the electronic compass to obtain the magnetic azimuth angle.
11. The terminal of claim 10,
the communication interface is specifically configured to receive location information of the other terminal sent by the control center server.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011103044050A CN102506837A (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 |
|---|---|---|---|
| CN2011103044050A CN102506837A (en) | 2011-10-10 | 2011-10-10 | Terminal positioning method and terminal with electronic compass |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102506837A true CN102506837A (en) | 2012-06-20 |
Family
ID=46218945
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011103044050A Pending CN102506837A (en) | 2011-10-10 | 2011-10-10 | Terminal positioning method and terminal with electronic compass |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102506837A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014108045A1 (en) * | 2013-01-09 | 2014-07-17 | 上海大唐移动通信设备有限公司 | Locating method, drive test terminal and hand-held terminal |
| CN105486299A (en) * | 2014-09-17 | 2016-04-13 | Tcl集团股份有限公司 | Mobile terminal indoor positioning method based on electronic compass and mobile terminal indoor positioning system method based on electronic compass |
| CN105551388A (en) * | 2016-01-26 | 2016-05-04 | 冯琴 | Advertisement player with direction indicating function |
| CN105652303A (en) * | 2016-01-04 | 2016-06-08 | 中国科学院、水利部成都山地灾害与环境研究所 | Rapid contact-free positioning method for mountainous area field sampling based on mobile electronic equipment such as Pad |
| CN108494946A (en) * | 2018-02-09 | 2018-09-04 | 维沃移动通信有限公司 | Calibration method and device for electronic compass in mobile terminal |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1432795A (en) * | 1997-02-06 | 2003-07-30 | 富士通株式会社 | Position message management system |
| US20040254718A1 (en) * | 2003-05-30 | 2004-12-16 | Lg Electronics Inc. | Apparatus and method for determining geographical location relative to a designated geographical location with a mobile communication device |
| CN101227508A (en) * | 2007-01-17 | 2008-07-23 | 中兴通讯股份有限公司 | Mobile terminal with electronic compass |
| CN101241009A (en) * | 2007-12-28 | 2008-08-13 | 北京科技大学 | A kind of magnetic electronic compass error compensation method |
| US20080276197A1 (en) * | 2005-12-01 | 2008-11-06 | Koninklijke Philips Electronics, N.V. | Visualisation of Buddylist with Localisation Information |
| CN101303233A (en) * | 2008-07-08 | 2008-11-12 | 北京科技大学 | A blind-guiding magnetic electronic compass |
| CN101600147A (en) * | 2008-06-05 | 2009-12-09 | 锐俤科技股份有限公司 | Group position display and tracking device, system and method |
| CN101685151A (en) * | 2008-09-28 | 2010-03-31 | 景风科技股份有限公司 | Communication method for many-to-many cross positioning connection |
| CN101995580A (en) * | 2010-08-13 | 2011-03-30 | 赵永频 | Interactive positioning capable of setting long-distance and short-distance mobility of gathering site |
-
2011
- 2011-10-10 CN CN2011103044050A patent/CN102506837A/en active Pending
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1432795A (en) * | 1997-02-06 | 2003-07-30 | 富士通株式会社 | Position message management system |
| US20040254718A1 (en) * | 2003-05-30 | 2004-12-16 | Lg Electronics Inc. | Apparatus and method for determining geographical location relative to a designated geographical location with a mobile communication device |
| US20080276197A1 (en) * | 2005-12-01 | 2008-11-06 | Koninklijke Philips Electronics, N.V. | Visualisation of Buddylist with Localisation Information |
| CN101227508A (en) * | 2007-01-17 | 2008-07-23 | 中兴通讯股份有限公司 | Mobile terminal with electronic compass |
| CN101241009A (en) * | 2007-12-28 | 2008-08-13 | 北京科技大学 | A kind of magnetic electronic compass error compensation method |
| CN101600147A (en) * | 2008-06-05 | 2009-12-09 | 锐俤科技股份有限公司 | Group position display and tracking device, system and method |
| CN101303233A (en) * | 2008-07-08 | 2008-11-12 | 北京科技大学 | A blind-guiding magnetic electronic compass |
| CN101685151A (en) * | 2008-09-28 | 2010-03-31 | 景风科技股份有限公司 | Communication method for many-to-many cross positioning connection |
| CN101995580A (en) * | 2010-08-13 | 2011-03-30 | 赵永频 | Interactive positioning capable of setting long-distance and short-distance mobility of gathering site |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014108045A1 (en) * | 2013-01-09 | 2014-07-17 | 上海大唐移动通信设备有限公司 | Locating method, drive test terminal and hand-held terminal |
| US9554253B2 (en) | 2013-01-09 | 2017-01-24 | Shanghai Datang Mobile Communications Equipment Co., Ltd | Locating method, drive test terminal and hand-held terminal |
| CN105486299A (en) * | 2014-09-17 | 2016-04-13 | Tcl集团股份有限公司 | Mobile terminal indoor positioning method based on electronic compass and mobile terminal indoor positioning system method based on electronic compass |
| CN105652303A (en) * | 2016-01-04 | 2016-06-08 | 中国科学院、水利部成都山地灾害与环境研究所 | Rapid contact-free positioning method for mountainous area field sampling based on mobile electronic equipment such as Pad |
| CN105652303B (en) * | 2016-01-04 | 2018-08-17 | 中国科学院、水利部成都山地灾害与环境研究所 | A kind of mountain area field sampling based on mobile electronic devices such as Pad does not contact localization method quickly |
| CN105551388A (en) * | 2016-01-26 | 2016-05-04 | 冯琴 | Advertisement player with direction indicating function |
| CN108494946A (en) * | 2018-02-09 | 2018-09-04 | 维沃移动通信有限公司 | Calibration method and device for electronic compass in mobile terminal |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9110150B2 (en) | Positioning device, positioning method, program, and recording medium | |
| CN102696058B (en) | Determination of time zone and DST participation | |
| JP4381161B2 (en) | Direction measuring device, direction measuring method, and direction measuring program | |
| CN104331423B (en) | A kind of localization method and device based on electronic map | |
| CN102915310B (en) | One map generalization method electronically, air navigation aid and device | |
| CN104330081B (en) | A kind of generation method and device of descriptive position indicating information | |
| US9612314B2 (en) | Method and system for guiding the position | |
| KR20030051856A (en) | Method and apparatus for orienting a map display in a mobile or portable device | |
| US20230184962A1 (en) | Underground Line Locator System With Real Time Kinematic And Global Satellite Positioning | |
| CN109639337B (en) | Graphic auxiliary satellite alignment method suitable for satellite communication equipment | |
| CN105334525B (en) | A kind of geography information display methods based on augmented reality | |
| JP2010117291A (en) | Navigation device | |
| CN104459728B (en) | A kind of magnetic declination calibration steps positioned based on GNSS | |
| CN102630076A (en) | Display method and system of target position direction pointing information based on electronic compass | |
| CN102506837A (en) | Terminal positioning method and terminal with electronic compass | |
| CN112923921A (en) | Track measurement method and device based on position correction and electronic equipment | |
| US8463299B1 (en) | Displaying a digital version of a paper map and a location of a mobile device on the digital version of the map | |
| JP2004309461A (en) | Direction finder, method of direction finding, and direction-finding program | |
| CN102149041A (en) | Equipment and method for positioning spatial orientation and marking additional information | |
| CN112859130B (en) | High-precision electronic map position matching method for field navigation patrol | |
| CN113484889A (en) | Immersive navigation system based on augmented reality and satellite positioning of mobile terminal | |
| CN1392491A (en) | Electronic map for automatic orientation | |
| CN202676915U (en) | Global navigation satellite system receiver | |
| CN116338733A (en) | Lofting method and device based on lofting point positioning and ranking and intelligent terminal | |
| CN110779516A (en) | Mobile terminal map positioning method, terminal equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C12 | Rejection of a patent application after its publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120620 |