[Out of the box thinking is needed] - find a way to tell the layout of multiple smartphones?

POMPOM Member Posts: 2,599

Hey Guys,
I know I'm not active, but i still visit here on a weekly basis :)
My next game is right around the corner i really hope you'll like it, i will post about it soon.

Now to the topic, i have this small side-project I'm working on, and this issue thwarted me.
Maybe one of you will come up with an original solution:
Say we have 3 (or more) smartphones on the table, is there a way you can think of to programatically tell their layout, that is which is on the left, middle and right?
That is without forcing the user to mention which is where.

Any direction or idea will be greatly appreciated!

Roy.

Comments

  • ArmellineArmelline Member, PRO Posts: 5,358

    I can't see how this would be possible. I'm going to be super-impressed if someone comes up with a method.

    I assume by "without forcing the user to mention which is where" that you exclude any moving of the phones, too. So no having the user put them in order, or stack them in such a way the accelerometer could be used?

  • POMPOM Member Posts: 2,599

    @Armelline
    If it was easy it was not an open question :)
    The idea is a static (non dynamic) situation of the phone, you line them up on the table, and now they need to figure out their order.

    Think Bluetooth, think wifi, think sending/receiving data, timestamps, graphs..
    Anything you can come up with :)

    If eventually I'll have no solution then I'm gonna have to turn to manual ordering, but haven't gave up just yet!

    Roy.

  • ArmellineArmelline Member, PRO Posts: 5,358

    Oh, so you're allowing non-GS functions? That's a whole different question and I should have paid attention to the forum you posted in :D I'd said impossible, not difficult, so ease wouldn't come into it :P But if you're having access to all the features of the phone, then that changes things!

    With no knowledge of how this would be achieved, you'd potentially be able to do it if something like bluetooth signal strength is accurate enough. See how far A is from B, how far C is from B, how far A is from C. Same kind of principle could be used with a sound and the microphone, I would imagine.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Could you somehow gather GPS data from each phone and compare locations? Not sure if GPS is accurate enough though...

  • POMPOM Member Posts: 2,599

    @jamie_c
    Thank you for the reply :)
    I've tried that.. Im afraid it's not accurate enough

    Roy.

  • POMPOM Member Posts: 2,599

    @The_Gamesalad_Guru
    You got my attention.. I'm listening

  • tmanntmann Member Posts: 278

    @The_Gamesalad_Guru said:
    use the compass.

    smart :)

  • MantoManto Member Posts: 796

    Looks like magnetometer could be accurate enough to detect if there is a phone on the right side of another.

    image
    image

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @POM said:
    @The_Gamesalad_Guru
    You got my attention.. I'm listening

    Not sure how far the decimal places go but each should be in a slightly different position of degrees relative to magnetic north.

  • POMPOM Member Posts: 2,599

    Nice direction with the magnetometer, definitely going to test it.

    Also I came across the app FireChat, pretty impressive stuff they did there, it uses peer to peer wifi/Bluetooth to bounce messages between phones with the app, I wonder if I can create a grid of say up to 8 phones and bounce pings between them and use the MIN time it took to arrive to the destination to conclude relative positions...

    Roy.

  • LumpAppsLumpApps Member Posts: 2,881
    edited June 2016

    Thinking out of the box and not knowing if it's possible at all and maybe a last resort to try.

    Let one phone make a sound and the others record. The recording is in stereo so have the channels (left and right) checked which side is the loudest.

    Maybe use a specific frequency so background noises don't interfere.

  • POMPOM Member Posts: 2,599

    @LumpApps
    Indeed interesting if such implementation can work out, will give it a try

  • LumpAppsLumpApps Member Posts: 2,881

    Cool, let me know if it works or not. Watsja working on? Super-secret? In one of the other good GDK's out there?

  • POMPOM Member Posts: 2,599

    @LumpApps
    I have 2 projects in the works, one is a game I've been working on for about a year now, and i believe I can reveal some teasers soon.
    The other one is this crazy idea I had about 2 years ago (this thread is about it) but didn't had the knowledge to even start thinking of how to implement it, it's super-secret for now, but If I get progress soon I can reveal some information about it, finger crossed that it's even possible to do, the problem I mentioned here is just one of the blockers I have for this project, but one problem at a time :)

    Roy.

  • SocksSocks London, UK.Member Posts: 12,822

    @LumpApps said:
    Let one phone make a sound and the others record.

    How would the phone that produces the sound be chosen ?

    @LumpApps said:
    The recording is in stereo so have the channels (left and right) checked which side is the loudest.

    How would the recording device be able to distinguish the left and right channels of the source signal (the source signal will be summed by the recorder).

  • LumpAppsLumpApps Member Posts: 2,881

    @Socks Via a server command? So multiple phones listen to a server and one gets the command to make a sound and the others to listen.

    Recognising left or right is easy. If the device records stereo. Then you have 2 channels and it does know which is left or right. It records left and right and when plays that sound it outputs left and right. What do you mean with summed?

  • SocksSocks London, UK.Member Posts: 12,822

    @LumpApps said:
    @Socks Via a server command? So multiple phones listen to a server and one gets the command to make a sound and the others to listen.

    Ah ! Clever stuff ! Good thinking.

    @LumpApps said:
    Recognising left or right is easy. If the device records stereo. Then you have 2 channels and it does know which is left or right. It records left and right and when plays that sound it outputs left and right. What do you mean with summed?

    If a stereo sound source has sound X in the left channel and sound Y in the right channel - and this sound source is played through stereo speakers and simultaneously recorded by a stereo microphone the resultant recording will have sound X and sound Y in both channels - I was trying to work out how you'd be able to tell which is which.

  • LumpAppsLumpApps Member Posts: 2,881

    @socks, there is just one sound. The detection would happen because the left microphone is slightly further away then the right if the noisy phone is on the right of the recording one. This would give a difference in both time (delay between left and right) and amplitude of the sound.

    @POM next to amplitude you could also look at the delay between left and right. It would be minimal but maybe it is possible. I'm pretty sure testing out different pitches might make a difference.

  • POMPOM Member Posts: 2,599

    LIKE

  • tmanntmann Member Posts: 278

    @LumpApps said:
    Thinking out of the box and not knowing if it's possible at all and maybe a last resort to try.

    Let one phone make a sound and the others record. The recording is in stereo so have the channels (left and right) checked which side is the loudest.

    Maybe use a specific frequency so background noises don't interfere.

    Very clever old school analogue style thinking - taking the problem into and then solving by the physical realm... love it

  • zweg25zweg25 Member Posts: 738

    Each phone stores it's current longitude and latitude, which I believe is 13 decimal places. At the 8th decimal place I believe it is accurate to millimeters. You could just use that and figure out which phone has a smaller longitude (assuming both phones are facing North) to see which one is on the right.

    This way has room for error, but it is rather simple to access

  • POMPOM Member Posts: 2,599

    Hey @zweg25
    Thanks for helping out!
    The problem with GPS is the signal once you go indoors.
    Also, I'm impressed with the accuracy you mentioned, as far as I'm aware, a typical smartphone with a GPS receiver will achieve an accuracy of 1-5 meters.. But that's just from what I read online.

    Roy.

  • SocksSocks London, UK.Member Posts: 12,822

    @LumpApps said:
    @socks, there is just one sound. The detection would happen because the left microphone is slightly further away then the right if the noisy phone is on the right of the recording one.

    I see, I thought you were using a stereo source and seeing which channel was attenuted, but it all makes sense now !

  • pHghostpHghost London, UKMember Posts: 2,342

    @POM

    Another idea using sound:

    As with @LumpApps you would use a server to have one of the phones to ping with a sound, then you would listen for the sound on all the other phones, recording the amount of time it took to reach each of them. From this you would get a simple 'absolute distance' map. Once all of them would record their time, you would have a second phone ping (the one with the lowest recorded time) and again record the time on all the phones. Next, a third phone (the one with the lowest recorded time, excluding all the ones that rang already). You would continue until you could calculate all their positions by triangulation.

    This method should work even if the phones were randomly strewn on a table, they wouldn't need to be in a line, which I'm not sure would be the case with @LumpApps' method. It should actually even work in 3D space, not just on a flat surface (though of course, there you start running into problems with how different materials conduct sound.

  • MantoManto Member Posts: 796

    @pHghost said:
    @POM

    Another idea using sound:

    As with @LumpApps you would use a server to have one of the phones to ping with a sound, then you would listen for the sound on all the other phones, recording the amount of time it took to reach each of them. From this you would get a simple 'absolute distance' map. Once all of them would record their time, you would have a second phone ping (the one with the lowest recorded time) and again record the time on all the phones. Next, a third phone (the one with the lowest recorded time, excluding all the ones that rang already). You would continue until you could calculate all their positions by triangulation.

    This method should work even if the phones were randomly strewn on a table, they wouldn't need to be in a line, which I'm not sure would be the case with @LumpApps' method. It should actually even work in 3D space, not just on a flat surface (though of course, there you start running into problems with how different materials conduct sound.

    But if the phones are in a line how do you know which phone is the left one and which is the right one?

  • SocksSocks London, UK.Member Posts: 12,822

    Another idea, have each phone take a photo (with the front facing camera) and compare the images for offset, even if the image is a ceiling most of the time there should be sufficient detail to find a common reference point.

  • SocksSocks London, UK.Member Posts: 12,822

    @Manto said:
    But if the phones are in a line how do you know which phone is the left one and which is the right one?

    Check their foreign policy views.

  • LumpAppsLumpApps Member Posts: 2,881

    @Socks said:
    Another idea, have each phone take a photo (with the front facing camera) and compare the images for offset, even if the image is a ceiling most of the time there should be sufficient detail to find a common reference point.

    If possible put a picture in front of them (or on the ceiling) with for example numbered squares on them. When the camera takes a picture the numbers tell where it is.

Sign In or Register to comment.