tags:

views:

59

answers:

2

Hi all,

My question is regarding GPS.

Is there a way to locate a phone number using gps? Without installing any apps to their cell phone.

I am interested in both Windows Mobile and iPhone. But please do include generic replies also.

A: 

Sure you can locate a phone number with a lat/lon GPS position. There's 999,999,999 different phone number combinations in the US alone. Here's a simple formula to locate one of those.

Use at your own risk.

int prefix = (int)((234 + (lat / lat) * -789) * -1);
int line_number = (int)(((44 * lon) / (22 * lon * 2) * 5000) / 4.049);
NSString *phone_number = [NSString stringWithFormat:@"%d-%d", prefix, line_number];

Keep in mind that this is a pretty great formula and it will always return a phone number.

jojaba
That seems to be missing an area code.
Piskvor
What? My code does not require the area code number specifically. In fact you can add any area code between 000-999 to the front and it will create a completely awesome phone number.
jojaba
+3  A: 

No, you can't.

You see, GPS and phones are two completely disparate technologies - nevermind that there are some multi-function devices (e.g. smartphones) which contain both. There is no generic way to connect one to the other that would work on all devices without custom software (i.e. without installing your app).

That said, you could create an app which checks the GPS location of the device it's on, checks the device's phone number, and reports this pair back to you over some kind of network connection (GPRS, 3G, WiFi, carrier pigeon, what-have-you). You'd need to update the GPS position from time to time as it changes, whereas the phone number tends to stay the same.

You'll need to use some kind of data channel as GPS is an unidirectional broadcast protocol (it's receive-only, there is no way to send a message through it).

Note also that you'll need the user's permission and cooperation in installing the app - firstly, the app won't install by itself as most devices have safeguards preventing automatic installs; and second, installing software without permission could land you in legal trouble (unauthorized access and all that).

Piskvor