magodiez
magodiez

Reputation: 741

Calculate the relative position of another nearby Android phone

I'm trying to figure out what is the best way to determine the relative position of another Android phone (it's position compared to mine). The phones will be in a WifiP2P range, so they can communicate with each other. I want it to be offline, if possible. I've thought a couple possible solutions:

Solution 1:

Use GPS in both devices, and compare it.

Problems:

Solution 2:

Calculate my relative position depending in the WifiP2P signal strength.

Problems:

Any thoughts about this or any other possible solutions?

If there is not a "good" solution off-line, what would you suggest online? Would the Network Location Provider have the same (or similar) error on nearby devices?

Upvotes: 2

Views: 4309

Answers (3)

Blitz
Blitz

Reputation: 186

You can try to use the Bluetooth. You measure the RSSI of the surroundings devices. The theoretical relationship between RSSI and distance is something like this: RSSI[dbm] = −(10n log10(d) − A) where d is the distance and A is the offset which is the measured RSSI 1 meter point away from the BLE device. Simply google for "RSSI[dbm] = −(10n log10(d) − A)" and you will find some sources about it. Having the distances from the other devices, you can use the Multidimensional Scaling algorithm to have the relative position. Here is the library: http://algo.uni-konstanz.de/software/mdsj/

Upvotes: 1

Erhannis
Erhannis

Reputation: 4464

Another idea (that I may try to implement, myself) would be to have the phones use sound (ultrasonic or something) to calculate the distance of the other. With several phones, coordinated properly, you'd theoretically be able to figure out where each of them is, relative to the others.

Upvotes: -1

Julian Higginson
Julian Higginson

Reputation: 547

GPS error seen in a local area is actually almost exactly the same, if you have two proper GPS receivers tracking 8 or more satellites.. the idea is that each GPS satellite signal received has an error associated with it due to atmospheric conditions, so if you have a receiver setup at one position you know, you can calculate the signal timing differences from what they should be to give the known position, and send those as corrections to a mobile GPS receiver for accurate mobile positioning within 50cm or so (horizontal, 1m or so vertical)

This is how RTCM beacons work for coastal GPS corrections. - But that said, phone GPS chip doesn't get that much satellite data, and so often depends on limited satellite reception, boosted by data over network corrections as well as network level positioning to help seed the calculation... this isn't so repeatable phone to phone, and would be dependent on what each phone was seeing, as well as the network they were using.

WIFI signal strength will change with signal reflections and disturbances in the area more than actual point to point distance.

I think you've got yourself a very hard problem to solve. have fun!

Upvotes: 2

Related Questions