我正在尝试从我这里的 GPS 加密狗 (BU-353) 获取经度和纬度坐标。我已经安装了 gpsd 和 gpsmon。
Gpsmon 正确显示我的位置并更新它。每当我运行此命令时:
sudo gpsd -n -N -D 2 /dev/ttyUSB0
我得到这个输出:
gpsd: launching (Version 2.95)
gpsd: listening on port gpsd
gpsd: running with effective group ID 0
gpsd: running with effective user ID 0
gpsd: opening GPS data source type 3 at '/dev/ttyUSB0'
gpsd: speed 9600, 8N1
gpsd: attempting USB device enumeration.
gpsd: 1d6b:0001 (bus 1, device 1)
gpsd: 80ee:0021 (bus 1, device 2)
gpsd: 067b:2303 (bus 1, device 3)
gpsd: vendor/product match with 091e:0003 not found
gpsd: speed 9600, 8O1
gpsd: speed 9600, 8N1
gpsd: gpsd_activate(): opened GPS (fd 6)
gpsd: speed 4800, 8N1
gpsd: NTPD ntpd_link_activate: 1
gpsd: /dev/ttyUSB0 identified as type SiRF binary (1.497303 sec @ 4800bps)
gpsd: GPS on /dev/ttyUSB0 is offline (0.000016 sec since data)
gpsd: GPS on /dev/ttyUSB0 is offline (0.000017 sec since data)
gpsd: GPS on /dev/ttyUSB0 is offline (0.000565 sec since data)
gpsd: GPS on /dev/ttyUSB0 is offline (0.000018 sec since data)
gpsd: GPS on /dev/ttyUSB0 is offline (0.000019 sec since data)
并且显然不起作用。
我的目标是能够拥有一个不断返回类似内容的脚本:
XX.XXXXX N, XX,XXXXX E
因此,我可以从另一个程序(在 Erlang 中)读取它并相应地使用它。
更多信息:
Xgps工作正常。
我相信速度“9600”可能不正确,并且与供应商 ID 有关,但不确定。