Format of Data Saved to SDCard

There’s a pretty cool function hidden away in app>>menu>> settings (bottom button) >> data sharing it is Save cell data to SDCard on upload
.

FAQ
What does selecting this do?
Every time the app uploads data to our servers it will first write to a file on your SDCard in the opensignalmaps folder.

File naming convention?
Fiels look like osm_cells_2011_03_21_T12_22_11.xml, you’ve got osm_cells_YYYY_MM_DDThh_mm_ss.xml

How often are these files created?
The app typically tries to write every time the internal database reaches 1000 rows or more. Then it will write the file to the SDcard, upload to the server and delete the internal DB. It may take rather longer than 1k rows before an upload happens if you have the app set to upload over wifi only.

I’m impatient! How do I make it create the file straight away?
Simple: hit Force Upload. This will empty out whatever is in the database.

Can I use this function if data sharing is turned off?
Not currently. With data sharing turned off the app does not write to the internal database. Let us know if you’d like this feature, if enough people pester us… maybe!

It’s not working :(
If you’re SDCard is mounted as a USB flash drive it won’t work – apps can’t access the SDCard in this state. If this isn’t the problem please let us know.


The format of the file
Firstly this is an XML file, we’re open to making it CSV if people really want. It was just marginally easier to do things this way.
What are all the columns? If you’re using this function then you’re a real signal freak (just like me) and you probably have a good understanding of them, but some are kind of weird. Here’s a sample export of a single row:


<export-database name='/data/data/com.staircase3.opensignal/databases/signal_stairs_db'>
<table name='signal_stairs'>
<row>
<col name='_id'>4584</col><col name='network_type'>EDGE</col><col name='network_name'>movistar</col><col name='roaming'>-1</col><col name='psc'>-1</col><col name='network_id'>72207</col><col name='my_lat'>-34.6636888</col><col name='my_lon'>-58.5761294</col><col name='my_altitude'>-9999</col><col name='loc_source_gps_one_net_zero'>0</col><col name='location_inaccuracy'>51.0</col><col name='location_age'>31</col><col name='location_speed'>0.0</col><col name='current_cell'>1</col><col name='bit_error_rate'>-1</col><col name='rssi'>26</col><col name='CID'>8900</col><col name='LAC'>4408</col><col name='cell_lat'>-34.664109802246094</col><col name='cell_lon'>-58.577928161621094</col><col name='bg_scan'>1</col><col name='timestamp'>1300707360000</col><col name='connection_type'>1</col>
</row>
</table></export-database>

Basic idea: each row corresponds to one antenna being seen by the app at a certain point in time from a certain location. The app reports the strength of the signal it receives from the antenna, what kind of signal technology it is (EDGE, GPRS, EVDO A…), what network is sending that data, it also reports an estimate of where the tower is, and your location when it was seen. In general an error is -1.

The columns:
_id – this won’t really be of much use to you. It’s used internally in the app to identify rows (e.g. to delete rows after they have been uploaded). In each file the number will be unique to each row. So it could be useful to you if you need a key, or to search for rows.

network_type – what kind of voice signal (EDGE, GPRS, EVDO A…), note it doesn’t report WiMAX – the app considers this as non-voice data. If you’re interested in checking this see Network_connection_type.

network_id – Usually 6 digits with the first three being MCC (mobile country code) and the last 3 being MNC (mobile network code). An ID unique to each network.

network_name = name of network sending the antenna data (as seen by the phone)

roaming – -1 for unknown, 1 for yes, 0 for no. A little unreliable currently.

PSC – Rather odd column serving two purposes. For CDMA phones this will be the System ID (SID). For UMTS it will be the Primary Scrambling Code in 9 bits format in UMTS. -1 for unknown or error.

my_lat – last known latitude of the phone when the signal was seen. 0 if not known.

my_lon – as above but longitude.

my_altitude – as above but altitude and -9999 for error or not known.

loc_source_gps_one_net_zero – Indicates whether the location was provided via the GPS (1) or by using network information [wifi or cell triangulation] (0). -1 if not known.

location_inaccuracy – according to the location provider the accuracy the location was given to at the time of the location fix. It is in m. 0 for not known.

location_age – the ‘age’ of the location fix in milliseconds – the time between the location fix and the tower being seen.

location_speed – the speed of the phone when the location fix was taken. In m/s. -1 or 0 for unknown.

current_cell – IMPORTANT this is 1 if the antenna corresponding to this row was actively connected – i.e. if it was dealing with your telephonic data. If this is 0 it means the antenna was seen by your phone, but your phone was not using it actively for voice data – probably because another stronger signal source was available.

bit_error_rate – 0-7, -1 or 99 for error or unknown. This is only available for GSM networks, see the 3GPP TS 27.007 8.5.

rssi – Received Signal Strength Indicator. On a scale from 0 – 31. To convert to dBm use dBm = (RSSI*2 – 113).

CID – for GSM phones the Cell ID. For CDMA the BSID or Base Station ID.

LAC – the location area code for GSM phones. For CDMA it is the CDMA network identification nr.

cell_lat – latitude for the cell (according to the app! – may not be accurate!)

cell_lon – longitude for the cell (according to the app! – may not be accurate!)

bg_scan – 1 if this reading was taken when the app was running in the background – i.e. not visible – otherwise 0.

timestamp – when the tower was seen as a UTC timestamp (milliseconds since 1970)

connection_type – The network data connection type: 0 for mobile/none, 1 for wifi, 6 for WiMAX.

7 Responses to Format of Data Saved to SDCard

  1. Pingback: Format of Data saved to SDCard | OpenSignalMaps Blog

  2. Charles Brandenburg says:

    It’s a good thing I can Read, and Write in (XML). It is a basis, for many Program’s, and Database’s, such as your’s, on http://WWW.OpenSignalMaps.com . Not everyone can read it and make sense of it though. It is a foreign “Geek Language”, so to speak, and was Difficult at 1rst for me, as a Computer Science Student, to learn in College. I do have a Suggestion, to add some additional Functionality, to the Android App, for the common user, by adding a (CSS) File, and a (DTD), to apply to the saved SD Card (XML) file, to be able to open up, on our Android Mobile Device’s, Mobile Web Browser’s. As we all know, these (XML) file’s have to be opened and viewed by a W3C Compatable Web Browser (Parser). In school we used W3C Compliant Web Browser’s, such as FireFox, and Opera. Internet Explorer, is not W3C Compliant! Notepad++, is a good Free Code Editor Program, for all the code language’s, and more.

    • Sam says:

      Hi Charles,
      That’s a good idea. We are actually working on a more user friendly interface so that users can view their data. We hope to add an online accounts system so that users can view their data both on their phone and via a computer. It’s all early stages at the moment though. I find I can open the files just to view them using the following app – although it won’t make much sense to most people:
      https://market.android.com/details?id=com.niklasno.xmlpiko

  3. myloveu says:

    i not see data in sd card ,sd card is micro sd 2g for android 2.2 for mobile htc-t mobile g1

  4. todd says:

    Saving the file in a CSV format would make it much more nimble as an export to other formats. Also, you should consider a KML output format, since that is that is native to the Google platform, and useable in Google Earth

  5. echav says:

    Hi,

    I have just started using the app.

    I noticed that now there are several more fields than the one mentioned in the article. Could you provide a description for the new fields?

    Thanks

  6. josgrp says:

    Hi,

    I have a dispute with my provider about signal strength.
    I plan to use the data from the app to prove I’m right.
    I see very many messages that I am in a dead zone (every minute!).
    I am not moving but quietly sitting in my chair at home.
    Two months ago my subscription to Telfort (KPN network) was over and I switched to hollandsnieuwe (Vodafone network).
    With Telfort I never had any problems with signal strength.
    Can I use the data saved on my SD card?

    P.S. I live in Nymegen, The Netherlands

Leave a Reply