开发者

How to find latitude and longitude faster in android?

I am using LocationManager to get the values of Latitude and Longitude of a user. These values are updated regularly to a database and find out the distance between two users basing on the stored Latitude and Longitude values.

Now,onLocationchanged() called very 开发者_JS百科slow,some times get fast.while i'm waiting long time to proceed next process.When i 'm in indoor the Location search is very slow..

Is there any solution to this prob.pls give me a guide and example.

Please Accept My question as soon as give me a solution.


If you use network location provider, you will get location faster, but it will be less accurate (100-500m).

OTOH, GPS provider will be more accurate (10-20m) but it will take more time to acquire location as device needs to acquire GPS satellite signals. Sometimes it's not even possible to acquire signals, especially if indoor or beneath thick trees.


Well there are there types of GPS starts :

COLD start: takes a lot of time. The old GPS (satellite/time) data is practically useless.

WARM start : is when the GPS device remembers its last calculated position, almanac used, and UTC Time, but not which satellites were in view. You get the fix fairly fast.

HOT start : is when the GPS device remembers its last calculated position and the satellites in view, the almanac used (information about all the satellites in the constellation), the UTC Time and makes an attempt to lock onto the same satellites and calculate a new position based upon the previous information.

To emulate the warm start case all you have to do is connect to the SUPL network, which provides assistance data. Even cold starts can be converted to a warm start. To make sure that SUPL networks are available, make sure you are connected to the internet. In indoor cases no satellites are visible so getting an exact fix is tough without any assistance data. At least 3 satellites should be visible. Again SUPL networks come to the rescue.

Note that, various GPS chipset have different performances/algorithms and the triangulation time depends on the SUPL networks provided by your Network provider.

You can here more about this here


Good starting point is blog/project by Reto Meier:

http://code.google.com/p/android-protips-location/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜