Improving GPS Accuracy

Hi, I am working on an application using gps. My test devices - Nexus One and Htc Mytouch 3G Slide

So does anyone know how to improve gps accuracy?

+5
source share
3 answers

see this post: Google Maps and apps with a map have different current positions

Are you talking about your own MapView with your application or with the Google Maps application? On your own map, use the network provider and gps provider to get the location. Gps only works outdoors under free skies and is more accurate, while the network provider works indoors, but is less accurate.

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

+4

API 9 setAccuracy

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

ACCURACY_HIGH 100
ACCURACY_MEDIUM 100 - 500
ACCURACY_LOW 500

+4

, , API 9 , , @dev mz, . criteria.setAccuracy. :

        //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);

, , . GPS, / /. .

+4

All Articles