I've been working on a location based app recently and am noticing some strange values for CLLocation. I often get a horizontalAccuracy
of 1414
and a verticalAccuracy
of -1
. Any clue what this indicates? As far as I can tell, these points are often very accurate. What is the difference between verticalAccuracy and horizontalAccuracy?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
The -1 for
verticalAccuracy
indicates that the altitude in theCLLocation
is not valid. You only get altitude with a 3D GPS position.The 1414 for
horizontalAccuracy
indicates that the horizontal (lat/lon) position could be up to 1414m off (this is just an estimated error). This is probably a location determined by cell tower triangulation or WiFi location data. GPS locations usually report 100m or better.To get a higher accuracy location (300m or better) you need to set
desiredAccuracy
and wait for the GPS receiver to lock onto at least 3 satellites (or 4 for a 3D fix). Until that happensCLLocationManager
will give you the best it has which is WiFi or Cell tower triangulation results.