6

I am working on an app that uses the CMAltimeter class. I would like to retrieve altitude values quicker than the default value (default seems to be about once every second). How can I change the frequency? Will I need to use NSTimers/Multiple instances? If so, an explanation would be much appreciated.

if ([CMAltimeter isRelativeAltitudeAvailable])
{
    self.altimeterManager = [[CMAltimeter alloc] init];
    [self.altimeterManager startRelativeAltitudeUpdatesToQueue:[NSOperationQueue mainQueue] withHandler:^(CMAltitudeData *altitudeData, NSError *error)
     {
         dispatch_async(dispatch_get_main_queue(), ^ {
             NSLog(@"%f", altitudeData.relativeAltitude.floatValue);
         });
     }];
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579
user3647894
  • 559
  • 1
  • 4
  • 28

0 Answers0