Sunday, April 22, 2012

Drawing GSM cells on Google Maps

The GSM (radio) network is built on cells, which are served by base stations (BTS). A cell site may have multiple sectors, created by seperate antennas serving to separate angles from the same tower.

Potential real coverage of a cell

The coverage area of a cell is not certain as shown here in the figure. It can be quite chaotic and may even be built of separate "islands" of coverage, just because of geographical conditions and buildings around. The coverage area of the cell can be mathematically modeled taking the environment into consideration or better tried to be measured on the field to have the exact coverage information.

For the simplicity, each sector of a cell site can be considered as a slice of pie with the center as the tower and some depth which it can reach farmost. Theoretically the depth of a cell is 35km (6-bits time advance value), but in the cities the depth is much less. The depth of the cell can be calculated or verified by the calls made from farmost distance to the tower.

From time to time I needed to draw simplified pie-representation of GSM cells on Google Maps to be able to visualize the cell. Each cell can be identified by LAC and CID of the cell and can be described by coordinates of the tower, the start and stop angles and depth of the cell.

With my limited Javascript knowledge, I developed a quick and dirty class which can represent and draw a GSM cell on the map.

Defining cells you wanna draw as below, you can easily draw them on the map.


Adding the midpoint calculation to the class, you can show information on the cell too.



Another important function I needed was marking a time advance (TA) area, as it is used by CGI+TA based positioning method. In this method the location of the subscriber is estimated as an arc. Each TA slot is around 550 meters (for 2G). Below is a fictional cell with 2km depth.


You can see the working example and check the javascript code here. Once you populate all your cells in the module cells.js, you can play with them on the map.

Related post: converting Cell ID to coordinates

8 comments:

Andika Permana Putra said...

nice tutorial, but why in http://dreamsware.info/bahrio/bchm/ i can't click drawing map to show info windows?

Bahri Okuroglu said...

The example webpage does not handle any onClick events. You can easily extend it by calling infoWindow() method.

Andika Permana Putra said...

okay, thanks for replying my question, i appreciate that. now im confuse with infowindow method... why it's always showing the same info window in every coverage area? i use infowindow like this :

GEvent.addListener(polygon, "click", function(overlay,latlng) {
map.openInfoWindowHtml(overlay, 'some text');
});

i have 3 coverage area, and all of them showing the same info window.. could you help me to solve the problem?

Andika Permana Putra said...

about my question before,no need to answer that cause i have found the answer.... thanks for your basic tutorial.. it's very helpfull :)

Albi said...

hello,

i saw this blog on the internet, and i found very interesting the program you made for displaying the timing advance per cell in Google Maps. Can you please give me the code for this program, as it is very important for my job (i work for a mobile company in Albania, and i didn't find it on the blog. i would really appreciate if you could help me on this. kind regards, Albi

Bahri Okuroglu said...

Albi, the code was already given in the post. Please check http://dreamsware.info/bahrio/bchm/ source code

Abdulla Nashid said...

Thank you.This is really good tutorial.How can create multiple cells or sector.

Bahri Okuroglu said...

You can try to add more cells to cells.js like "cells['L1']['C2']=new ttCell(1, 2, 51.59010, -0.1348, 268, 332, 2);" and draw them too with " drawCellWithTA(map, 1, 2, 1);"