Iphone 我可以在iOS中获得GPS定位的精度吗?
我见过Android开发者获得GPS定位的准确性。有没有办法在iOS中获得当前GPS位置的准确度 我正在使用answer中的代码获取我的位置:Iphone 我可以在iOS中获得GPS定位的精度吗?,iphone,ios,gps,cllocationmanager,cllocation,Iphone,Ios,Gps,Cllocationmanager,Cllocation,我见过Android开发者获得GPS定位的准确性。有没有办法在iOS中获得当前GPS位置的准确度 我正在使用answer中的代码获取我的位置: locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; locationManager.desiredAccuracy =
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);
}
在
CLLocation
-HorizontalAccurance
和-verticalAccuracy
上有两个属性。大多数情况下,精度取决于用于获取CLLocation
的位置水平精度的硬件。location
给出了与纬度、经度坐标相关的估计位置误差(以米为单位)
垂直精度
给出了与高度
相关的估计误差使用水平精度
和垂直精度
属性在定位
类中。如果水平精度是一个巨大的值,您可以丢弃这些信号
还要确保检查带有当前日期的时间戳
,以确保GPS信号未被缓存。是的,您当然可以使用相同的CLLocation
进行缓存。