我见过Android开发人员获得GPS定位的精确度。有没有方法可以在iOS中获得我当前的全球定位系统的精度?
我使用this answer中的代码来获取我的位置:
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.distanceFilter = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
NSLog(@"OldLocation %f %f", oldLocation.coordinate.latitude, oldLocation.coordinate.longitude);
NSLog(@"NewLocation %f %f", newLocation.coordinate.latitude, newLocation.coordinate.longitude);
}发布于 2013-06-27 15:44:52
CLLocation -horizontalAccuracy和-verticalAccuracy上有两个属性。大多数情况下,精度取决于您用来获取位置的硬件
发布于 2013-06-27 16:02:14
CLLocation的horizontalAccuary给出了与纬度、经度坐标相关的以米为单位的估计位置误差。
verticalAccuracy给出了与altitude相关的估计误差。
发布于 2016-03-19 22:47:44
在CLLocation类中使用horizontalAccuracy和verticalAccuracy属性。如果horizontalAccuracy是一个很大的值,那么可以丢弃这些信号。
还要确保检查当前日期的timeStamp,以确保没有缓存GPS信号。
https://stackoverflow.com/questions/17337414
复制相似问题