Calculate distance to object using iPhone proximity sensor?

moonman239

macrumors 68000
Original poster
Mar 27, 2009
1,524
22
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.
 

retroneo

macrumors 6502a
Apr 22, 2005
719
89
tell the user the horizontal distance to an object that it detects within at least a 20-foot radius
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.