Moxa TC-6110-T-LX [55/117] Etc default gps

Moxa TC-6110-T-LX [55/117] Etc default gps
TC-6110 Linux User's Manual Managing Communications
3-37
moxa@Moxa:~# dpkg-reconfigure gpsd
If necessary, you may edit the gpsd configuration file by hand; the file is located at /etc/default/gpsd.
However, Debian recommends against this, and there is the possibility that whenever the gpsd package is
updated you will lose your settings. If possible, use the dpkg-reconfigure command shown above.
4. After gpsd is configured, start the daemon:
moxa@Moxa:~# sudo /etc/init.d/gpsd start
5. You should now be able to fetch GPS data via /dev/ttyACM0 device node.
6. You may use AWK to parse and reorder the NMEA string format:
awk -F, '/\$GPGGA/ {print strftime("%Y-%m-%d "), $2, (substr($3,0,2) +\
(substr($3,3) / 60.0)) $4, (substr($5,0,3) + (substr($5,4) / 60.0)) \
$6, $10; fflush();}' /dev/ttyACM0
7. You may also install the GPS test clients cgps and xgps, which can beu used to query gpsd:
Moxa:~# apt-get install gpsd-clients
8. Xgps is used on the desktop, and cgps is used on the command line terminal, or over a serial
emulator/interface. You may access either client by logging in remotely, using SSH or a virtual desktop. To
get a basic report on the current GPS data, call cgps on the console:
moxa@Moxa:~# cgps
and you should a report that looks something like this:

Содержание

Похожие устройства

Скачать