I’m interested in finding out how well can a smartphone be oriented in a building based on the wifi strength in certain locations.
Wifi is becoming ubiquitous, at least in the western world, and if you own a smartphone you most likely have at least one wifi hub near you almost at all times. Your neighbors are very likely to own one as well, and so you have a lot of wifi spots at varying degrees of reception and quality.
If iOS and Android would allow access to very raw data from wifi signals at live speed, developers could come up with algorithm to normalize and analyze the data to get a pretty solid idea of where the object is in a given space. It’s true that just by turning the phone sideways can give out a different signal strength readout, but it could be corrected manually at first and then use the data collected by correcting manually and applying it to a more generic patter that would yield high level of accuracy in the long run.
This could have a lot of applications, for example an app that recognized that you are moving from the kitchen to the living room and will automatically switch to a remote control mode that will allow you to control the TV and whatnot. Move to the bedroom, and completely change the profile to go into silent mode and display a clock as the screensaver.
Is this possible with current APIs? if not, what is needed to be able to get that kind of data and how hard it can be to analyze it and normalize it to make that accurate to distinguish between rooms?
Clarifications:
- I am not an engineer or a mathematician, more like UI/UX designer/developer (JS mainly)
- I am asking if this is possible with current API and whether it’s theoretically possible if current APIs don’t support it at the moment
Yes, this is indeed a solvable problem provided you make a few assumptions.
Android OS has the functionality you would need to be able to analyze dBm of signals from Access Points (for those devs interested, see BroadcastReceiver and the SCAN_RESULTS_AVAILABLE_ACTION intent on WifiManager).
As the signal travels away from the AP, the signal degrades at a quantifiable rate. Given you know the signal strength when the signal leaves the AP(spec’s on the box) and when it arrives at your device, you could then come up with a distance the signal must have traveled to degrade as much as it had.
This is where assumptions come into play. Anything between you and the AP has an effect on signal degradation, so if you were in, say your living room, and there were two walls between you and your access point the signal would arrive in a different state then if you were then to take a sledge hammer and smash down the two walls between you and the AP and then took a measurement. It’s best to only use this in a place where there is nothing blocking the path between you and the AP.
Also, you need at least 3 AP’s to arrive at a single point in 2D space. Most people I know don’t have 3 AP’s set up in their house so you would need to ask your neighbor for the lat/long location of their AP’s as well.
All in all, a solvable problem but wouldn’t necessarily work well in the context of your home, unless you were to include additional sensory data (3-D Map of your house, redundant AP’s, accelerometer, GPS, etc) to come up with a solution.