Question

Am stuck on solving this problem. Say I have 2 ipads placed as shown in the figure. How does iPad 1 (one on left) know that iPad 2 (one on right) is to its right? Can I find this relative positioning?

Any change in relative positions of the 2 iPads should be communicated amongst them in real-time. To simplify matters I am only interested in 2D space (i.e. x,y)

I tried using GPS but it is not accurate enough. What sensor signal is appropriate here? Or should I consider a mix of multiple sensor signals? If so how?

Any related ideas are welcome.

enter image description here

Was it helpful?

Solution

This is a long shot, but it might just work!

Examining my iPad2, I notice that the microphone is in the middle at the top and the speaker is on the bottom right. This means the distance from the left iPad's speaker to the right iPad's microphone is smaller than the distance from the right iPad's speaker to the left iPad's microphone.

Playing a sound (potentially an inaudible high-frequency sound) from one iPad and listening for it on the other, then telling the first iPad over the network that the sound was heard will give you a round-trip time. Performing this the other way around will give you another round-trip time. Doing this a number of times will give you average round-trip times from each iPad, which should statistically minimize the effects of any fluctuations in network/Bluetooth latency.

The iPad with the shortest round-trip time is the one on the left. Of course if the iPads are different models and the microphone/speakers are located in different places this will need to be taken into account. It could get pretty complicated, but it might work :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top