GPS accuracy GPS

I want to use the exact gps position in my application. So I followed a simple tutorial (the basic use of the LocationManager, an explicitly registered GPS provider, requesting updates of 0 ms, 0 m) and creating the application. I was completely unimpressed by the accuracy and speed of the updates. It was slow and the best accuracy was 24 meters, but an average of 96.

On the same phone from the same place, I launch the well-known GPS STATUS . And I was amazed to see how accurate the correction was. 4-6 meters, in series.

So, I turned off the GPS status and launched the application - I see an accuracy of 6 meters, but after a second it’s 24, 56, 90, 128 .... And it fluctuates around 96.

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

Does anyone have any good examples / tutorials?


It does not help

Let me repeat: I receive and print ALL updates. Therefore, I see a stream of locations with accuracy.

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

Now in the same place I launch GPS Status =>, and I see how much accuracy goes up to 4 meters!

At first I thought: ha, GPS status cheats, just highlights accuracy

But that doesn't seem to be the case, because when I switched my application and get lastknown positon, it really is the one with 4 accuracy!

And start to degrade at best 12.

Summary: the same hw, the same conditions, different applications => different accuracy!

So my question is: are there any tricks? Any additional commands? Any special power settings? Any relationship to "how hard are you using"?

Related to: Android GPS. Location Listener does not want to purchase the patch :(

+4
source share
2 answers

Google posted a nice API in its recent Google IO 2013 event:

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

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

Please note that this requires a playback application on the device.

This method has many advantages over the use of conventional position sensors (battery, speed, accuracy, ...)

+1
source

How about this?

- set accuracy + set power:

try{ locator = new GeoLocator(this); locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationManager.addGpsStatusListener(new GPSStatusManager(locationManager)); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setPowerRequirement(Criteria. POWER_HIGH); bestProvider = locationManager.getBestProvider(criteria, true); Bundle bundle = new Bundle(); //I copied the next two lines out of some tutorial hoping that they would help boost my gps, but I'm really not sure what they do boolean xtraInjection=locationManager.sendExtraCommand(LocationManager.GPS_PROVIDER, "force_xtra_injection",bundle); boolean timeInjection=locationManager.sendExtraCommand(LocationManager.GPS_PROVIDER, "force_time_injection",bundle); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0.0f, locator); }catch(Exception e){} 
-1
source

All Articles