
276
|
Chapter 5, Mapping with Gadgets
#61 Build a Map of Local GSM Cells
HACK
If you want to see the cell ID data go by as you collect it, you can use the
very handy
tee shell command:
$ ./cellstumbler.pl -p /dev/rfcomm0 | tee cell_data.txt
The standard output of cellstumbler.pl contains one sample per line, with
seven comma-separated fields. In order, they are:
timestamp (in iCal format)
GPS status
latitude
longitude
CID (in hexadecimal)
LAC (in hexadecimal)
signal strength (measured in dBm)
The value in the GPS status field is returned directly from gpsd, which will
be
0 if the GPS has no satellite lock, 1 if it has a satellite lock, and 2 if the
location reading is differentially corrected (e,g,, via a WAAS signal).
Evaluating the Data
Given a set of readings of the ID of some radio frequency beacon and its sig-
nal strength, and the latitude and longitude and time at which the measure-
ment was taken, how can we figure out where the radio antennas are? We
could start with a naive interpolation technique that doesn’t even make use
of the signal strength data.
First, we convert the latitude and longitude from the GPS readings into
UTM, to make Cartesian calculations easier. (See “Work with Different
Coordinate Systems”
[Hack #26] for more details on this process.) We take the
numerical average of all the GPS points collected for the same cell-ID read-
ing, and call this the “center” of the cell. We take the ...