# Solution 1 :

No, you can’t- you don’t get enough data. Let’s say you have 2 phones A and B. A can broadcast a message over bluetooth (this works the same for any other radio type, including wifi). The receiver B can determine it’s strength when it receives it. From that and knowing how strong it was when sent, it can know its approximate distance. So you don’t know what direction A is, but you know how far he is. And that’s all you can get. So you know B is in a circlearound A (this isn’t 100% accurate as due to signal noise you’re actually in a 2d- ring, but lets assume a perfect world here).

Now imagine A is at a fixed point. Now lets add in phone C, at another fixed point. If you got a message from A and from C and did the same signal strength math, you now B’s distance from A and C. Two circles, one around A and C. B will need to be at one of the crossing points- there will be 2 of them. You don’t know which.

Now add in D. You now have 3 circles. All 3 will cross at only 1 point. That’s B’s location. It takes 3 fixed points to find someone. In museums and other indoor places that do location tracking, you’ll see dozens of bluetooth beacons, each with their own id, and you triangulate based on which ones you can see at all and which are closest.

That’s finding your location relative to fixed points. With non-fixed points, to find someone you’d need to become the 3 points yourself. Imagine B stands still. A can make a reading. Then he can move 10 feet away. Take another reading. Move 10 feet away (not all in one line). Now you have 3 readings and can figure out where B is using the same math as above. Please note that to use this, you have to know very accurately exactly how far and in what directions you moved between the 3 points. If you don’t, you won’t get any accuracy. It doesn’t matter what direction you moved, but you need to know that and the distance exactly.

Now if B is moving, that math will be off. But given the short distances involved it would probably be close enough to find them.

(all this assumes elevation isn’t invloved, if it is you need more points).

Now if you’re willing to take a hardware based answer- if you have something on the phone that can block the bluetooth signal and you can adjust physically you could get directionality by blocking it to all but a 30 degree cone, trying to read the signal, and moving the blocker until you can. Then you know the direction to within 30 degrees and the distance. But my guess is you’re not willing to have them carry lead phone cases ðŸ™‚

# Problem :

I want to determine the location or the direction of a phone in relation to another phone using wifi or Bluetooth since GPS is not accurate enough indoors. Is this possible? I have tried googling it, but I have not been able to find a sufficient answer.

Thank you for your help!

# Comments

### Comment posted by Kaan

It does not seem possible to use wifi or bluetooth to determine location. Wifi doesn’t provide anything about location or position of a device (assuming a single wifi router), at best you could get signal strength and try to extrapolate something from there. Bluetooth is similar, you could perhaps check signal strength or measure timing between devices. But interior walls, or human hands holding a device, or appliances, or any number of things make either approach seem unlikely to be useful.