hgo*_*ebl 5 gps android geolocation
我正在LocationManager.requestLocationUpdates()使用LocationManager.GPS_PROVIDER和注册a 跟踪GPS位置LocationListener.
我的问题:
所有经过测试的设备(Sony neo,Sony active,Moto G)都会产生一些Location物体getTime():
<trkpt ...><time>2014-05-24T10:24:59.000Z</time></trkpt>
<trkpt ...><time>2014-05-24T10:25:00.000Z</time></trkpt>
<trkpt ...><time>2014-05-24T10:25:01.000Z</time></trkpt>
<trkpt ...><time>2014-05-24T10:25:02.000Z</time></trkpt>
<trkpt ...><time>2014-05-24T10:25:03.000Z</time></trkpt>
Run Code Online (Sandbox Code Playgroud)
由于我正在计算速度,倾斜和与气压高度合并,1s(1000ms)分辨率太不精确了.而且我不相信,修复都是完全正确的.000.
我的问题:
System.currentTimeMillis()作为我的跟踪点的时间戳是更好的,或者GPS定位通常远远落后于"实时",计算的位置实际上是过去的那些(落后几秒)?
备注:
小智 0
根据我的经验,System.currentTimeMillis()这是一种更好的获取时间戳的方法,这就是我在我的应用程序中所做的。但是,请注意,正如 Android 开发者网站上所述,System.currentTimeMillis() Returns the current time in milliseconds since January 1, 1970 00:00:00.0 UTC这实际上取决于您想要使用它的目的。正如我所提到的,我发现它比其他形式的时间戳更可靠,并且它可能最适合您的情况。
| 归档时间: |
|
| 查看次数: |
4380 次 |
| 最近记录: |