PDA

View Full Version : iPhone 3G/3GS compass APIs




arunarora
Jun 26, 2009, 04:14 AM
Hi,

I need to integrate compass in my application to show the direction in which user is moving. I need to use GPS maps to point the current location and compass to show directions.

Are APIs available for these functionalities?
Compass and GPS

I really appreciate any help, suggestions.

Thanks,
Arun



jnic
Jun 26, 2009, 04:36 AM
Yes, both are in the Core Location framework.

robbieduncan
Jun 26, 2009, 04:37 AM
See CoreLocation (http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html). Really the documentation is easy to read and searchable...

arunarora
Jun 26, 2009, 07:12 AM
Hi,
Thanks a lot for replying.
Yes I saw the APIs and I guess CLHeading obj is used for getting directions and CLLocation for getting MAP location.
I am very new to iPhone programming so having a bit difficulty in understanding.

Nyways, Can you also help me out with the GUI part as well. Can I get the Compass in my app to show the direction and some sort of Map on which I can show the current location of the user?

Thanks a lot!
Arun

MacDonaldsd
Jun 26, 2009, 04:30 PM
The APIs just give you the raw data Im afraid. Your have to write the compass UI your self.

arunarora
Jun 29, 2009, 12:35 AM
I can write the UI for the app, however can anyone suggest me what is the speed of GPS in iPhone i.e. how fast the phone can start getting the GPS feeds. Also, how accurate the GPS feeds are?

Thanks a lot!
Arun

Saladinos
Jun 29, 2009, 04:20 AM
You should probably read a couple of guides and look at some sample code.

It updates pretty regularly.

seaslugchange
Jul 2, 2009, 05:56 PM
Excuse my ignorance of posting etiquette: Does any one have a sense of the frequency responsiveness of electronic compass, from what I gather there is a 'Hall Element' I assume that the circuit would have a very low frequency (~single Hz) low-pass filter around the hall element. Is this true? How might you test the frequency responsiveness of the compass?