Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android GPS accuracy

Tags:

android

gps

I'd like to use fine gps position in my app. So I followed a simple tutorial (basic usage of LocationManager, explicitly reguested GPS provider, ask for updates 0 ms, 0 m ) and create an app. I was totally not impressed with accuracy and speed of updates. It was slow and best accuracy was 24 meters, but on average 96.

On the same phone, from the same location I run widely known GPS STATUS. And I was amazed to see how accurate the fix was. 4-6 meters, consistently.

So I switched off GPS Status and run my app - I see accuracy 6 meters, but seconds later it is 24, 56, 90, 128.... And fluctuate around 96.

Now, I wonder: how this is possible? Are there tricks to boost accuracy?!!

Does anybody have good examples/tutorials?


it does not help

Let me repeat: I get and print ALL updates. So I see a stream of locations with accuracy.

I see fluctuations, I see best results, and it is never better then 12 meters.

Now in the same spot, I start GPS Status => and I see how accuracy goes to 4 meters!

First I thought: ha, GPS STatus cheats, just devides the accuracy

But it seems to be not the case, because when I switched my app on and get lastknown positon it is indeed the one with accuracy 4!

And start to degrade to the best case 12.

Summary: same hw, same conditions, different apps => different accuracy!

So my question: are there any tricks? Any extra commands? Any special power settings? Any relations to "how heavy you app"?

related to: Android GPS. Location Listener does not want to acquire a fix :(

like image 413
user929298 Avatar asked Sep 05 '11 17:09

user929298


People also ask

How do I calibrate my Android GPS?

Calibrate Android GPS Return to the Google Maps app. Hold the device right-side up, then move it in a figure-8 motion a few times. The calibration is complete when the beam becomes narrower and points in an accurate direction.

Why is the GPS on my phone not accurate?

When your phone is in power-saving mode or if its screen is turned off, the GPS apps may not be provided with data in real-time. Go to Settings and make sure to change your power-saving mode to 'high performance' or 'optimized. '


2 Answers

The best accuracy you can get with GnssMeasurement, but is hard to code. Android 7+ I have Doodgee shoot dual(very not popular china smartphone) and work's. https://developer.android.com/reference/android/location/GnssMeasurement https://developer.android.com/guide/topics/sensors/gnss (official support list).

GNNS(GPS/GLONASS/GALILEO/...) LocationManager,( 0 ms, 0 m ) - don't work, after some times(1-20s) you will get this same coordination(if you will stay in one place)- accuracy is 3-10m. With LocationManager you dont get the "raw" GNNS data from physical modul, but calculated by Android API. With GnssMeasurement you can got it.

like image 160
Krzysztof Wlezień Avatar answered Sep 22 '22 10:09

Krzysztof Wlezień


google has released a nice API on their recent Google IO 2013 event:

https://developers.google.com/events/io/sessions/324498944

you should check it out and see how you can minimize your code.

do note that it requires that the device would have the play store app for this to work.

this method has many advantages over using the normal location sensors (battery, speed , accuracy,...)

like image 24
android developer Avatar answered Sep 26 '22 10:09

android developer