After the first reading of your question, I was on the assumption that you had in mind the distance to the access point. After I wrote about this, I realized that you can say something. If this is what you mean, keep reading ...
Given your configuration:
- one fixed receiver (your phone should not be fixed, but it is effectively fixed if you are looking for instant measurements).
- one fixed base station (access point)
- omnidirectional antenna on the receiver
- 802.11 b / g protocol
It's impossible. Even if you work at PHY level, it is impossible to solve. To make it a little more doable, you need to triangulate your receiver's position relative to two (but preferably larger) base stations. Even then, it is still a difficult problem. Radio waves travel at the speed of light, so using relay methods to measure the propagation delay of a signal in the opposite direction does not give good accuracy (receivers must work very fast, and then multipath problems ...). Again, all of this assumes that you are basically creating your own RF equipment, which you obviously are not going to do for the iPhone.
It’s best to track the location of the base station to capture the strength of the Wi-Fi signal when changing the position of the phone. By “changing position,” you essentially have to make your way around the area. With some good heuristics and reliability to handle signal degradation associated with distance, you can achieve decent accuracy (probably around 10 meters).
source share