PDA

View Full Version : Core Location



woody993
31st August 2009, 10:21 PM
I was playing around in System Preferences when I remembered that SL was to include Core Location Services. So I started up Xcode and knocked up this little application. I don't know how well it works in Australia, but it will be very interesting.
It can be found at:
MediaFire - Core Location Test (http://www.mediafire.com/?w2lwrd0zmk2)
Update: Now correctly responds to errors
http://img8.imageshack.us/img8/3743/screenshot20090831at817.png

resonance
31st August 2009, 11:43 PM
Nifty!

Could you explain how Core Location actually determines location?

Oh and it pinned me within two or three houses of me...

Beau
31st August 2009, 11:45 PM
It uses the Skyhook WiFi database, just like the iPhone and iPod touch does.

resonance
31st August 2009, 11:47 PM
So having quickly read skyhook's website... There is a database somewhere with some or all of the Wireless access points around me listed as being this general area..

Isn't that prone to huge error with changing SIDs/hardware etc etc??

Cheers for the answer though, this thing looks cool

woody993
1st September 2009, 12:17 AM
So having quickly read skyhook's website... There is a database somewhere with some or all of the Wireless access points around me listed as being this general area..

Isn't that prone to huge error with changing SIDs/hardware etc etc??

Cheers for the answer though, this thing looks cool

You're exactly right, I've been scratching my head trying to work out why it could not determine my location and then I remembered. My previous access point, which I had manually added to Skyhook's database, died about a month ago so I purchased a new AirPort. With a new access point comes a new MAC Address. To test this out I pulled out my old access point, powered it up and sure enough this was the result:
http://img87.imageshack.us/img87/5039/screenshot20090831at101.png

I look at this in two ways. The first being that WPS is the closest thing we are going to get. And the second being that Apple is going to start placing GPS modules into their machines resulting in increased accuracy without developers having to modify their code and addition such as "Find My Mac"

For anyone who is wondering how to use the Core Location framework it is exactly the same as the code for the iPhone, although I'm more than happy to post the code in this thread.

woody993
9th September 2009, 04:07 PM
As requested -
Xcode Project @ http://www.mediafire.com/?xmzuhlnzrmo (http://www.mediafire.com/?xmzuhlnzrmo)

Edit: I see what you were saying now, the link is the CORRECT one to the source

glacierdave
9th September 2009, 04:53 PM
Hmmm, location not found - I guess I shouldn't be surprised in my wi-fi sparse neck of the woods...

rustyshelf
9th September 2009, 05:04 PM
As requested -
Xcode Project @ http://www.mediafire.com/?hn3wn3dotez (http://www.mediafire.com/?hn3wn3dotez)

It could just be me, but that's still the link to the binary isn't it? The source code would be great only because I'm a suspicious developer who doesn't want to run any old cocoa app I find on the forum ;)

woody993
9th September 2009, 10:01 PM
As requested -
Xcode Project @ http://www.mediafire.com/?xmzuhlnzrmo (http://www.mediafire.com/?xmzuhlnzrmo)

It could just be me, but that's still the link to the binary isn't it? The source code would be great only because I'm a suspicious developer who doesn't want to run any old cocoa app I find on the forum ;)

Understandable. That's the correct link I just zipped the project folder and quickly uploaded it.

Edit: For those who are having trouble with it locating them goto - SKYHOOK Wireless: How It Works > Submit Wi-Fi AP (http://www.skyhookwireless.com/howitworks/submit_ap.php) - to add your Access Point to the WPS database. Option Click on the Airport Menu Item to get the MAC Address

mactalkuser8282
9th September 2009, 11:12 PM
What do the numbers mean?

DigitalStorm
10th September 2009, 12:14 AM
What do the numbers mean?

Err ... (latitude, longitude) values!

woody993
10th September 2009, 12:19 AM
What do the numbers mean?

Err ... (latitude, longitude) values!

ie. -ve (negative) values are south and west