Hello....

I am trying to create my first iphone app and I have decided to make a compass. I am trying to make the compass face a specific gps coordinate rather than facing north. Does anyone know how this is done or have any resources that I can use?

Thanks!

Recommended Answers

All 4 Replies

GPS is a satellite-based location tool that gives you your coordinates to within a specified error factor. If you want to orient yourself to a specific set of coordinates (Longitude+Latitude), then you need to compute your GPS location in relation to the specified (base) coordinates, and use that to orient the "compass".

As an aside, normal compasses point to magnetic north, which varies and is NOT at the "North Pole". You could align your GPS compass with the actual North Pole (coordinates 0,0) for real location accuracy. Then, adjusting the locator to point to any arbitrary location on the globe becomes a trivial exercise in mathematics.

So, good luck with your app!

commented: thanks for the info! +9

Thanks for the info! I will try my best to build experiment with this app.

I will make an update with my progress real soon!

okay, i have been following a tutorial on iphonedevsdk and i am confused about the errors i get. One is that it can't find declaration for 'UIViewController', superclass of 'MyViewController'... and so on with the errors.

Please post the error output of your compilation here. Without that, it is really difficult to tell. Source code also helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.