How can I evaluate the GPS signal strength? (iPhone)(如何评估 GPS 信号强度?(iPhone))
问题描述
我需要一种对 GPS 信号强度进行分类的方法.到目前为止,我遇到了 CLLocation
的 horizontalAccuracy
属性(类参考).
I need a way of categorising the strength of the GPS signal. So far I have come across the horizontalAccuracy
property of CLLocation
(Class Reference).
更具体地说,我需要创建如下内容;我遇到的问题是填写 if
语句.
To be more specific I need to create something like the following; the issue I'm having is filling in the if
statements.
if (someLocation.horizontalAccuracy ...)
{
// No Signal
}
else if (someLocation.horizontalAccuracy ...)
{
// Poor Signal
}
else if (someLocation.horizontalAccuracy ...)
{
// Average Signal
}
else if (someLocation.horizontalAccuracy ...)
{
// Good Signal
}
else
{
// Excellent Signal
}
请问有人可以帮我吗?
推荐答案
我以前用过这样的图:
if (someLocation.horizontalAccuracy < 0)
{
// No Signal
}
else if (someLocation.horizontalAccuracy > 163)
{
// Poor Signal
}
else if (someLocation.horizontalAccuracy > 48)
{
// Average Signal
}
else
{
// Full Signal
}
但老实说,它对用户来说并不是很有效.它会显示为低准确度,但当他们查看地图应用程序时,它会几乎完美地定位它们(尽管它们周围有一个圆圈).
but to be honest, it didn't really work very well for users. It would show as low accuracy, but when they looked at the maps app, it would have located them almost perfectly (albeit with a circle around them).
与其尝试定义准确度级别,而且如果您的应用是基于地图的,您能否像地图一样将水平准确度显示为圆形叠加层?然后用户可以自己决定它是否足够准确.
Rather than trying to define a level of accuracy, and if your app is map based, could you do what Maps does and show the horizontal accuracy as an circular overlay? Then the user can decide for themselves if it's accurate enough.
这篇关于如何评估 GPS 信号强度?(iPhone)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何评估 GPS 信号强度?(iPhone)


- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01