Methods for Providing the Best Location Estimation of Three Android Location Providers

After reading this older post A good way to get a user's location on Android , I wondered if anyone has any theories on how to solve this problem to find the best location estimate. Obviously, GPS would be ideal, but for a second it gives a bad measure so often.

Let's say I get three measurements of GPS , WIFI and Cell Tower with their degree of accuracy, what methods would you suggest to find the "best" location?

My initial reaction would be to make some function of the weighted center of gravity where I have three points, and assign the scales to all three for accuracy, and then find the closest point to the three points with their given points. My other thought is to use machine learning, but it seems really excessive unless I specifically do something to solve this problem. Thoughts? This is mainly based on the fact that I am wondering how Skyhook solves the problem of using data.

+4
source share
1 answer
 //declare constants // The minimum distance to change Updates in meters private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 20; // 10 meters // The minimum time between updates in milliseconds private static final long MIN_TIME_BW_UPDATES = 2000 * 60 * 1; // 1 minute public void getlocation() { locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); // Define the criteria how to select the locatioin provider Criteria criteria = new Criteria(); provider = locationManager.getBestProvider(criteria, false); locationManager.requestLocationUpdates(provider, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, this); if (locationManager != null) { Location location = locationManager.getLastKnownLocation(provider); if (location != null) { loclat = location.getLatitude(); loclong = location.getLongitude(); } } } 
+1
source

Source: https://habr.com/ru/post/1493087/


All Articles