HOMEPhone GPS LocatorHow does the mobile phone achieve positioning? How does it work?

How does the mobile phone achieve positioning? How does it work?

GPS Phone Locater - How to Track Phone Number Location Online

Mobile Phone Spy App
Monitor calls, SMS, Gps, Camera, Photos, Videos, Whatsapp, Facebook, etc.
Download AppView Demo

In the era of mobile Internet, mobile phones have become standard in everyone's life. All kinds of apps are installed on these mobile phones and provide various services, which have completely changed our lives. Everyone should have used positioning services. For example, many people install mobile phone positioning software for children or the elderly to prevent the elderly and children from getting lost. This will be applied to positioning technology. This technology provides auxiliary support for many application services.

Some people will hire hackers to use "location" technology to track and locate relevant people, violating the privacy of others! So what exactly is the principle of this technology? How to use this technology to quickly locate the location of others? Today, we will use the content of this article to explain in detail the "principle and implementation of mobile phone positioning"!

Mobile Phone Spy App
Monitor calls, SMS, Gps, Camera, Photos, Videos, Whatsapp, Facebook, etc.
Download AppView Demo

How does the mobile phone achieve positioning? How does it work?

1. Commonly used positioning technology

Now there are 6 kinds of large-scale positioning technologies, which are divided into two categories

Satellite positioning: including GPS, AGPS, Glonass, Beidou.

Ground-assisted positioning: including base station positioning and WiFi-assisted positioning.

2. The principle of common positioning technology

How does the mobile phone achieve positioning? How does it work?

satellite positioning

Common satellite positioning systems include GPS, Beidou, Galileo and Glonass. Although the services provided by these systems are somewhat different, the positioning principles behind them are the same. Now, the most widely used GPS is used as an example to introduce satellite positioning.

GPS (Global Positioning System) is the global positioning system, which is a satellite navigation and positioning system established by the United States. Using this system, users can achieve all-weather, continuous and real-time three-dimensional navigation and positioning and speed measurement on a global scale. In addition, using this system, the user can also carry out high-precision time transfer and high-precision precise positioning.

1.1 GPS system composition

GPS system includes three parts: space part--GPS satellite constellation; ground control part--ground monitoring part; user equipment part--GPS signal receiver.

1.1.1 GPS working satellites and their constellations

21 working satellites and 3 spare satellites in orbit form a GPS satellite constellation. The height of 24 satellites is 20200km from the ground, the operation period is 11 hours and 58 minutes (sidereal time 12 hours), they are evenly distributed in 6 orbital planes, the orbital inclination is 55 degrees, and the orbital planes are 60 degrees apart. The satellites in the plane are 90 degrees apart. When the satellite passes through the zenith, the visible time of the satellite is 5 hours. At any point on the earth's surface at any time, at an altitude angle of more than 15 degrees, an average of 6 satellites can be observed at the same time, up to 9 satellites. In order to understand the three-dimensional coordinates of the calculation station, four GPS satellites must be observed, which is called a positioning constellation.

1.1.2 Ground Monitoring System

How does the mobile phone achieve positioning? How does it work?

For navigation and positioning, GPS satellites are a dynamic known point. The position of the star is calculated based on the ephemeris of the satellite's launch - a parameter that describes the movement of the satellite and its orbit. The ephemeris broadcast by each GPS satellite is provided by the ground monitoring system. Whether the various devices on the satellite work normally, and whether the satellite has been running along the predetermined orbit, must be monitored and controlled by ground equipment. Another important function of the ground monitoring system is to maintain the time of each satellite, find the clock difference, and then send it to the satellite by the ground injection station, and then the satellite is sent to the user equipment by the navigation message.

The ground monitoring system of GPS working satellite includes a main control station, three injection stations and five monitoring stations. The function of the main control station is to calculate the satellite's ephemeris and the correction parameters of the satellite clock according to the GPS observation data of each monitoring station, and inject these data into the satellite through the injection station; Control, issue instructions to the satellites, when the working satellite fails, dispatch the backup satellite to replace the failed working satellite; in addition, the main control station also has the function of a monitoring station; the main task of the monitoring station is to provide the main control station with satellite observations Data; the task of the injection station is to inject the navigation message sent by the main control station into the memory of the corresponding satellite.

1.1.3 GPS signal receiver

It can capture the signals of the satellites to be measured selected according to a certain satellite altitude cut-off angle, track the operation of these satellites, transform, amplify and process the received GPS signals, so as to measure the GPS signals from the satellites to the receiver antenna. It can interpret the navigation message sent by the GPS satellite, and calculate the three-dimensional position of the station in real time, and even the three-dimensional speed and time.

1.2 GPS positioning principle

The basic principle of the GPS navigation system is to measure the distance between the satellites with known positions and the receiver of the user, and then the specific position of the receiver can be known by synthesizing the data of multiple satellites. To achieve this, the position of the satellite can be found in the satellite ephemeris according to the time recorded by the onboard clock. The distance from the user to the satellite is obtained by recording the time it takes for the satellite signal to propagate to the user, and then multiplying it by the speed of light (due to the interference of the ionosphere in the atmosphere, this distance is not the real distance between the user and the satellite, but Pseudorange).

When the GPS satellite is working normally, it will continuously transmit the navigation message with the pseudo-random code (pseudo code for short) composed of 1 and 0 binary symbols. The navigation message includes satellite ephemeris, working status, clock correction, ionospheric delay correction, atmospheric refraction correction and other information. The role of the satellite part of the GPS navigation system is to continuously transmit navigation messages. However, since the clock used by the user receiver and the satellite onboard clock cannot always be synchronized, in addition to the user's three-dimensional coordinates x, y, and z, a variable t, that is, the time difference between the satellite and the receiver, is introduced as an unknown., and then use 4 equations to solve the 4 unknowns. So if you want to know where the receiver is located, you must be able to receive at least 4 satellites.

Solving x, y, z and t from the above four equations allows timing and positioning. GPS positioning method, does not need a sim card, does not need to connect to the network, as long as it is outdoors, it can basically be accurately positioned anytime, anywhere. Other types of satellite positioning methods are similar to GPS and will not be described again.

How does the mobile phone achieve positioning? How does it work?

Base station positioning

Base station positioning, also known as LBS, Location Based Service.

2.1 Related concepts

Because signals in the same frequency range will interfere with each other, in order to prevent adjacent base stations from interfering with each other, adjacent base stations will choose different channels (signals in different frequency ranges) to communicate with mobile devices. The above figure is a schematic diagram of a cellular mobile base station, and any two adjacent base stations have different communication frequency bands. Base stations do not exist in isolation, and their coverage areas are handed over to each other to form a huge mobile communication network.

After the mobile device is powered on after inserting the sim card, it will actively search for the surrounding base station information and establish contact with the base station. In the area where the signal can be searched, the mobile phone can search for more than one base station, but the distance is different. The base station with the closest distance and the strongest signal will be selected as the communication base station. The rest of the base stations are not useless. When your location moves, the signal strength of different base stations will change. If the signal of base station A is not as good as that of base station B, the mobile phone will first communicate with base station B in order to prevent the link from being suddenly interrupted. Communication, after coordinating the communication method, it will switch from A to B. This is why it is also a day of standby, you consume more power on the train than at home, and the mobile phone needs to constantly search and connect to the base station. Every time I take a train, I turn my phone to airplane mode, watch movies, and listen to songs, which can still last a long time.

In this huge mobile network, according to the cell you are in, the subordinate base station can roughly know your location information. If you add some estimation algorithms, you can find your location more accurately.

2.2 The principle of base station positioning

The mobile phone measures the downlink pilot signals of different base stations, and obtains the TOA (time of arrival) or TDOA (time difference of arrival) of the downlink pilots of different base stations. According to the measurement results and the coordinates of the base station, the triangular formula estimation algorithm is generally used to calculate the location of the mobile phone. The actual position estimation algorithm needs to consider the situation of multi-base station (3 or more) positioning, so the algorithm is much more complicated. Generally speaking, the more base stations the mobile station measures, the higher the measurement accuracy and the more obvious the improvement in positioning performance.

The above introduction is a bit official and not very easy to understand. To put it bluntly, the farther from the base station, the worse the signal. According to the signal strength received by the mobile phone, the distance from the base station can be roughly estimated. When the mobile phone searches for signals from at least three base stations at the same time (the current network coverage is very easy. One thing), you can roughly estimate the distance from the base station; the base station is uniquely determined in the mobile network, and its geographical location is also unique, and the distance between the three base stations (three points) and the mobile phone can be obtained, according to According to the three-point positioning principle, you only need to draw a circle with the base station as the center and the distance as the radius. The intersection of these circles is the location of the mobile phone. The same is true for the three-point positioning principle of WeChat transmitted on the Internet.

When the base station is positioned, the signal is easily interfered, so the inaccuracy of its positioning is inherently determined. The accuracy is about 150 meters, and it is basically impossible to drive and navigate. The positioning condition is that it must be in a location with base station signals, the mobile phone is in the sim card registration state (it is not possible to turn on wifi and unplug the sim card in airplane mode), and must receive signals from 3 base stations, whether indoors or not. However, the positioning speed is super fast. Once there is a signal, it can be positioned. At present, the main purpose is to quickly and generally understand your location without GPS and without wifi. In addition, if there is no base station location data package in your mobile phone, you still need to be connected to the Internet.

Wi-Fi positioning

  • In addition to base station positioning, there is another ground positioning method that may be unfamiliar to everyone, namely Wi-Fi positioning. We all know that everyone who goes online will have a public IP address. These IP positions are registered in the network system.
  • An IP address does roughly track your location (the carrier can be more precise), but there are limitations to this kind of targeting. On the one hand, many operators now use NAT technology, which does not necessarily assign a public network address to each user.
  • The Wi-Fi positioning I mentioned is completely different from the IP address positioning above, which is based on the Wi-Fi router MAC address.
  • Every wireless AP (Wi-Fi router) has a globally unique MAC address, and in general, wireless APs do not move for a period of time.
  • When Wi-Fi is turned on, the acquisition device (such as a mobile phone) can search for the signal of this wireless AP, and obtain its MAC address and signal strength information.
  • The collection device uploads the information to the server, and after the calculation of the server, it is saved as the mapping of "MAC-latitude and longitude". When enough information is collected, a huge Wi-Fi information database is established on the server.

When a device is in such a network, the collected data that can identify APs can be sent to the location server, and the server retrieves the geographic location of each AP, and calculates the device based on the strength of each signal. The geographic location of the base station is returned to the user equipment. The calculation method is similar to the calculation method of the base station positioning position.

Location service providers should constantly update and supplement their own databases to ensure the accuracy of data. So the question is, how are these AP location mapping data collected? It can be roughly divided into two types - active collection and user submission.

Active collection:Google's street view camera, didn't expect it? It is a collection device. It collects the wireless signal along the way and marks the coordinates located by GPS and sends it back to the server.

User Submission:When Android phone users turn on "Use Wireless Network Location", they will be prompted whether to allow the use of Google's location service. If permitted, the user's location information will be collected by Google. iPhone will automatically collect Wi-Fi MAC address, GPS location information, operator base station code, etc., and send it to Apple's server.

Like base station positioning, Wi-Fi positioning works well in places with dense APs. If there are few APs, it is difficult to locate accurately. In general, the Wi-Fi positioning method is difficult to implement, and the usability and accuracy are not high. Therefore, it is mainly an auxiliary positioning method.

A-GPS positioning

Speaking of assistance, we're talking about A-GPS.

A-GPS, Assisted GPS, Assisted Global Positioning Satellite System. As the name suggests, this is an enhancement to GPS.

AGPS (AssistedGPS: Assisted Global Satellite Positioning System) is a combination of GSM/GPRS and traditional satellite positioning, using the base station to send auxiliary satellite information to reduce the delay time for GPS chips to obtain satellite signals. Make up and reduce the dependence of GPS chips on satellites. AGPS uses the signal of the mobile phone base station, supplemented by the way of connecting the remote positioning server to download satellite data, and then cooperates with the traditional GPS satellite receiver to make the positioning speed faster. It is a technology that combines network base station information and GPS information to locate mobile stations. It uses both GPS and mobile base stations to solve the problem of GPS coverage. It can be used in the second generation of G, C networks and 3G networks. used in.

Ordinary GPS system is composed of GPS satellites and GPS receivers. Different from ordinary GPS, AGPS also has an auxiliary positioning server in the system. In an AGPS network, the receiver can obtain positioning assistance by communicating with an assistance server. Since the tasks between the AGPS receiver and the auxiliary server are mutually divided, AGPS often has faster positioning capability and higher efficiency than ordinary GPS systems, and can quickly capture GPS signals. Such a first capture The time will be greatly reduced, generally only a few seconds (the first acquisition time of a simple GPS receiver may take 2 to 3 minutes), and the accuracy is only a few meters, which is higher than the accuracy of GPS. Utilizing an AGPS receiver no longer has to download and decode navigation data from GPS satellites, so there is more time and processing power to track the GPS signal, which reduces time-to-first-fix, increases sensitivity, and maximizes availability.

Basic steps of AGPS positioning

  • The AGPS mobile phone first transmits its own base station address information to the positioning server through the network;
  • The positioning server transmits GPS assistance information related to the location (including GPS ephemeris, azimuth, elevation, etc.) to the mobile phone according to the approximate location of the mobile phone;
  • The AGPS module of the mobile phone receives the original GPS signal according to the auxiliary information (to improve the first locking time TTFF capability of the GPS signal);
  • After receiving the original GPS signal, the mobile phone demodulates the signal, calculates the pseudo-range from the mobile phone to the satellite (the pseudo-range is the distance affected by various GPS errors), and transmits the relevant information to the positioning server through the network;
  • The positioning server completes the processing of GPS information according to the transmitted GPS pseudo-range information and auxiliary information from other positioning devices (such as differential GPS reference stations, etc.), and estimates the location of the mobile phone;
  • The location server transmits the location of the mobile phone to a location gateway or application platform (such as a GPS application on the mobile phone) through the network.

The advantage of AGPS is mainly in its positioning accuracy. In open areas such as outdoor, its accuracy can reach about 10 meters under normal GPS working environment, which can be called a positioning technology with the highest positioning accuracy at present. Another advantage is that the time to first capture a GPS signal is generally only a few seconds, unlike GPS which may take 2 to 3 minutes for the first capture. Although AGPS technology has high positioning accuracy and short time to capture GPS signal for the first time, this technology also has some shortcomings. First of all, the problem of indoor positioning still cannot be solved satisfactorily. In addition, the positioning implementation of AGPS must be transmitted through multiple networks (up to six one-way transmissions), which is considered to occupy a lot of air resources for operators, and will generate a lot of traffic for consumers cost. Moreover, AGPS mobile phones have a certain extra burden on power consumption than ordinary mobile phones, which indirectly shortens the standby time of mobile phones. In addition, it is sometimes impossible to obtain signals from multiple satellites, usually due to the limitations of the environment where your AGPS phone antenna receiver is located. In this case, the AGPS function will not work well.

How do developers achieve mobile phone positioning?

Knowing the "developer's implementation method" of these positioning methods, the developers may be sweating all over. Is the app "maintaining the base station and WIFI database by itself" as mentioned above?

Answer: No, of course, in actual engineering practice, there are two mainstream approaches:

One of the means: calling the system-level positioning capability

No matter which system (IOS, Android, WP) provides a set of system-level positioning capabilities, such positioning capabilities correspond to a set of system-level APIs. Generally speaking, this API will always have the following precision options :

High precision: If GPS satellites can be found, use GPS positioning, otherwise, use WIFI positioning. If both WIFI and GPS cannot be successfully positioned, the positioning result can only be given according to the base station.

Balance power consumption: disable GPS (because it is very power-hungry), use WIFI first, if WIFI is not available, use base station for positioning.

Low power consumption (passive positioning): According to the regulations of different systems, the implementation methods are also different, but generally they share the positioning results of other apps, that is, other apps obtain the position with high precision and balanced power consumption, then this position is also It will be pushed to the app that currently uses "low-power positioning", that is, the app will complete the positioning without consuming additional energy consumption.

However, we have to admit that on IOS and WP systems, because the OS does not open the interface for reading base stations and WIFI, in fact, the positioning capability of the operating system has formed a monopoly, and developers cannot achieve independent positioning capabilities.. This also leads to the same positioning error for all apps at the same time on Apple and WP phones.

The second method: call the third-party positioning SDK

For the Android mobile phone system that can read base station and WIFI information publicly, the map manufacturer has implemented the positioning SDK. To the currently scanned base station and WIFI position, a more accurate positioning result is finally calculated, and returned to the developer through the SDK interface. The advantage of this is that the positioning capability of the app can be separated from the dependence on the mobile phone system.

3. How to locate someone's mobile phone location?

Locating the location of other people's mobile phones will involve privacy issues, so the learning club method is only recommended for locating the whereabouts of the elderly and children to ensure the safety of the elderly and children, and cannot be used for illegal activities!

1. Conventional method

At present, the customization system of most mobile phone brands will have their own mobile phone search function, and if other brands do not have their own mobile phone search function but want to locate the mobile phone, they can only achieve it by installing a third-party APP. Through the mobile phone location function of the third-party APP, you can easily locate the location of other people's mobile phones.

2. Special method

Obtaining mobile phone permissions through Trojan program implantation to achieve positioning

In this way, there are many permissions to obtain the other party's mobile phone, not only the location, but also the call, text message, and chat records.