Forgot your password?
typodupeerror
Iphone Apple

iOS App Acoustically Measures Distances Up To 25 Meters 154

Posted by samzenpus
from the new-tool-for-the-box dept.
n01 writes "A recently published app for the iOS platform uses the propagation of sound waves to measure distances of up to 25 meters in a dual device mode. The technique works through repeatedly sending a chirp signal from the master device to which the other (reflector) device synchronizes itself and then replies in a similar fashion. A novel combination of techniques has been engineered to enhance the robustness in noisy environments, such as using an optimum-autocorrelation-signal and semi-automatic frequency calibration together with an averaging over multiple cycles."
This discussion has been archived. No new comments can be posted.

iOS App Acoustically Measures Distances Up To 25 Meters

Comments Filter:
  • by ae1294 (1547521) on Sunday November 13, 2011 @04:10PM (#38042816) Journal

    Now you to can be a space marine up until the point the aliens get to you and all you got for xmas was a stinking ipod...

  • Nifty (Score:1, Insightful)

    by Anonymous Coward on Sunday November 13, 2011 @04:11PM (#38042822)
    But still an advertisement.
  • Not impressive (Score:4, Interesting)

    by girlintraining (1395911) on Sunday November 13, 2011 @04:12PM (#38042828)
    That's not very impressive. Anyone who has two devices that are syncronized to a common timing source (which most cell phones are) can accomplish this. You just say "I started transmitting at x and you received it at y. x-y/speed of sound at sea level = your result. Now if it could be done with one device, and use doppler effect,etc., to map out the room and roughly what's inside it (like in Batman) then we'd be getting somewhere.
    • Re:Not impressive (Score:5, Informative)

      by grumbel (592662) <grumbel@gmx.de> on Sunday November 13, 2011 @04:19PM (#38042876) Homepage

      Yep, neat, but not exactly ground breaking. The OLPC had such an application for the last few years.

      • by Anonymous Coward on Sunday November 13, 2011 @04:36PM (#38042994)
        No no no no no. Apple first. Apple first. [rocks back and forth]
      • by Kazymyr (190114) on Sunday November 13, 2011 @07:41PM (#38043910) Journal

        I have used a program that did exactly that on my WinCE PDA, over 6-7 years ago.

      • by Sycraft-fu (314770) on Monday November 14, 2011 @02:48AM (#38045866)

        You can buy devices that do it standalone, with only one device. Home Depot sells them. They shine a laser for aiming and generate repeated clicks. They then listen for the reflection and give you a distance measurement using that. Works reasonably well. Have to use it in a somewhat quiet indoor space, and if you aim it at something that absorbs sound it doesn't work, but for all that it lets you get a quick and pretty accurate distance measurement for cheap.

        There are more expensive ones that use laser pulses to do it all optically and are more accurate and work in more environments, however they do cost like 10x as much since it requires much more precision timing equipment to deal with things moving at light speed instead of the speed of sound.

        Nothing special about this kind of technology.

        • by Doctor Memory (6336) on Monday November 14, 2011 @02:18PM (#38050446)

          I had one of the standalone ones, it was basically useless for anything other than measuring your distance to a perpendicular, flat, hard surface that wasn't too far away. If you use one in a long narrow room the echoes interfere with the reflected signal, if you point it at a bookshelf or a framed picture without glass the signal gets attenuated too much, and forget about trying to measure the distance between a couple of curved columns. I bought one of the laser ones to replace it and yeah it was like 4x the price (~US$100), but the only problems I've had with it are when trying to use it to measure the distance to a window, and even then the beam's narrow enough I can usually find a point on the frame to use.

    • by Anonymous Coward on Sunday November 13, 2011 @04:38PM (#38043004)

      I seriously doubt they are using their clock times for this. Yes, they are synchronized to a common timing source, but to measure distance, you require sub-millisecond accuracy. Clock drift means the cell phone clock probably isn't that accurate, if it was even that accurate at the moment it was synchronized, which is also unlikely.

    • Re:Not impressive (Score:5, Interesting)

      by Solandri (704621) on Sunday November 13, 2011 @04:51PM (#38043086)
      Fun story. While I was at MIT/Sea Grant working on robot submarines, we'd lay an array of underwater beacons for navigation. To conserve power, they'd listen for a certain sequence of sounds from the sub, then reply back with their unique ping. The sub could measure the time it took to receive each unique ping, and thus determine its position by using the ping times and knowledge of where the beacons were. Kind of an underwater GPS. The beacons could last a year or more when used like this, which was a big deal because it was really annoying to locate and retrieve one just to load it with a fresh battery.

      On one particular deployment, we left the beacons because we were planning to return a few months later. When we got back, the beacons weren't working. We retrieved them and all the batteries were dead. So we recharged the batteries and redeployed them. After our tests were over, we left the beacons again. When we returned a couple months later, they were all dead again.

      Eventually we figured it out. The dolphins in the area had figured out the sound sequence used to make the beacons respond (probably just listened in on our sub). They thought it was pretty cool to get an acoustic response every time they used that code, so they'd been merrily chirping away during those months, draining our batteries.
    • Re:Not impressive (Score:4, Informative)

      by Anonymous Coward on Sunday November 13, 2011 @05:19PM (#38043206)

      You just say "I started transmitting at x and you received it at y. x-y/speed of sound at sea level = your result.

      And then "your result" has at minimum a wavelength or two of precision, which sucks mightily at audio frequencies. This is why they use a nonperiodic (in this case chirped) waveform and correlation instead of "I started transmitting". You could have read this [wikimedia.org], at least, before making an ass of yourself.

      Not that it's so novel as they try to make it sound, either -- SONAR and RADAR guys did all that long ago, and you'd get the basics needed to implement it in your first semester of DSP in any EE program. In fact, if they're even doing "semiautomatic frequency calibration", they're obviously using linear chirps -- exponential chirps are relatively immune to Doppler or other frequency shifts, and since there's no analog design, are no harder to implement -- suggesting they haven't had (or slept through) any formal education in the field.

        It just bugs me when people who know even less run down every decent, if not outstanding, project like this with their own mix of even lamer approaches ("just as good!") and pie-in-the-sky fantasy ("then I'll get excited")

    • by poena.dare (306891) on Sunday November 13, 2011 @05:33PM (#38043268)

      Check out these pix... incredibly impressive (or not?)

      Acoustic Location and Sound Mirrors: http://www.aqpl43.dsl.pipex.com/MUSEUM/COMMS/ear/ear.htm [pipex.com]

      bwahahaha

      today we can do it with iPads!

    • by n01 (693310) on Sunday November 13, 2011 @05:53PM (#38043342)
      Please watch the second video, it shows how the app can be used with just one iOS device and headphones.

      I agree that by having the clocks exactly synchronized this could be a lot easier. (But even 1 ms of deviation means an uncertainty of around 34cm.) The challenge was to do it without having the devices synced by an external source (it works on iPod touch devices and iPad as well) and without using a communication channel other than sound.
    • by CubicleView (910143) on Sunday November 13, 2011 @08:31PM (#38044174) Journal
      Seems impressive enough to me, maybe a bit useless though. Thinking of alternatives, it might be possible to do it with image recognition as well. Judge the distance by the size of the target iphone or whatever.
    • by milkmage (795746) on Sunday November 13, 2011 @11:54PM (#38045148)

      well.. it's not doppler but Batman isn't real anyway:

      Single device (headphone) mode:

      This mode works on the iPhone 3GS (and newer), iPod touch 3rd Generation (and newer) and on all iPads. You either need one of those devices and headphones with a mic or headphones without a mic and a iOS device with a built-in mic (excluding the iPod touch 3rd Generation). The resolution in this mode is 1mm or 1/10 of an inch, depending on the unit system you have selected.

  • by Tyrannosaur (2485772) on Sunday November 13, 2011 @04:12PM (#38042838)
    I thought this was going to be a cool sonar thing- you'll need 2 iphones? get a tape measure...
  • Star Trek? (Score:5, Funny)

    by Anonymous Coward on Sunday November 13, 2011 @04:15PM (#38042856)

    Weapons Officer: "Captain I can't get a fix on the enemies position."
    Science Officer: "We could try using an optimum-autocorrelation-signal and semi-automatic frequency calibration together with an averaging over multiple cycles."
    Captain: "Good idea."

    Me at home: "Who makes up this stuff."

  • by TheLink (130905) on Sunday November 13, 2011 @04:15PM (#38042860) Journal

    Some humans can learn echo location[1], but just wondering if we could have an app that sends clicks and chirps and processes the echos and creates a picture or 3D model.

    But it might need two or more "ears" to quickly build a 3D image of the environment.

    [1] http://www.youtube.com/watch?v=qLziFMF4DHA [youtube.com]
    http://www.youtube.com/watch?v=GYWpxmcHTOc [youtube.com]

  • by QuasiSteve (2042606) on Sunday November 13, 2011 @04:18PM (#38042868)

    Because such an app already existed for PocketPC (That'd be Windows Mobile):
    http://nerdipedia.com/tiki-index.php?page=Sonar+CE [nerdipedia.com]

    Oh, and desktop PC:
    http://nerdipedia.com/tiki-index.php?page=Sonar&structure=index [nerdipedia.com]

    I hear there's a flashlight app for iDevices, too - Slashdot should really look into that. It's magical.

    • by spire3661 (1038968) on Sunday November 13, 2011 @04:38PM (#38043000) Journal
      What I want to know is why do i need a 3rd party app to turn on the flash emitter? This is Doom 3 levels of stupidity regarding the utility of a light source.
      • by QuasiSteve (2042606) on Sunday November 13, 2011 @06:27PM (#38043530)

        What I want to know is why do i need a 3rd party app to turn on the flash emitter? This is Doom 3 levels of stupidity regarding the utility of a light source.

        You know, that's a good question. However, the answer has to be a bit three-fold.

        People have been using cellphones as makeshift flashlights pretty much since the first cellphones with a reasonably bright white screen came onto the market.. and why not, the screen was bright enough to navigate indoors, bright enough for the whole "finding the lock of your door" (because I guess some people don't just learn where it is after living somewhere for ages), etc.
        So whenever you needed a 'flashlight' in those times, just press any random button on your phone and you have your light - so you didn't need an app and you had a button to turn it on.. even though it was a side-effect.

        Then came the phones that had a small light bulb or LED that acted as a camera flash - they would often be used for illumination as well to aid in focusing. This means that on those phones, you would have a rather brighter light source than the screen if you could just get that light to turn on. Thankfully, for most phones, that just meant pressing the camera button. Yes, the camera 'app' would launch, but at least there was your light.
        On most Windows Mobile devices there were APIs to turn on the emitter or your app could just fake being the camera app without actually doing anything with the camera - and your app could be bound to a button and on the light would go.. another press and you could turn it off again. But you didn't really need this app.

        Then come the newer generation of phones, however. I'm going to assume it at least still has a dedicated camera button - but if it's an Android, that might mean you can't just press it.. you have to long press it. Next, the emitter isn't just always on anymore.. half-press starts illumination, until focus is acquired or couldn't be acquired, and it turns off again.
        So at this point, your makeshift flashlight-by-using-camera function has already been crippled. If you want a more continuous light source (aside from the screen, and the trend is dark backgrounds and displays become ever darker in the blacks, so that may not be a good option anymore) you'll have to grab one of the apps. If you're lucky, you can at least bind that to a button. In Windows Mobile that was something that was built-in.. bind any button to any app. On Android, at least? Not so much. You'll need another set of apps to do that.

        Now fast forward again and we're doing away with not just as many physical buttons as possible, but even the virtual buttons.. and remapping them is a no-no. Device makers are saying that buttons is far too confusing, too much freedom, too much power. Less buttons is more. So now you can't even bind an app to a button anymore, and for your makeshift flashlight to work, you'll have to just start up the flashlight app.
        Thankfully, you can at least still put that on the 'home' screen. Not that doing so is very useful when your device is locked.. you'll first have to slide a button to unlock it, or input a code/pattern/phrase/mugshot/fingerprint... at least until somebody makes a custom lock screen that has a flashlight option - if custom lock screens remain allowed, that is.

        But that's only part of your question... why do we need apps: because built-in functionality no longer caters to the need.
        The other part should be obvious.. why DOESN'T the built-in functionality cater to that need?
        Well, again, manufacturers are doing away with the buttons.. which means that whatever thing is going to turn on the emitter is going to be an 'app' anyway. A button would be infinitely more useful.. a button that would work even if the device were locked would be grand. But alas, it's a button and manufacturers are convinced buttons are evil.

        So why doesn't a 'flashlight' app at least ship with most devices? That's one I don't have any plausible answer to. I

        • Wouldn't it be smarter to, for the same $0.99, buy a combo laser pointer/led light keychain thingee, complete with batteries? You can also use it to tease the dogs and cats and enrage skunks (yes, skunks get REALLY mad when you try to tease them with a laser pointer, and will charge if you're not careful ... been there done that, left the vicinity asap while there was still a fence between us).
          • by QuasiSteve (2042606) on Sunday November 13, 2011 @09:50PM (#38044610)

            That depends on one's definition of 'smarter', of course.

            Is it a better light source and comes with additional perks (such as the laser pointer, maybe a UV-B emitter, too)? Yes.

            On the other hand.. it's an additional thing to carry. In combination with your keys, that might not seem so bad. On the other hand, the keys are prone to scratch them up. But there are models that have the emitters recessed within the body so that, even if aesthetically it ends up shredded, at least your beam would be fine.
            That does leave the batteries, however... most of the keychain ones run on an AAA-battery at best, but usually coin cells.. although those do come in rechargeable form, you'll have to get a charger for them, first.

            Compare this again to the cellphone which most people carry even when they don't carry their keys (because somebody else is at home to let them in, say... but being able to call said somebody else in case you get stuck somewhere is rather useful), is thus not an additional item for most people, and recharges easily off the included recharger, re-used recharger or practically any USB connection (as long as there's a micro/mini tip, as applicable).

            Perhaps flipping the question around would be interesting... why not add a laser pointer to the cell phone? And I say: indeed, why not? That could open up a whole host of 'new' apps ( that is to say, apps that replicate pre-existing laser-dependent applications ).

            • Please re-read what I wrote. You don't need a battery charger - $0.99 includes the batteries - 3 coin cells.

              The emitters are recessed 1mm.

              Nobody's going to worry about keys scratching the aluminium surface of a 99-cent pointer.

              Now please consider a real-life scenario - you have the light on your key-chain, so you don't have to fumble around looking for both your keys AND your light. And if you drop it in the dark, you won't break anything.

              Winter is coming - it's a lot easier to drop a phone while wearing gloves.

              • by QuasiSteve (2042606) on Monday November 14, 2011 @06:50PM (#38053574)

                Please re-read what I wrote. You don't need a battery charger - $0.99 includes the batteries - 3 coin cells.

                Which tend not to last very long. Yes, you can just buy new ones (or at $0.99 just buy a new keychain light). Not very environmentally awesome, but I realize some people find that rather shrugworthy anyway.

                Anyway, this is getting further and further from the discussion of why one needs flashlight apps on phones and the use of a phone as a flashlight in the first place.

                Best option? Get that $0.99 keychain flashlight and if it craps out, at least you've still got your phone. With a flashlight app.

      • by BarryJacobsen (526926) on Sunday November 13, 2011 @08:04PM (#38044036) Homepage
        Or you could use the built in camera app and turn on the flash...
      • What I want to know is why do i need a 3rd party app to turn on the flash emitter? This is Doom 3 levels of stupidity regarding the utility of a light source.

        You can turn on the flash without a third party app.

        Camera App, click the thunderbolt and select "On". It defaults ot Auto, but you can have it forced on and off as well.

        Third party apps make it a little easier though - some do nothing but turn it on at launch and turn it iff when you hit the home button.

        It's for potentially improving photos, not as a general purpose flashlight. Which is why it eats a ton of battery and can get dimmer as the protection circuits kick in to prevent it from overheating.

  • by Commontwist (2452418) on Sunday November 13, 2011 @04:34PM (#38042984)

    Skynet: coming soon to an iPhone near you.

  • by sugarmotor (621907) on Sunday November 13, 2011 @04:35PM (#38042992) Homepage

    This didn't seem to do that good of a job, but was 2 years ago.

      * Sonar Ruler, By Laan Labs: http://itunes.apple.com/app/sonar-ruler/id324621243?mt=8 [apple.com]
      * http://thenextweb.com/2009/08/20/amazing-iphone-app-lets-measure-distance-echoes-works/ [thenextweb.com]

    Happy measuring!

  • by pipedwho (1174327) on Sunday November 13, 2011 @05:04PM (#38043148)

    When I see the word 'novel' applied to techniques that have been used for decades, I smell 'patent lawyer'. And be extension: astroturf.

    Signal processing techniques applied to sonar (whether active, passive or beaconed) including signal correlation, spectral adaptation/equalisation, and filtering are standard fare in this field.

    Maybe by novel they mean "on an iPhone"?

    That being said, there is nothing that says this won't work - as it worked extremely well 20 years ago on dedicated systems with far less processing power. (Those systems, however, used multiple arrayed transducers and tailored beam patterns to significantly reduce the effective noise floor.)

  • Stand-alone (Score:4, Insightful)

    by soundguy (415780) on Sunday November 13, 2011 @05:14PM (#38043186) Homepage
    About 20 years ago, I had a hand-held device roughly the size of a smart phone but twice as thick that did distance measuring all by itself. It was infrared and as I recall, it was something like $25.00 from Rat Shack or Home Depot or some place like that. A 30 foot tape measure is about $8.00 and works a lot better.
  • by History's Coming To (1059484) on Sunday November 13, 2011 @05:41PM (#38043304) Journal
    Or you can use a piece of string, as long as it's no shorter than 25m.
  • by Anonymous Coward on Sunday November 13, 2011 @06:46PM (#38043626)

    ...seems a little expensive for a tape measure.

  • by Telephone Sanitizer (989116) on Sunday November 13, 2011 @06:55PM (#38043680)

    Gee! All you need is a 25 meter headphone cord for this to work.

    Everyone has that!

  • Frequency? (Score:4, Interesting)

    by wisebabo (638845) on Sunday November 13, 2011 @07:08PM (#38043744) Journal

    Is there any benefit to moving to ultrasonic frequencies? Other than making it inaudible (so you don't bother people but maybe dogs!), would this improve the resolution? Does the range decrease? Do consumer level devices cover such a broad spectrum?

    By the way, has anyone made an iOS or Android App that can record in the ultrasound (or infrasonic) ranges and change it so that we can listen in audible ranges? Might be neat to see/hear what the bats are doing!

    Also, how DO bats build up a good 3D map of their surroundings using just one "speaker" and two "microphones"? Do they send out beams or are their ears swiveling? And, with the limited amount of computing power on a smartphone, would it be able to duplicate it? A bat's brain doesn't seem particularly large and they are doing this FAST (on the fly, ha ha).

    • Re:Frequency? (Score:4, Insightful)

      by Anonymous Coward on Sunday November 13, 2011 @11:13PM (#38044984)

      Is there any benefit to moving to ultrasonic frequencies? Other than making it inaudible (so you don't bother people but maybe dogs!), would this improve the resolution? Does the range decrease? Do consumer level devices cover such a broad spectrum?

      As I mentioned in another comment, I've been experimenting with a similar application on iOS devices. Yes, consumer devices do cover ultrasonic frequencies, but barely. For average humans, ultrasound begins above 18 - 19 KHz, and devices with 48KHz range can produce up to 24KHz frequencies... in theory. The problem is that the commodity speakers/microphones in smart-phones are optimized for the human perceptual range, and since ultrasound is beyond that, the transducer dynamic range and/or the in-built signal processing conspire to significantly attenuate and distort ultrasonic signals. Using an iPad, in preliminary experiments, I could only get a range of ~5m using ultrasound, whereas these guys say they can go up to 25m.

      Moving to ultrasound also can affect resolution negatively. Since you're effectively using a much smaller bandwidth signal, your positioning accuracy reduces, on top of which, multipath problems get much worse. (Smaller bandwidth because by limiting the signal to ultrasound, you only get a bandwidth between ~18KHz and 24KHz for a 48KHz sampling frequency, and the iPad microphone strongly attenuates signals after the 20KHz range.)

      Also, how DO bats build up a good 3D map of their surroundings using just one "speaker" and two "microphones"? Do they send out beams or are their ears swiveling? And, with the limited amount of computing power on a smartphone, would it be able to duplicate it? A bat's brain doesn't seem particularly large and they are doing this FAST (on the fly, ha ha).

      Bat ears are highly specialized. This link gives a brief overview of how bats do echo-location:
      http://science.howstuffworks.com/environmental/life/zoology/mammals/bat2.htm

      I believe smartphones have, or will soon have, enough processing power to do the necessary signal processing if we can design the right algorithms. The problem is it would also need highly specialized audio transducers to get any useful signals, which may not necessarily fit into a smartphone form factor.

    • by wisebabo (638845) on Monday November 14, 2011 @09:53AM (#38047688) Journal

      I (tried to) learn a lot from these postings (some of it was at the limit of my understanding though). I appreciate the information!

  • by Twinbee (767046) on Sunday November 13, 2011 @08:33PM (#38044186) Homepage

    Can't a laser do this kind of job instead of sound?

  • by nedlohs (1335013) on Monday November 14, 2011 @12:16AM (#38045228)

    At least say "I recently published an app for the iOS platform that" instead of "A recently published app for the iOS platform".

    Pretending it's something interesting you just stumbled across is being deceptive.

  • by Doc Ruby (173196) on Monday November 14, 2011 @01:03PM (#38049584) Homepage Journal

    Is there an Android app (or, preferably, library) that can use the sonar to sense the size and rough shape of a whole room, making a 3D model? Maybe by correlating distance pings with the accelerometer (and GPS for added position context) while waving the device around..

Do not simplify the design of a program if a way can be found to make it complex and wonderful.

Working...