I'm building an app using Geofences, right now the minimum radius I can set so my geofence can get accurately detected is 30m. I want to be able to set a minimum radius of 5m.
In the Android Developers documentation about geofences says:
When indoor location is available, the accuracy range can be as small as 5 meters.
What does it mean with the indoor location? Is it something I should enable in the phone? I don't get it. Also I looked over internet and I know that the accuracy of a geofence is perform by the system and cannot get the Wifi RTT or anything else work with it.
What can anyone do to get a better accuracy for geofences?
Indoor location means using bluetooth beacons to determine a more exact location via triangulation. It only works in a predefined area as you need special hardware in the physical location. Getting it down to 5m outside would require GPS hardware more powerful than in the typical phone. The typical phone is accurate to only about 10m in the best case. What you wan't just isn't possible.
Related
Hi i know the working principle of GPS. After some R&D on the same, i have some doubts regarding the Global Positioning System
We all know that GPS can work without internet. But will the accuracy be correct in non-remote areas like Desert, mid-sea, dense forest?
I am in an idea to build an app that utilises, GPS in non-remote areas.
Will the GPS works in restricted areas? For example, in Countries border, ocean border and all?
There is a very good article about cell phone GPS accuracy from Community Health Maps. How Accurate is the GPS on my Smartphone? (Part 1 and Part 2)
In this article they explain cell phone A-GPS. The A stands for assisted, in which the phone downloads the GPS ephemeris (data about the GPS satellite constellation). Without data access the GPS may take several minutes to become accurate because the ephemeris would be downloaded from the GPS satellites.
The GPS system does not have border restrictions. It is space based a radio communication. If you have a good view of the sky and have good satellite geometry you can get good positional accuracy. Many new phones now use GNSS instead of GPS. This is US GPS plus Russian GLONASS and other systems. This helps by increasing the number of satellites available, and the GLONASS satellite system is better in high northern latitudes.
I am trying to get the user's speed from their Android device, but which is the most reliable way to do it?
There is the location.getSpeed() function that uses GPS; is this a reliable way to obtain the speed? Should I instead calculate speed manually using GPS coordinates obtained? Or is there another way that I'm missing to accomplish this?
IMO, best current approach on Android is to use Location.getSpeed() along with the Google Services Location API and the fused location provider. Then, reality-check this value against Google Play Services Activity Recognition.
The fused location provider integrates some other on-board sensors to tweak location data, which is better than GPS alone. Then, check the ActivityRecognition.getMostProbableActivity() method. If the DetectedActivity is type STILL, your true speed is probably equal to 0. If its ON_FOOT, it's probably a low speed (e.g., 1 m/s). If its ON_BICYCLE or IN_VEHICLE, you're probably fine relying on the speed output obtained directly from Location.getSpeed(). You'll also want to check the DetectedActivity.getConfidence() value too, and set your own threshold for a confidence level you feed "confident" with :) when relying on these values.
I'd also definitely suggest that you do NOT simply average sequential positions to get an average speed between two position (if you do this, it needs to be an average over a large number of positions). In my benchmarking on mobile devices (see my dissertation here, pages 105-106, and 137-138 especially), I've found instantaneous speed calculated by the GPS subsystem (which is typically based off of the Doppler shift of GPS carrier signals) to be far more accurate than the positions derived from GPS. 95th percentile of speed observed while stationary indoors (using assisted GPS only, no sensor fusion) was 1 m/s on a Sanyo Pro 200 I tested. I was able to filter out a significant number of position outliers using speed data (see page 137-138) in some intelligent energy management techniques I was evaluating. With sensor fusion, and activity recognition to help filter outliers, accuracy should be better than this on a similar device.
Finally, and I can't emphasis this enough, do you own testing on real devices, as many as you can get a hold off, and preferably the most popular models out there. Android has a variety of OEMs putting out devices, which will all have their eccentricities. Your best bet it to create a solution that targets the most popular models, acknowledging that it's unrealistic to get a solution working perfectly on all models.
It seems that the getSpeed() method is not always reliable, especially at low speed and when gps coverage is not optimal.
You can have a look at this question and this one which are both about alternatives for getSpeed().
The android developper page however says that you'll get better performance by using the Google Location API.
So it appears that the choice is depending on the usage of your app: if you target slow displacement in area with poor gps coverage (walking in the wood), use your own implementation. Fast in area with good GPS coverage, use the Google Location API.
The best way for devices that are moving faster than walking speed, is to use directly the location.getSpeed().
For pedestrian, or other slow speed situations, this is not quite easy, maybe it is simply impossible to have a valid slow speed that is valid at the moment.
Some try to evaluate the history and do an averaging, or threshold based approach, this will improve for a specific application / usage.
But the simplest is to design your App to ignore low speeds.
Some links related to speed:
GPS position correction
Smooth GPS data
How to calculate speed without requiring GPS? I have heard of something called "sensor technology" but am not sure what that means. I am asking because I want to make an app, but I don't think it is battery efficient to use GPS, plus it is for a long-term project so I want the app to continuously run without having to manually turn it on or turn on GPS.
GPS is by far the most accurate way to do this.
You can get access to the accelerometers, but they are not remotely accurate enough for this type of application.
The only other way I can think of would be to get one of those bluetooth adapters that you plug into your car's diagnostic port, and get the speedometer input from there. Then, you're wasting power on bluetooth as well.
Just buy a power adapter for your phone to run on the vehicle.
I tried to measure the speed using Android's accelerometer sensor for an indoor-navigation project but that failed miserably. I intented to derive the current speed from the acceleration/deceleration over time and so in the end calculate movements along the X, Y and Z-axis, but that didn't work out at all. The accelerometer sensors of common Android devices are way too inaccurate for that kind of usage.
So, you will have to use GPS. To reduce battery drain, you can increase the intervals (time and/or distance) in which the LocationManager notifies your App. See the minTime and minDistance parameters of it's requestLocationUpdates() method.
Android allows you to use cellular phone antennas and wi-fi access point antennas as reference points to determine your current location without using the GPS (see: locationManager.NETWORK_PROVIDER).
Once determined your position in two different moments/points you can easily calculate your speed in your code.
I don't think one can calculate speed without the assistance of GPS. Speed depends on distance and time. I am not sure if we can calculate distance just like that.
Anyway look at http://developer.android.com/reference/android/hardware/Sensor.html
There we have different sensor types. Perhaps you can make use of one of those.
I think what you are referring to would be considered "dead reckoning" (http://en.wikipedia.org/wiki/Dead_reckoning) and is possible, but will lead to drift and incorrect speed information, especially if the user of your app doesn't have the device mounted securely to whatever is moving.
Would it be a valid use case for your app to go to sleep and turn off the GPS? You might be able to devise a way to turn the GPS back on when you bring the app out of suspension. If you need the location always, then GPS is your best bet. People understand that GPS based apps require power and will come up with a way to plug it in to use it long term.
Perhaps you should think about the use cases for your app and ask if people are willing to drain their battery power for whatever functionality you will offer.
Using acceleration and time you can calculate change in velocity but you don't necessarily know the starting velocity. Plus the accelerometer in an iPhone probably isn't accurate enough for this anyway, but it's not a bad shout.
What is the best way to detect user device moving? For now I'm using network/GPS location determining best coordinates on small interval. But it would be great to improve accuracy user movement information up to meters. Geolocation strongly depends on network connection quality or weather.. Is there a way to find very accurate info about device moving? May be accelerometer can help?
Accelerometers tend to be a poor way to measure distance moved, as the slightest error in the measurement of acceleration or orientation rapidly integrates to a substantial position error. That's even more true with low-accuracy components used in a consumer device - inertial navigation systems used in aircraft/spacecraft are not cheap, and even those might not be accurate enough for your needs.
If you want positioning accuracy, especially over any duration of time, you need to measure in relation to the outside world, as GPS does. There are various beacon systems available using things like ultrasonics, or even adding pretend satellites to the GPS system which you could look into, but it's not going to be simple.
I'm creating an application that needs to be very accurate such that when an individual is walking past a certain building, it will provide them with information regarding that building. I was wondering could this be accurate enough using the Android Location API? What technical challenges should I consider?
Edit: I am using a HTC Sensation XE although i'm not sure what chip it uses for GPS
There are multiple variable factors here:
1. GPS hardware itself.
2. Even if the GPS hardware is good,you cannot assume to have very good accuracy since GPS works on "Line of sight"...so if there is lots of trees/high buildings/or anything that could possibly cover the satellite from the GPS receiver would decrease the accuracy of the location determined
3.Time and location---Not all GPS satellites are available in all places at all times...and the accuracy depends on the number of available satellites currently above the user in the sky(to say in lay man terms).
4.The speed of the user.This is more to do with the polling time rather than the GPS accuracy,If say the user is moving in a high speed train,it practically becomes impossible to exactly poll the GPS for the location at that required time thus missing the building.
You might want to understand on how GPS works and this is more of a GPS technology limtation rather than Androids.
Cheers.
Basically the answer depends on your GPS hardware. However, do not expect accuracy of a few meters.
See here for a similar question and some aspects for accuracy: https://stackoverflow.com/a/8852790/1127492
According to this question, accuracy of Android phones' GPS can vary from around 5 to 50 meters, but it mostly depends on the performance of the GPS chips, which has nothing to do with the OS per se.
According to the location API doc, you can also try to use the cell towers and wi-fi hotspot for location, but this will typically be even less precise.