Tom*_*ale 5 geolocation geoclue
在命令行中,如何获取geoclue2
要报告的当前位置?
bin/
我的 Arch 包中没有手册页或可执行文件。
redshift
(使用geoclue2
)将我的位置报告为:
7.98 98.37
但谷歌地图给了我:
9.749160、99.975484
有什么方法可以配置源geoclue2
使用什么来获得更好的准确性?
大多数谷歌geoclue2
搜索都提出了redshift
这不太有用:(
$ sudo apt install geoclue-2-demo\n
Run Code Online (Sandbox Code Playgroud)\n$ /usr/libexec/geoclue-2.0/demos/where-am-i\n
Run Code Online (Sandbox Code Playgroud)\n\xe2\x80\xa6 并观看可怕的魔法展开。
\n始终需要启动程序文件.desktop
来了解允许哪些应用程序 ID。该where-am-i.desktop
文件提供于/usr/share/applications/geoclue-where-am-i.desktop
地理定位源和允许的应用程序在 中配置/etc/geoclue/geoclue.conf
。提及的应用程序 ID 不带.desktop
文件扩展名。
为了真正回答这个问题,geoclue-2.0 Ubuntu 软件包提供了一个二进制文件/usr/lib/geoclue-2.0/demos/where-am-i
,它将打印 GeoClue 报告的位置以及准确性:
$ /usr/lib/geoclue-2.0/demos/where-am-i\nClient object: /org/freedesktop/GeoClue2/Client/12\n\nNew location:\nLatitude: 1.234000\xc2\xb0\nLongitude: 1.234000\xc2\xb0\nAccuracy: 25000.000000 meters\nTimestamp: Sun 21 Jun 2020 17:54:37 BST (1592758477 seconds since the Epoch)\n
Run Code Online (Sandbox Code Playgroud)\n