IOS5 region monitoring accuracy

I am trying to get accurate area monitoring working with iOS5 / iPhone 4G and it seems I am not very lucky. To be clear, I can receive information about events in the region; itโ€™s just that I get them prematurely. Let me explain. This is my code for setting the region:

#define GEO_FENCING_RADIUS 10 // in meters CLLocationDistance radius = GEO_FENCING_RADIUS; // Create the region and start monitoring it. CLRegion* region = [[CLRegion alloc] initCircularRegionWithCenter:coordinate radius:radius identifier:identifier]; [self.locationManager startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyBest]; 
Radius

in this code is set to 10 meters. Therefore, my assumption is that I will receive a notification about the region if I am within 10 meters of this place. Instead, I can be notified at much higher distances (I saw a 2-mile proximity causing a region). What can cause this? In addition, I am using significantLocationChangeMonitoringAvailable with the default values โ€‹โ€‹set for CLLocationManager. Maybe using significantLocationChangeMonitoringAvailable somehow precludes more accurate trigger events?

Any ideas what is going on here?

+4
source share
1 answer

Significant location change service is intended only for significant location changes. From docs :

This method indicates whether the device can only report updates based on significant changes in location. (Significant location change monitoring is primarily associated with detecting changes in the cell tower that are currently associated with the device.) This feature provides tremendous energy savings for applications that want to track the approximate location of users and do not need high-precision location information.

Regional monitoring works the same, so it can tell you when you are within about 1 km of the point of interest. (Please note that since this is based on the positioning of the cell, you will get more or less accuracy depending on the density of cells in this area and you can use this approach only on devices with cellular communication - without iPod touch or WiFi iPad.)

If you need both the energy benefits of monitoring a region and monitoring significant changes, as well as the ability to accurately track your location in the area you are interested in, you only need to set up the first one first, then once you find yourself in a nearby region, switch to a higher level of accuracy control . (This is best done using a separate instance of CLLocationManager .)

+2
source

Source: https://habr.com/ru/post/1401253/


All Articles