Fused Location Manager API Accuracy - java

I want to make an Android app that needs locations accurate to about 1m or less.
Is the "Fused Location Manager API" good enough, or can GPS never be this accurate, regardless if fused with other Sensors?
If so, does anybody know a way to get more accurate locations on a smartphone?
Thank you!

For Getting more accuracy in Android phones was not recommended due to battery/data consumption. If it not an issue means you can use below code
Integer gpsFreqInMillis = 1000;
Integer gpsFreqInDistance = 1; // in meters
locationManager.addGpsStatusListener(this);
locationManager.requestLocationUpdates(gpsFreqInMillis, gpsFreqInDistance, criteria, this, null);

There has been a previous discussion about whether the Fused Location Provider is a good choice (the answer to that question was yes). You can find that post here: Is Fused Location Provider good choice?
Perhaps this is what you are looking for: Android's most accurate Location API
Hopefully this helps!

For GPS 3m is max see https://gis.stackexchange.com/questions/43617/what-is-the-maximum-theoretical-accuracy-of-gps It wont get any better than that. And that is outside and away from any buildings.
All other sensors are less accurate. Maybe you can get some better accuracy if you take multiple measurements over time and average them (works only with a still device).
You can get very good results with wifi rtt (which is not strictly a sensor) https://www.gpsworld.com/how-to-achieve-1-meter-accuracy-in-android/ which is used by Fused Location Provider

Related

fused location API sometimes returns freak values, how to identify and discard

I'm developing an app that tracks walks, bicycle rides, car rides etc. I need precise info, so I basically would like to use only GPS. Still most sources I found recommend using Googles fused API e.g. for power saving reasons, so I went for the fused API.
Now once in a while (once or twice a month) I get one freak value among thousands of good ones. a few of them I got near railway stations, where the freak value is at another railway station, several kilometers away, so I assume it is a wrong interpreted WiFi based position.
Here's one example, where I ride my bicycle from the river towards the main railway station located east of the river. Once I arrive at the main station, I get no position for 126 s (I asked for every 10 sec, so I probably lost the GPS signal), and then suddenly I get a freak GPS value at another railway station 3450m away on the other side of the river. The reported accuracy for the freak value is 20 m.
The problem is that I cannot easily identify and filter these freak values.
Calling currentLocation.getProvider() always returns "fused", which is not very helpful.
Also Location.getAccuracy() returns typical values below 100m.
So today I filter based on evaluating speed combined with unrealistic changes in bearing, but I'm afraid I might also discard good samples in the process.
I scanned a lot of Stackoverflow, but strangely enough I didn't find any relevant answers yet.
I now feel like moving to the old framework location API and use GPS based data only. But is that really necessary, or does anybody have an idea how to avoid getting the freak values, or alternatively how to easily identify and discard all wifi based positions?
And will using the framework location API have bad battery life as a result?

Multi-points Trilateration to be used with beacon data on Android

I've been struggling for a while with this, I'm currently using Estimote Beacon on Android and I'm collecting their RSSI and TxPower to calculate their range. Once I got this data and I know their position (latitude, longitude, altitude), I need to calculate my rough position for an Indoor Location purpose.
All the solution provided only are either for three single points or doesn't work. There must be an existing Java Solution somewhere since it's a common problem.
Now I know that this was asked before but no answer really helped me in my case. Here is a resume of some of them:
- Solution using three points only:
Trilateration Method Android Java
Multi-point trilateration algorithm in Java
Trilateration Method Android Java
- Solution I've tried but gets me a wrong result
Trilateration Java Algorithm
Another side question If I might ask, What unit of measure should I use for the distance when I'm calculating this? I though it would be the same result whatever distance unit I was using but It turned out the result vary a lot depending if I plug meter or kilometer...

Use android compass, accelerometer, and gyroscope to get current position

I'm new to android programing. I know how to get a position of a user in outdoor environment using GPS.
But i'm faced with a problem to find the location of a person inside a building where you don't have GPS available.
I can handle the coding part but i need an idea in how to use compass, accelerometer, and gyroscope data or any other sensor data except GPS to get the current position of the user inside the building after you pass the compass, accelerometer, and gyroscope data to the server. Here consider that the inside of the building is mapped.
Sorry if this is a stupid question.
It sounds like you intend to perform inertial navigation using accelerometer data based on the last good GPS fix. I think you'll find this is not feasible on a mobile phone. Accelerometers used in inertial navigation -- for example, in aircraft -- have to be extremely accurate and highly calibrated to minimize errors. Even then, all inertial systems drift over time. With the relatively low accuracy of a phone, these errors will accumulate quite rapidly and render your position solution unusable very quickly.
Without GPS, most phones can still give you a rough position estimate using cell-site multilateration. This is nowhere near as accurate as a GPS fix, but it's better than nothing.
See also this excellent discussion of indoor locationing (inertial navigation is mentioned there too):
Android accelerometer accuracy (Inertial navigation)
Indoor locationing is quite difficult, if not impossible today.
What works is mounting Low energy Blue Tooth "Beacons" at multiple places in the building,
and use that as info. (see ios Beacons) (But you have to manage that yourself, relation between beaconID and location inside bulding).
With compass, accelerometre and gyroscope you will not have (much) success:
In this Google Tech Talk video it is quite detailed explained why a gyro / accelerometer (relaive) navigation cannot work because the slight inaccuracies accumulate within 2 or 3 seconds so strong that you cannot use the result. This is cause by the double integration, see video at 23:30.
Private WLAN (inside your building) triangulation can work, but not inside an (limited) phone which does not give you the info which WLANs are vissible, at which strength.
What remains the already build it GSM-Cell or Wlan location in your smart phone for indoor usage.
There is one further approach:
Evaluating the magnet fields of an building.
This can work, and at least one company works on that, but you have to calibrate that for each building.
But this is more a reasearch topic, than a well known technic.
Further info
My Algorithm to Calculate Position of Smartphone - GPS and Sensors

calculate accumulated distance using GPS in android

I am a new user and is new to android programming.
I am trying to creating a android application that calculate distance a user traveled using a GPS. one of the examples I can think is like a treadmill where it shows the accumulated distance. except the user will be moving around and using a gps to see how long he walked/run.
i can activate a gps, using LocationManager and LocationListener to get a longitude and latitude. but i do not know how to go from there
all my research shows how to calculate distance traveled between 2 points, A to B in a line,shortest distance. but i wanted to have a real-time accumulated distance no matter in which direction the user is going. or how fast.
i do not understand how the logic/math behind the calculation so it is hard for me to come up with a solution. the get.DistanceTo and DistanceBetween also calculate distance in a linear line right?
i also heard something about a accelerometer to use with a GPS. but based on my research so far(not too in depth) it also shows a single location, but i also do not know how to calculate distance from there. or how does it works with GPS
does i have to use longitude and latitude or others?
i'm quite weak in programming but this is a task i have to complete. Thanks
The Google Distance Matrix API
Can't take credit for the answer, I got it from Another post
I would stick to the GPS data and not worry with the accelerometer. Then you would have to record the position in defined intervals and just add the distance to the last point every time you check. The closer you want to get to the real distance the more frequently you have to check. You could then make the interval dynamic e.g. check less often if you go faster.

Will J2ME Location Based API work without GPS

Will J2ME Location Based API work without GPS?can you gave me example ?
Depends on the device implementation!
On many devices you can specify the behaviour during accessing the Location API. (Nokia s40 lets you search for bluetooth gps devices e.g.)
If the location API is able to use data like cellID, LAC, ... (if you specify low accuracy criteria) depends on the device implementation and even if your operator lets you use those values. ( http://www.easywms.com/easywms/?q=en/node/3589 )
Many devices do have the API on board even if they are not equipped with gps functionality.
I believe it will work, but it will be less accurate because it has to use the cell towers to determine location, not GPS.
Well, the call will work, but how will it know where you are?
See the discussion at Oracle, which says:
"To discover the location of the
device, LBS must use real-time
positioning methods. Accuracy depends
on the method used."
In the United States, to provide semi-accurate tracking data for the 911 emergency system, all phones must be able to be located within a few hundred feet. It's done by triangulating distance from the nearest three or so towers.
GPS simply makes that (existing) data more accurate.

Categories

Resources