tags:

views:

496

answers:

1

Hi,

I am developing an compass application for iphone 3GS. I have used CoreLocation framework for the compass method I have used...

 - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading

...method for getting the heading.

My question is how to get a value like "315° NW, 90° E,140° SE" without moving the iphone. I do not have 3GS iphone so, if anybody has some ideas, please help.

Thank you.

+1  A: 

I'm not sure I understand what you're asking. Can you clarify your question a bit? If you're asking how to extract the compass heading from a CLHeading object, take a look at its trueHeading or magneticHeading properties.

Ben Gottlieb
No, i have an arrow pointing straight when user press an start button then compass events start and arrow will move to an fixed point such as 315° NW, 90° E,140° SE etc..so how should i detect the coordinates which are given above.Thank you.
shivang
when you receive a -locationManager:didUpdateHeading: message, take a look at the magneticHeading property; if it's 90°, that's east, adjust your arrow, etc. Are you asking about how to draw the arrow?
Ben Gottlieb