Answer the question
In order to leave comments, you need to log in
Base station location error?
To determine the location in applications for mobile devices, as you know, you can use the built-in GPS receiver or determine the location by base stations. In my application, I needed to use both options, since the second option was supposed to automatically replace the first one in the absence of GPS data (for example, indoors).
Mobile device running Windows Mobile 6.1 Pro. Language: C#. There were no problems with determining the location by GPS. To determine the location by base stations, I decided to use the cellid.dll library. As it turned out, it is very easy to use.
Everything was written and worked fine, the mobile client received coordinates, an address (up to the street where the base station is located) and sent everything to a remote database on the server. A site was linked to the database, which displayed location information on Google Maps. One day, while looking through the base, I saw that within one minute my coordinates changed quite a lot, and then returned to their place. I look on the map and see that I was in Novorossiysk (as it is), then within a minute I ended up in the Mozhaisk district of the Moscow region and returned back to Novorossiysk. The location was determined by base stations using the cellid.dll library.
Question: is it possible that this is just a mistake in the libraries, or the cell station gave incorrect data, or does the phone periodically visit roaming by itself? Be careful those who develop such applications using these technologies. I have a simple application on which nothing serious depends, but what if the accuracy of the coordinates affects anything?
This was repeated several times at long intervals.
Here are the map and database images:
Function to get the location:
private void GetGPSTowerGEO()<br/>
{<br/>
try<br/>
{<br/>
CellTower ct = RIL.GetCellTowerInfo();<br/>
GeoService gs = new GeoService();<br/>
GeoLocation gl = gs.GSM2Geo(ct);<br/>
LatLonLocation ll = new LatLonLocation();<br/>
ll.Latitude = gl.Latitude;<br/>
ll.Longitude = gl.Longitude;<br/>
<br/>
if (gl != null)<br/>
{<br/>
//получаю данные с базовой станции<br/>
Latitude = gl.Latitude;<br/>
Longitude = gl.Longitude;<br/>
country = gs.Geo2Address(ll).address[0].Country;<br/>
town = gs.Geo2Address(ll).address[0].Full;<br/>
}<br/>
else<br/>
{<br/>
//не могу получить данные с базовой станции<br/>
WriteLog("Address: GetGPSTowerGEO. Message: " + " No data from the base station.");<br/>
}<br/>
}<br/>
catch (Exception e)<br/>
{<br/>
WriteLog("Address: GetGPSTowerGEO. Message: " + e.Message);<br/>
}<br/>
}
Answer the question
In order to leave comments, you need to log in
I think that it is possible to introduce a correction after detecting a “jump” of more than 100 km, taking into account the “gradient” of the average rate of change of the previous location, and consider such a measurement to be unreliable (and discard), and instead the function should return the previous (more plausible) metering (with the flag "obsolete data" set).
Here are some possible reasons:
1. The operator can change the network structure. Thus, station IDs may change over time, and geo-databases are updated with a delay.
2. It is possible that libraries do not take into account all ID parameters (MCC, MNC, LAC, CellID, BSID). Accordingly, ambiguity is possible.
and if the accuracy of the coordinates affects anything?This means that you will have to take into account the returned accuracy estimate if the positioning system supports it.
GeoLocation gl = gs.GSM2Geo(ct);This condition is always met. If
…
if (gl != null)
gl
it was null
, then in the linell.Latitude = gl.Latitude;a NullPointerException was thrown, and
if
it didn't get to the point.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question