Calculate distance to object using iPhone proximity sensor?

Discussion in 'iOS Apps' started by moonman239, May 22, 2012.

  1. moonman239 macrumors 68000

    Mar 27, 2009
    I just wonder if it's possible to calculate the distance to an object using the proximity sensor. The idea is for the phone to be used like a radar or laser gun. The user would point the phone screen in any direction and could even rotate it and the phone would tell the user the horizontal distance to an object that it detects within at least a 20-foot radius.

    Scenario: I'm playing Capture the Flag and have been assigned to guard the flag. With the help of my phone, I walk around the flag. The app will look for an object. If it sees one, it will tell me what I need to know so I can determine whether someone's trying to capture my flag and, if so, how far away the detected object is.
  2. retroneo macrumors 6502a

    Apr 22, 2005
    Two problems:

    1. The proximity sensor is just an infrared camera that looks for infrared from the IR LED reflected off the users head. It won't let you do that. It would only let you measure small distances, and the measurement would require recalibrating in different lighting. So it's useless for that purpose.

    2. Apple doesn't give that level of access to the proximity sensor camera to let you measure any kind of distance.
  3. mrsir2009 macrumors 604


    Sep 17, 2009
    Melbourne, Australia

Share This Page