문제

I'm developing a region monitoring app, but want to use an external GPS so I can narrow down the regions to 15-20 m and get higher accuracies. I am connecting the iPhone to an Arduino to communicate when the region has been crossed by signalling for an LED to be switched on. I turn on the bluetooth GNS 1000 for better GPS, but still get inaccuracy or no region callbacks at all. I have tested it multiple times and get discrepancies with the accuracy. Have also measured out distances and sometimes don't get any feedback. I am not a programmer, I have just picked up objective C over the past few weeks. The goal is to assist navigation for the visually impaired. Any help would be greatly appreciated.

I am calling these functions for feedback , but I can't pinpoint what is going wrong:

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
    NSLog(@"Entered Region - %@", region.identifier);
    [self setArduino:YES];
    [self showRegionAlert:@"Entering Region" forRegion:region.identifier];

}

- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {
    NSLog(@"Exited Region - %@", region.identifier);
    [self setArduino:NO];
    [self showRegionAlert:@"Exiting Region" forRegion:region.identifier];
}

- (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region {
    NSLog(@"Started monitoring %@ region", region.identifier);
}

Would be grateful for any help!

Regards, M.

도움이 되었습니까?

해결책

You are using the region monitoring methods and their callbacks. Adding an external GPS won't help you with accuracy as those methods rely on internal OS location updates. Mainly from cellular and (primarily) wifi proximity. While GPS factors into it, the device will likely ignore everything coming from your external GPS and only apps written to take advantage of it will do anything.

Region monitoring can be exceptionally great, except when it isn't. If your device doesn't have cellular data, you have a strike against you. (iPod Touch and iPad Wifi) If you have Wifi off, or you are in a rural area with little to no access points, you are pretty much dead as far as region monitoring goes I'm afraid.

From the sounds of things, if you really want to go this route, you would have to write your own custom methods to draw the location out of the external device and monitor the updates manually. Not exactly ideal.

Sorry for the bad news. Hopefully this will help you spend your time on the problems you have and you won't waste time trying to get something to work that may not ever work. Good luck.

다른 팁

The iphone >4 have one of the best, if not the best consumer GPS receiver at all. Accuracy is about 3-5m. There is absolutley no need to use an external GPS device for your application! Only when you need 0,5m accuracy and are willing to pay 5000$ for a multi phase GPS device this improves.

Your main problem is in the software. The GPS accuracy for your application must be set to "CLLAccuracyBestForNavigation". regionMonitoring alone saves battery but does not always (or never?) use GPS.

Update
if you want acurate region monitoring you have to write the region detection algorithms yourself, and in contrast to Apple, use only GPS. Then, still there is no need for external Gps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top