Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve GPS location Accuracy in Android

Tags:

android

gps

Hi im working on an app that uses GPS location. My testing devices are Nexus One and Htc Mytouch 3g Slide.

So does anyone know how to improve the GPS location accuracy?

like image 926
Alejandro Rangel Avatar asked Aug 05 '10 07:08

Alejandro Rangel


People also ask

How do I fix low accuracy GPS?

On both iPhone and Android, turning on Wi-Fi will make Google Maps more accurate, as it scans nearby Wi-Fi signals to locate you. If that doesn't work, try restarting your iPhone or Android. Your phone's GPS sensors may simply need to be rebooted.

Why is my android phone GPS not accurate?

NOTE: A GPS signal is strongest under the clear sky. If you can't see the sky, you'll have a weak GPS signal and your position on the map might not be correct. Navigate to Settings > Location > and make sure Location is ON. Navigate to Settings > Loction > Sources Mode and tap High Accuracy.

How do I calibrate my GPS on my Android phone?

Open the Google Maps app, making sure that your blue circular device location icon is in view. Tap on the location icon to bring up more information about your location. At the bottom, tap the “Calibrate Compass” button. This will bring up the compass calibration screen.

Why is my phone GPS 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.


3 Answers

see this post: Google Maps & apps with mapview have different current positions

Are you talking about your own MapView witin your app or the Google Maps app? In your own map, use both network provider and gps provider to get the location. Gps only works outdoors under free sky and is more accurate, while a network provider works indoors as well but less accurate.

Also read this: http://forum.sdx-developers.com/android-2-1-development/cdma-lockup-wifi-use-wireless-networks-and-gps!/msg22834/#msg22834

like image 160
Mathias Conradt Avatar answered Sep 28 '22 17:09

Mathias Conradt


Since API 9 you can use some constants for the setAccuracy method

lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_HIGH);  
lm.getBestProvider(criteria, true);

ACCURACY_HIGH less than 100 meters
ACCURACY_MEDIUM between 100 - 500 meters
ACCURACY_LOW greater than 500 meters

here are the details

like image 36
dev mz Avatar answered Sep 26 '22 17:09

dev mz


While it's true that since API 9 there are some new possibilities in terms of accuracy settings, what @dev mz said won't work. You can't use the new constants directly in criteria.setAccuracy. Instead you can use these new features like this:

        //All your normal criteria setup
        Criteria criteria = new Criteria();
        //Use FINE or COARSE (or NO_REQUIREMENT) here
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
        criteria.setPowerRequirement(Criteria.POWER_LOW);
        criteria.setAltitudeRequired(true);
        criteria.setSpeedRequired(true);
        criteria.setCostAllowed(true);
        criteria.setBearingRequired(true);

        //API level 9 and up
        criteria.setHorizontalAccuracy(Criteria.ACCURACY_HIGH);
        criteria.setVerticalAccuracy(Criteria.ACCURACY_HIGH);
        criteria.setBearingAccuracy(Criteria.ACCURACY_LOW);
        criteria.setSpeedAccuracy(Criteria.ACCURACY_HIGH);

As for your question, be aware that we are talking about Criteria for the incoming location updates. This won't actually improve the quality of the GPS data because that's device/hardware/network specific. It just acts like a filter for the incoming geolocations.

like image 34
Jordy Avatar answered Sep 28 '22 17:09

Jordy