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)
基础教程推荐
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01