Hi,
I'm getting the heading from the iPhone compass with code found in some sample:
What I have found is that when the device is moving, the function is called
many times per second, and puts a measureable load on the CPU.
Getting GPS coordinates doesn't present the same issue since you get
updates no more than once per second.
I only care to know the change in heading every second.
Can the new heading be queried manually with a timer, or some other way?
Cheers, Art.
I'm getting the heading from the iPhone compass with code found in some sample:
Code:
- (void)locationManager:(CLLocationManager *)manager
didUpdateHeading:(CLHeading *)newHeading
{
heading = newHeading.trueHeading;
}
What I have found is that when the device is moving, the function is called
many times per second, and puts a measureable load on the CPU.
Getting GPS coordinates doesn't present the same issue since you get
updates no more than once per second.
I only care to know the change in heading every second.
Can the new heading be queried manually with a timer, or some other way?
Cheers, Art.
Last edited: