IOS 核心位置框架准确性

IOS Core Location framework accuracy

我正在 Swift 中编写一个应用程序来捕获和保存 phone 的位置。
我打算使用 Core Location 框架。该框架提供了多种服务,您可以使用这些服务来获取和监控设备的当前位置。
以下是我的几个问题:

1. Core Location框架是否使用phone GPS获取经纬度或小区数据?

2. 如果 phone 在你的车里、口袋里、包里或钱包里怎么办。还能得到正确的位置(经纬度)吗?

3. 如果 #2 的答案是错误的,那么我还有什么选择?

Does Core Location framework uses the phone GPS to get the longitude and latitude or the cell data?

如果它需要 GPS 以达到指定的精度,它就会这样做。当您使用 Core Location 时,您告诉它您需要多精确,如果 a) GPS 在设备上可用,并且 b) 它需要 GPS 来获得您要求的精度,Core Location 将打开 GPS。

What if the phone is in your car, pocket, bag or purse. Can it still get a correct location (longitude and latitude)?

可以,除非不可以。 GPS 在汽车中运行良好。口袋、包包等都不是问题。但是 GPS 接收器确实需要能够接收来自卫星的无线电信号,因此如果您的车停在地下停车场的底层,或者即使您只是在建筑物内,它也可能无法工作。然后,Core Location 将使用任何其他可用的方法来确定位置,例如 WiFi 和手机信号塔三角测量。

If the answer to #2 is false, then what other alternative I have?

除了 Core Location,您确实别无选择,但 Core Location 有多种确定位置的方法。因此,请在必要时使用它(并且在不需要时避免使用它,因为它确实会耗电)并相信它会做正确的事情。