Crates.io | gpsd_proto |
lib.rs | gpsd_proto |
version | 1.0.0 |
source | src |
created_at | 2018-10-09 22:48:59.150336 |
updated_at | 2023-11-01 08:49:52.268169 |
description | The gpsd_proto module contains types and functions to connect to gpsd to get GPS coordinates and satellite information. |
homepage | https://github.com/bwolf/gpsd_proto.git |
repository | https://github.com/bwolf/gpsd_proto.git |
max_upload_size | |
id | 88974 |
size | 68,019 |
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.
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.
Important reference documentation of gpsd
are the JSON
protocol and the client
HOWTO.
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};