2

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:

  • Can I use GPS offline?
  • If two devices are in nearby area, is the GPS error going to be the same (or similar)?
  • Will this give problems indoors?

Solution 2:

Calculate my relative position depending in the WifiP2P signal strength.

Problems:

  • How can I calculate this relative position? (thought about something like triangulation but moving the phone to get the 3 or more different signals)
  • Is there a getRssi() function for the WifiP2P (I haven't found one)?
  • I might need to check for the other device movement too.
  • I've read that calculating your position changes with the accelerometer is not very accurate.

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
magodiez
  • 741
  • 2
  • 10
  • 23

3 Answers3

2

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!

Julian Higginson
  • 547
  • 4
  • 12
1

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/

Blitz
  • 186
  • 1
  • 9
-1

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.

Erhannis
  • 4,256
  • 4
  • 34
  • 48