#protocol #gps

gpsd_proto

The gpsd_proto module contains types and functions to connect to gpsd to get GPS coordinates and satellite information

14 unstable releases (6 breaking)

0.7.0 Sep 1, 2020
0.6.0 Jan 3, 2020
0.5.1 Aug 18, 2019
0.4.1 Aug 13, 2019
0.1.4 Oct 11, 2018

#327 in Network programming

Download history 4/week @ 2021-10-04 18/week @ 2021-10-11 5/week @ 2021-10-18 17/week @ 2021-11-01 20/week @ 2021-11-08 47/week @ 2021-11-15 19/week @ 2021-11-22 50/week @ 2021-11-29 94/week @ 2021-12-06 10/week @ 2021-12-13 36/week @ 2021-12-20 295/week @ 2021-12-27 24/week @ 2022-01-03 80/week @ 2022-01-10 197/week @ 2022-01-17

596 downloads per month

Apache-2.0

30KB
391 lines

gpsd_proto   Build Status Latest Version Latest Docs Coverage Status

The gpsd_proto module contains types and functions to connect to gpsd to get GPS coordinates and satellite information.

gpsd_proto uses a plain TCP socket to connect to gpsd, reads and writes JSON messages. The main motivation to create this crate was independence from C libraries, like libgps (provided by gpsd) to ease cross compiling.

A example demo application is provided in the example sub directory. Check the repository for up to date sample code.

Testing

gpsd_proto has been tested against gpsd version 3.17 on macOS and Linux with these devices:

Feel free to report any other supported GPS by opening a GitHub issue.

Reference documentation

Important reference documentation of gpsd are the JSON protocol and the client HOWTO.

Development notes

Start gpsd with a real GPS device:

/usr/local/sbin/gpsd -N -D4 /dev/tty.SLAB_USBtoUART

Or start gpsd with a TCP stream to a remote GPS:

/usr/local/sbin/gpsd -N -D2 tcp://<IP>:<PORT>

Test the connection to gpsd with telnet localhost 2947 and send the string:

?WATCH={"enable":true,"json":true};

Dependencies

~0.8–1.5MB
~35K SLoC

N_