Last time, when we talked about
the MegaFon Navigation application and how it works, we mentioned several other services, the main component of which is the definition of coordinates and their interpretation
(Location-based services) .
Depending on the tasks set before the service and accuracy requirements, we use different technologies for determining the coordinates. Today we will tell you what technological platforms we have at our disposal, and how we use them.
Theory
Turning on your mobile phone or any other device operating in the GSM network
(Mobile station) , you start a huge technological process.
The first thing your mobile device
(MS) does is to search for nearby base stations
(Base station, BS) . To be more precise, then listens to the air in search of available cells. The phone can listen to up to 16 broadcast channels. Of these, 6 are the most satisfying in terms of energy costs and signal quality. But at one point in time will work with only one. Each cell has its own unique number
(CellID) .
')
In this case, all base stations
(BS) are combined into groups. As a rule, membership in a group is determined by their location
(Location area) , and in order for base stations to be identified, each group is assigned a unique number — the
Location area code (LAC) .
Together, the
LAC and
CellID parameters work as unique identifiers of the base station where the mobile device is registered and operating. It is by using these parameters that the Switching Center selects the right direction to send a call in your direction, otherwise you would have to search for you among thousands of base stations.
In addition, the base station sector is determined
(Cell Sector) and the time is recorded for which the signal from the mobile device reaches the base station - this is the
Timing Advance parameter. Due to this, not only the belonging to the base station is known, but also the distance from it.
Determining the position of the subscriber in the cellular network.The location data of the mobile phone is updated with a certain frequency or in case it moves (of course, along with you), then each time it switches between base stations.
How to send a call to the desired subscriber?

The interaction of systems to determine the position of the mobile device.
A phone number that is stored in a huge database of mobile operator numbers. The Home Location Registry
(HLR) contains information about all subscribers assigned to it. Having found a subscriber in one of the
HLRs , we redirect the call to its associated
switching center (Mobile switching center, MSC) , which in turn requests information from the Guest Location Register
(VLR) , which contains data on the last registered
CallID ,
LAC of the subscriber. After that, the base
station controller (Base station controller, BSC) communicates with the base stations within the transmitted
LAC , and the call is routed to the desired cell
(CellID) .
Practice
Due to the fact that the work of cellular communication is inseparably connected with the determination of location, geolocation services based on the GSM / UMTS network also began to develop.
The main criteria for geolocation services are not only the accuracy of determining the coordinates of a mobile terminal, but also the frequency of updating them on demand, the ability to get not only current coordinates at the moment, but also store historical data and build a route for the phone, and hence the subscriber.
Since the work of many subscriber services is related to obtaining the coordinates of a particular subscriber, showing the coordinates, we can only if the subscriber has given permission for this: he confirmed this possibility as part of the request from the service. There is no other way to get the coordinates of the subscriber.
For services
Radar and
Beacon , where the location is tracked only upon request from the subscriber, we use the following logic of operation.
With each request from the service, the system accesses the equipment chain and receives the
CellID and
LAC parameter. We, in turn, know the coordinates of each base station and after additional mathematical processing we show the user the zone in which the subscriber may be located. The greater the density of base stations, the more accurate the definition of coordinates. Accordingly, within the city limits the error is lower than outside the city.
We have the opportunity to get not only the
CellID data of the base station to which the subscriber is connected, but also the data of the “neighbors” (neighboring base stations), we can improve the accuracy of determination using
triangulation - now the zone in which the subscriber is located is not limited to the range of the base station. stations, and a simplex between several base stations (often a triangle, the vertices of which are given by the coordinates of the base stations). This definition method also works on user request and, for example, is used in the
Navigator service.
Creating a service of
personnel control, we have put in front of him more complex tasks. In addition to determining the coordinates of the subscriber, we can give the user data on the entry and exit of the subscriber from a specific geographic area, search for employees who are closest to a given point, and most importantly collect statistics on all routes. Additionally, the service allows you to adjust the time for monitoring (in order to limit it only to the employee’s working time), and also allows you to send messages to employees directly from the service.
An example of using the service "Personnel Control"To implement a similar set of functions, you need more than just asking for the location coordinates of the subscriber. We implemented the ability to collect data from base stations immediately after updating them and aggregating them into history. This made it possible to eliminate the constant system polling and provide for all services the possibility of obtaining information about the subscriber's coordinates in real time. The platform accumulates all values ​​received from base stations, and geolocation services communicate with it already:
- With a given frequency, data from base stations is checked to see if the subscriber has entered a zone that is allocated for monitoring;
- Specify the geo-location data on request. In this way, you can get the last location of the subscriber;
- Build a route for the movement of subscribers based on historical data;
- Predict clusters and migration paths of subscribers based on stored history.
On the basis of this platform, there are a lot of services, for example, Emergency Services. When you call 112, in addition to communicating with the operator and voicing the difficulty that has arisen, the geographical position of the caller is also transmitted. In this case, operational services can act more accurately and find someone who needs help even if the connection was later lost.
It is possible to use anonymous data (without using subscriber data), when only geographic coordinates are used for analysis. We call it Geospatial analysis - aggregation of information on migration and movement, the accumulation of subscribers. After receiving such information, you can find the most suitable place for the development of a network of shops, service offices or installation of ATMs. But this is not the only application; thanks to this data, it is possible to predict new traffic intersections, public transport stops, social objects: parks, walking areas, and so on.
An example of the analysis of the accumulation of mobile devices of a certain category in the regions.In the
Dating service, which is built into the
MegaFon-Navigation application, we also apply only the geographical position. You can find the subscribers closest to you, but the only thing that you can find out about them is the names (nickname) that users have set for themselves.
Conclusion
In general, for each task you can find your own tool that allows you to solve it in the best way. You may also have ideas for a geolocation service that MegaFon subscribers or employees of your company will use. We will be glad to all offers of cooperation or requests for access to API services.
All described services are developed and developed in the company "MegaLabs" .