Does GPS require Internet?(GPS需要互联网吗?)
问题描述
是否需要同时打开 Internet
和 GPS
才能在我的应用中读取我的当前位置(国家、城市、地区等)?如果是,那么是否有任何替代方法可以仅从 GPS 获取位置?由于互联网可用性是一个问题.
Is it necessary to turn both Internet
and GPS
on before I can read my current location(country, city, locality etc) in my app? If they are, then any alternative way to get the location only from GPS? Since the internet availability is an issue.
推荐答案
正如其他人所说,GPS 不需要互联网.
As others have said, you do not need internet for GPS.
GPS 基本上是一种基于卫星的定位系统,旨在根据从 GPS 星座中的多个卫星接收到的时间信息计算地理坐标.GPS 的首次定位时间 (TTFF) 相对较慢,并且从冷启动(意味着没有最后一个已知位置)开始,可能需要长达 15 分钟才能从卫星下载所需的数据以计算位置.蜂窝网络使用的 A-GPS 通过使用蜂窝网络缩短了这个时间网络将卫星数据传送到手机.
GPS is basically a satellite based positioning system that is designed to calculate geographic coordinates based on timing information received from multiple satellites in the GPS constellation. GPS has a relatively slow time to first fix (TTFF), and from a cold start (meaning without a last known position), it can take up to 15 minutes to download the data it needs from the satellites to calculate a position. A-GPS used by cellular networks shortens this time by using the cellular network to deliver the satellite data to the phone.
但无论是 A-GPS 还是 GPS 位置,派生的只是地理坐标(纬度/经度).仅从 GPS 获取更多信息是不可能的.
But regardless of whether it is an A-GPS or GPS location, all that is derived is Geographic Coordinates (latitude/longitude). It is impossible to obtain more from GPS only.
为了能够返回坐标以外的任何内容(例如地址),您需要一些机制来执行 反向地理编码.通常这是通过查询服务器或网络服务来完成的(例如使用 Google 地图或 Bing 地图,但还有其他).某些服务将允许您在本地缓存数据,但仍需要一段时间的互联网连接才能下载周边地区的地图信息.
To be able to return anything other than coordinates (such as an address), you need some mechanism to do Reverse Geocoding. Typically this is done by querying a server or a web service (like using Google Maps or Bing Maps, but there are others). Some of the services will allow you to cache data locally, but it would still require an internet connection for periods of time to download the map information in the surrounding area.
虽然这需要大量的工作,但您可以编写自己的工具来进行反向地理编码,但您仍然需要能够将数据存放在某个地方,因为执行此操作所需的数据量远远超出您的能力存储在手机上,这意味着您仍然需要互联网连接才能做到这一点.如果您想到 Garmin GPS 导航装置之类的工具,它们确实会在本地存储数据,所以这是可能的,但您需要对其进行优化以获得最大的存储空间,并且可能需要比手机中通常可用的更多.
While it requires a significant amount of effort, you can write your own tool to do the reverse geocoding, but you still need to be able to house the data somewhere as the amount of data required to do this is far more you can store on a phone, which means you still need an internet connection to do it. If you think of tools like Garmin GPS Navigation units, they do store the data locally, so it is possible, but you will need to optimize it for maximum storage and would probably need more than is generally available in a phone.
对您的问题的简短回答是,不,您不需要有效的互联网连接来获取坐标,但除非您正在构建专用设备或拥有无限存储空间,否则您将需要互联网连接将这些坐标变成其他任何东西.
The short answer to your question is, no you do not need an active internet connection to get coordinates, but unless you are building a specialized device or have unlimited storage, you will need an internet connection to turn those coordinates into anything else.
这篇关于GPS需要互联网吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:GPS需要互联网吗?
基础教程推荐
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01