How to get the distance of our mobile device from a wifi hotspot kept inside a building? This is basically for navigational purposes inside the building.. Any help would be appreciated.
If you want to use WiFi for indoor location (step 1 before navigation), then distance to the WiFi Access Points is not the correct approach. Instead use RSSI.
With Android you would need to take WiFi fingerprint of a building by moving around every few meters and sample the RSSI strength. You need to provide a user interface that lets the user manually specify on an image of the building (e.g. a CAD drawing). Doing this will build up a database of what the RSSI is for different locations in the building. When you come to use this data for locating a user indoors, then you need an app to take the RSSI strength measurement and compare it against the database you've prepared to find the appropriate match.
Notes:
- If anyone adds/removes access points, you'll need to resample the building
- The measurements can be affected by density of people
- Some access points are variable strength access points, so the RSSI fingerprint is not consistent.
- This won't work with iPhone because there is no API to get the RSSI strength.
So, it is a useful, but not perfect way to get indoor location. There are a lot of more detailed articles on RSSI fingerprinting available.
Of course, navigation has to be built on to of that then.
Hi Kris
I understood what you are asking, The distance between Wifi access point and the Receiver, correct ? If yes, then it seem to be not possible after watching the discussion below.
Click here to see
Related
i'm looking for the best way to implement a road navigator that gets the velocity, distance between 2 points using the smartphones techniques.
through my searches i found 2 different tech. using either the accelerometer or android API (android.Location).
some opinions said that using accelerometer wont give me an accurate results because there will be so much noises as a bumpy roads, buildings...etc and calculations will be so complex.
on the other hand using the Android API (android.Location) means i should always be connected to the GPS, doesn't that affect on the battery?!! and as i found i can't open the GPS by myself i used always ask the user for a permission(so boring). and is there an limitation
So kindly help to take a decision, is it useful to be connected 24 hours on GPS in order to update the device location.. or to use the accelerometer??
You definitely should use GPS. The battery will be strained but you get much more accurate result. Sensor should be used only when GPS is not available and for a short distance.
Using GPS you can call location.hasSpeed() and if positive call location.getSpeed() together with getBearing() will give you the velocity.
I want to create application which will navigate user at the shopping mall. So, I'll create a mall's map and I need somehow to track changes of user's location. Because of navigation in building, GPS is not a solution (low signal). So, I assume there is a way to track location changing (1-2 meters) with another module (maybe accelerometer?). Any ideas?
Thanks
Update: I cannot use any additional devices such as iBeacons or so. I only can use device on which app is running. No access to wi-fi routers or so.
Example: I'm standing near Apple store(point A), and now I'm going to Samsung store(point B). The app should react that I started to move from point A, and know how much meters(accuracy may be not ideal) I walk from point A and in what side I'm going (east, west, south, north).
iBeacons have bean invented for your task, they are low energy blue tooth devices which emits an unique ID, and If I remeber correctly, also the distance to that beacon.
iBeacons have been invented by or for Apple. So you have to search for an alternative which works on Android.
ibeacons are mounted at the walls of the shop.
Update:
Things you can do:
Count foot steps using accelrometer, like apple does in an API.
Theoretically you could use the built in compass, but practically it has to calibrated each time it is used (this is anoying, and useres will not do it).
You can get to decimeter accuracy using magnet field analysis of the shop and the 3-d magnetic sensor of the smartphone. This works in research (indoor navigation using magnetic fields) But you have to create a magnetic map of each shop to make it work.
for WLAN:
You need at least 3 different wlan routers in the shop. Usually they will only have one.
1-2 m accuracy you will not get with wlan.
(On ios it is not possible to read the wlan device ids nearby, hopefully you can do that in android)
iBeacons or similar devices mounted in the shop at strategic placesw,
are the only feasible technology which you will get to work.
There is an open source Android app for tracking location without GPS. It uses TYPE_STEP_DETECTOR sensor available from API level 19.
You can download it from Google Play and source code is available on GitHub.
The app is not very accurate because it uses average step length. It can be improved if we allow user to specify or calculate automatically his personal step length.
I stumbled across a website that apparently allows users to work out how far the nearest mobile phone masts are. Is there a method of working out this distance hard-coded in android? (Or does anyone have any suggestions of how to complete this?)
One solution could be to disable GPS positionning and enable only cell positionning. I doubt there any triangulation of positionning in that case and the device geo fix will be the one of the closest mast. After that, you use GPS on and get real position and calculate the distance using euler distances.
In GSM the distance from the mobile station to the active cell tower is one of the main parameters of the connection. It is called Timing Advance (TA).
Note, the active mast is usually the nearest, but not always.
The TA value is normally between 0 and 63, with each step representing an advance of one bit period (approximately 3.69 microseconds). With radio waves travelling at about 300,000,000 metres per second (that is 300 metres per microsecond), one TA step then represents a change in round-trip distance (twice the propagation range) of about 1,100 metres. This means that the TA value changes for each 550-metre change in the range between a mobile and the base station.
That is the distance to the current tower is always known to the mobile station to 550 meters accuracy.
This parameter should be easily accessible via standard Android API.
This is an old question, but recent developments in cell-tower databases carrying this info can be found on Wikipedia including a long list of publicly or free databases of cell-towers around the world.
After further research I eventually came up with this conclusion:
In the United Kingdom it is now possible to download the dataset provided by Ofcom's Sitefinder Website containing information of over 140,000 mobile masts in the UK that can be manipulated to locate Mobile Phone masts.
This does not answer the question of whether it is possible programmatically in Android but does, at least, provide another feasible option for developers working on similar projects within the UK.
I want to develop an application in which I need to know the position of my device within a building (the room in which the device currently is). GPS is not working in the building. Is there any way to find the position of the device in building? If yes how? Can i use position or motion sensors or combination of these for this purpose?
There is no general solution. In case you can place WiFi hotspots/repeaters in the building (preferably in every room), you can triangulate the position from the WiFi signal strengths. But that's also not straightforward, because of different signal losses through the walls and floors. You'll need to survey the building and make a signal strength map in advance and then, based on the signals you receive, look up your location on the map.
Motion sensors are also not precise enough and compass, if you are inside a steel construction, is inaccurate, too.
You can try using the Network to locate the user. If the signal is strong enough, it should return a decent location fix, though not as accurate as GPS
Unfortunately there is no easy solution. Network location is out of the question, since it is not precise enough to show buildings, not even mentioning rooms.
The only way I could think of for this to work is to use external sensors in building and somehow connect them with the device.
I am developing a project that is intended to use the GPS capabilities of an Android phone and a nearby station to compute positioning to a much more precise degree (cm), using RTK DGPS technology.
So far, I haven't been able to see anyone saying they actually managed to perform a similar task (apart from #GPSmaster, who doesn't explain how), and the APK doesn't seem to offer any information from the GPS chip other than location and NMEA message updates. I need, if possible, pseudo-ranges and carrier phases.
I was wondering if:
It would be possible to look for lower level hooks on my phone using native code, or other lower level snooping;
It would be possible to send RTCM corrections to the GPS chip present on one of these devices;
Any ideas?
Generally speaking DGPS is a technique that improves real position accuracy by canceling out most of the atmospheric effects on the GPS signal. In a typical direct GPS measurement there is about a random error in the ranges computed to the satellites due to atmospheric effects. This is why a GPS receiver that is left collecting data in a fixed location will seem to wander with in an error ellipse. For two receiver stations in the same area the atmospheric effects are almost identical and they will wander in parallel within their similarly sized and oriented error ellipses. If one of the two receivers is at a know location then the differences in their apparent GPS locations can be taken and plotted from the true location of the known station to find the true location of the unknown station.
Back in the day (circa 1992) when we had to accomplish DGPS by "post processing" we used to take the raw NEMA data collected at the two stations match up the times, compute the baseline vector and apply it to the known point to find the unknown point. I think the NEMA data we were using was only recorded to the nearest 10 sec. The math isn't really that hard.
I suspect that NEMA GPS messages [http://developer.android.com/reference/android/location/GpsStatus.NmeaListener.html ] from a tablet at a known point (with a clear sky view) could probably be sent over an internet socket to a smart phone (also with a clear sky view), which could then compute the difference and achieve a sub-meter relative location over a distance of few km, even if the assumed Internet transit times were ignored. This technique would probably still work even if the tablet and smart phone were both applying broadcast DGPS adjustments.
With the andvent of Android 7.1, the raw data from GPS chips will be available to developers. (http://gpsworld.com/google-to-provide-raw-gnss-measurements/)
Others seem to have done something similar to what you wish to accomplish (http://gpsworld.com/innovation-precise-positioning-using-raw-gps-measurements-from-android-smartphones/)
No, it is not practical to get any lower level access to the GPS device by an Android application. This has several reasons:
The application has no other means of accessing the GPS device as through the Java based API. Native code is forbidden to use most devices and usually needs a Java wrapper to tunnel through the sandbox for Android sensor devices. This makes up the main security concept.
If native code would have access to the GPS device on a lower level, it would have to cope with several different manufacturers protocols now not abstracted by the API. Best chances are to get access to custom NMEA codes, which may still have device dependent caveats.
Even if lower level access would be possible, one loses the integrated merging of other location sources like WLAN and cellphone carrier, that are presumably merged in native code below the Java API but above the NMEA protocol.
You can use DGPS corrections in Europe via custom application for SISnet receiving correction signals from EGNOS augmentation satellites(http://egnos-portal.gsa.europa.eu/news/egnos-gets-invite-your-smartphone-11). It does however need a subscription (which isn't really open to public yet) to SISnet to obtain username and password for connection to their servers. There's some of SDK published which you may find useful. Just remember that you are limited to C/A signals only (pseudoranges) and you CANNOT get phase data (L1/L2) from those cheap chips inside smartphones.You'd need a precision GNSS receiver such as Trimble BD910 (http://www.trimble.com/gnss-inertial/bd910.aspx?dtID=overview) to be able to access L1 carrier phase signal for GPS & GLONASS. There are however cheaper chips that support SBAS but none are yet installed natively in phones.
Umm. Your android probably has such a crap GPS antenna that achieving cm accuracy is impossible. Maybe if you average the position for days.. usually DGPS support is not published and not many chipsets support it. Last time I saw DGPS implemented it involved hacking the actual GPS chip firmware to add support. Even getting A-GPS to work on a random chipset is iffy since they might not support a documented way of feeding the assistance data.
It should be related with the hardware implementation , rather than the software implementation.
In the reality, GPS is usually accompanied with Wi-Fi or 3G to assist in searching the current position.
RTCM correction can be sent to your android phone using NTRIP 'provider'. Then you need to apply it to your raw GPS in your android.