Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

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

Saturday, July 23, 2011

Trusting Google blindfolded

Or maybe I should have picked a title like “do not trust Google Maps picking a route for you”. It was my first time using Google Maps when I was driving between different spots during the vacation. It was always OK to use it in the city or at the main roads interconnecting cities. With this experience I had a trust using Google Maps on the smartphone so that I did not even need to follow road signs.

All rights reserved by jhellfire2000

Ending up in the field with pomegranate trees  following this route for Dalyan to Sarıgerme made me notice that Google may have erroneous data too.

Things started to go wrong at step 3, seeing that the road is not as straight as Google thinks so; but it was heading where Google promised to. I kept following and ended in the field. Too bad I was not driving a 4WD to follow Google's route comfortably.


It was not Google's mistake actually as Google is working with local providers for maps, like this map was provided by BaşarSoft. Checking the web I noticed I am not the only one having this problem.

This little experience made me notice there is still a lot to depend on online maps blindfolded.

Friday, July 01, 2011

Touristy spots of Istanbul

Coming across the World touristiness map and The Geotaggers' World Atlas by Eric Fischer online, I wondered Istanbul’s popularity map. While Eric Fischer’s map for Istanbul could give an idea about the popular spots, what it really provides is the mobility map of the photographers.

The different colors represent different modes of transportation: Black is walking (less than 7mph), Red is bicycling or equivalent speed (less than 19mph), Blue is motor vehicles on normal roads (less than 43mph); Green is freeways or rapid transit.

While world touristiness map provides the popularity info, the resolution is too low to check the popularity at the city level.

Inspired with both ideas I downloaded the locations of all 100K+ geotagged pictures taken around Istanbul at Flickr. Below is the heatmap produced with pictures since the beginning of 2010. While it would be faster to create small grids of the city and download only the number of pictures for each grid (like what "world touristiness map" did possibly), this would not be able to create a high precision map. Because of this, I tried to download all the picture coordinates.


It is no surprise that the most hot area is the historical part of the city and by Bosphorus. The spots on the sea are mostly on the route of ferry lines.


Knowing the city a bit, you could expect this result before trying to plot the pictures. But still if you do not know the city very well, it can teach you new spots close to the city to see like those small red dots at northern part.

Thursday, June 30, 2011

Turkey's earthquake density map

Last year, while checking GoogleMaps' API I used Kandilli Observatory and EarthQuake Research Institute's recent earthquakes data to plot on the map.

For some time I was thinking to implement a heatmap layer for Google Maps, but could not have a chance to do so. Coming across Patrick Wied's code for the same purpose, I tried to play with his code a bit. Remembering the old earthquake map, I used Patrick's code to create a earthquake density map for Turkey using the Kandilli's data.



Above is a snapshot for the produced map. Colors changing blue to red implies increasing earthquake magnitude or more earthquakes around that area. Click the image to see the active version of the map.

Wednesday, March 10, 2010

playing more with maps

Below is another google maps app using the latest Turkish earthquakes from Kandilli.


And here is a bigger version.



Update
Just read some about Google Maplets for such needs with a similar and sure better example.

Update, Jul '11
Just noticed that there is a website doing almost the same

Sunday, February 21, 2010

Having custom maps with labelled markers

I checked it first when I thought about having a map with some data/markers on that to provide some information. I checked Google Maps and Google Maps API for that and saw that it is really easy to have a map with markers on it but having some text on the markers is not in the standart API.

Here it is talking about having a LabeledMarker, with an extension from Mike Purvis. I took one of his examples and modified to have a basic mechanism to load a datafile and show it on the map. The original example was showing data from Google docs retrieved in JSON format. As I wanted to keep data locally in a format I know, I modified his example a bit to load data from a file provided as a parameter to the webpage.

Below is an example of that, with for the list of spots I might like to see. I just passed SpotsToSee as data file to the page.



Or, here it is shown with another data file showing some operators I've been working with.



Saturday, February 20, 2010

converting Cell ID to coordinates

You know you do not need to have a GPS capable phone in order to enjoy location based capabilities on mobile phones, thanks to Google. Since 2007, Google mobile maps can plot your location without need of GPS with some reasonable precision (sure it is using GPS if it is available). That's how, you can check your location and what is around using your mobile phone. Google is being able to find your location using its internal database of cellular antenna IDs and their locations. Google maps application on the mobile set can query this database as the it knows the ID of the cellular antenna it is talking to.

I'm not aware if that cellular tower to coordinate database is available to developers, but here basics are examplified with a code for Windows mobile platform. There are examples around in C# or PHP around, possibly based on the original reverse engineering work.

These examples are considered to work on the mobile terminal as you have the required data on the terminal. If you have access to the GSM network, you can get this data using MAP messages. Yes, you do not need Google's database if you have access to the GSM network as it means you're possibly the GSM operator's itself :)

Below is a PHP code, a mix of C# and PHP examples; letting you to query coordinates of a LAC/CID pair for any country/network. You can play with it or download the code. Though MCC/MNC is sent as parameters, it looks like the result does not depend on them. This is weird as LAC/CID pair is unique only within a certain GSM operator. I have to be making a mistake which I could not figure out :) Still, I used LAC/CID pairs for two different countries without MCC/MNC, and Google still could point the correct spot.



Related post: Drawing GSM cells on Google Maps