Difference between revisions of "GPS daemon"
(→Remote usage) |
(→Graphical clients) |
||
Line 56: | Line 56: | ||
* cgps (ncurses based), installed by default: | * cgps (ncurses based), installed by default: | ||
<pre class="apf"> | <pre class="apf"> | ||
− | # cgps | + | # cgps -s -u m |
┌───────────────────────────────────────────┐┌─────────────────────────────────┐ | ┌───────────────────────────────────────────┐┌─────────────────────────────────┐ | ||
− | │ Time: | + | │ Time: 2019-06-10T13:41:26.0Z ││PRN: Elev: Azim: SNR: Used: │ |
│ Latitude: 47.238710 N ││ 8 07 079 00 N │ | │ Latitude: 47.238710 N ││ 8 07 079 00 N │ | ||
│ Longitude: 6.018278 E ││ 9 47 282 29 Y │ | │ Longitude: 6.018278 E ││ 9 47 282 29 Y │ | ||
− | │ Altitude: 1055.4 | + | │ Altitude: 1055.4 m ││ 12 10 216 00 N │ |
− | │ Speed: 0.7 | + | │ Speed: 0.7 km/h ││ 15 79 194 39 Y │ |
│ Heading: 265.5 deg (true) ││ 17 00 000 22 N │ | │ Heading: 265.5 deg (true) ││ 17 00 000 22 N │ | ||
− | │ Climb: 0.0 | + | │ Climb: 0.0 m /min ││ 18 00 000 22 N │ |
│ Status: 3D FIX (43 secs) ││ 26 84 265 25 Y │ | │ Status: 3D FIX (43 secs) ││ 26 84 265 25 Y │ | ||
│ GPS Type: Generic NMEA ││ 27 61 291 33 Y │ | │ GPS Type: Generic NMEA ││ 27 61 291 33 Y │ | ||
− | │ Horizontal Err: +/- 83 | + | │ Horizontal Err: +/- 83 m ││ │ |
− | │ Vertical Err: +/- 75 | + | │ Vertical Err: +/- 75 m ││ │ |
│ Course Err: n/a ││ │ | │ Course Err: n/a ││ │ | ||
− | │ Speed Err: +/- 114 | + | │ Speed Err: +/- 114 km/h ││ │ |
│ ││ │ | │ ││ │ | ||
│ ││ │ | │ ││ │ |
Latest revision as of 19:39, 22 January 2020
Contents
About
From gpsd website: gpsd is a service daemon that monitors one or more GPSes or AIS receivers attached to a host computer through serial or USB ports, making all data on the location/course/velocity of the sensors available to be queried on TCP port 2947 of the host computer. With gpsd, multiple location-aware client applications (such as navigational and wardriving software) can share access to receivers without contention or loss of data. Also, gpsd responds to queries with a format that is substantially easier to parse than the NMEA 0183 emitted by most GPSes. The gpsd distribution includes a linkable C service library, a C++ wrapper class, and a Python module that developers of gpsd-aware applications can use to encapsulate all communication with gpsd.
Installation
$ make menuconfig
Package Selection for the target ---> Hardware handling / blockdevices and filesystem maintenance ---> [*] gpsd devices/protocol support ---> gpsd features --->
- Let default devices/features if you don't know what they mean.
$ make
- reflash your rootfs
Usage
- gpsd is automatically launched at startup by /etc/init.d/S50gpsd.
- On APF27 + Wireless extension, at first startup you may need to add the following line in the start() method of this script:
# nano /etc/init.d/S50gpsd start() { stty -F /dev/ttySMX4 raw -echo -echoe -echok 38400 <<<<<<<<<<<<-------------- echo -n "Starting $NAME: " start-stop-daemon -S -q -p $PIDFILE --exec $DAEMON -- -P $PIDFILE $DEVICES && echo "OK" || echo "Failed" }
Manual access
- gpsd is a daemon running in background and waiting for client to connect to its TCP port 2947. To check it is well running, you can connect to it with telnet:
# telnet localhost 2947
- then you can give it some commands (more infos here):
?VERSION; {"class":"VERSION","release":"2.94","rev":"2010-06-09T13:27:04","proto_major":3,"proto_minor":2} ?DEVICES; {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttySMX4","activated":1276183248.47,"flags":1,"driver":"Generic NMEA","native":0,"bps":0,"parity":"N","stopbits":1,"cycle":1.00}]} ?POLL; {"class":"POLL","timestamp":1276183453.266,"active":1,"fixes":[{"class":"TPV","tag":"GLL","device":"/dev/ttySMX4","time":1276176096.000,"ept":0.005,"lat":47.239685500,"lon":6.019204667,"alt":268.100,...
Graphical clients
- cgps (ncurses based), installed by default:
# cgps -s -u m ┌───────────────────────────────────────────┐┌─────────────────────────────────┐ │ Time: 2019-06-10T13:41:26.0Z ││PRN: Elev: Azim: SNR: Used: │ │ Latitude: 47.238710 N ││ 8 07 079 00 N │ │ Longitude: 6.018278 E ││ 9 47 282 29 Y │ │ Altitude: 1055.4 m ││ 12 10 216 00 N │ │ Speed: 0.7 km/h ││ 15 79 194 39 Y │ │ Heading: 265.5 deg (true) ││ 17 00 000 22 N │ │ Climb: 0.0 m /min ││ 18 00 000 22 N │ │ Status: 3D FIX (43 secs) ││ 26 84 265 25 Y │ │ GPS Type: Generic NMEA ││ 27 61 291 33 Y │ │ Horizontal Err: +/- 83 m ││ │ │ Vertical Err: +/- 75 m ││ │ │ Course Err: n/a ││ │ │ Speed Err: +/- 114 km/h ││ │ │ ││ │ │ ││ │ │ ││ │ │ ││ │ │ ││ │ │ ││ │ └───────────────────────────────────────────┘└─────────────────────────────────┘
- Navit, etc....
Remote usage
- As gpsd can be used remotely, it can run on your SOM and you can launch graphical tool on your PC to visualize your datas like xgps (in order, IP adress of your gpsd/SOM, gpsd port, serial interface name):
$ xgps 192.168.0.31:2947:/dev/ttyAPP0
- or foxtrotgps: https://www.foxtrotgps.org/ (gpsd/your SOM IP address has to be configured in tool preferences GUI)