Crates.io | rgpsd |
lib.rs | rgpsd |
version | 0.1.1 |
source | src |
created_at | 2022-12-22 21:21:27.547779 |
updated_at | 2022-12-22 21:43:36.474723 |
description | A minimal replacement for gpsd in rust |
homepage | |
repository | https://gitlab.com/swcafe/rgpsd |
max_upload_size | |
id | 744120 |
size | 104,971 |
This is a rewrite of the C-based gpsd, which is pretty central to navigation. I use it to read packets from my NMEA2000 device as well as read from a backup GPS device; especially important to me is the NMEA 2000 canbus to GPS and AIS messages that opencpn can understand.
As it turns out, the C gpsd NMEA2000 driver doesn't currently parse AIS messages and translate them. It only seems to support GPS messages and some heading information. Looks like there is code there, it just doesn't seem to work. Worse yet, every now and then, it just quits. Restarting gpsd resolves the issue. The code is stricky, so it's just easier to start over in a memory safe language.
Run with: cargo run --release -- -D 3 -N -s 4800 /dev/ttyUSB0
(use your device and speed though)
The -D 3
specifies debugging level messages, which include device open and
close messages. If you just want info level, you can leave this off.
Currently it does just enough to make opencpn happy reading from it.
Hotlist of things to do next:
Low priority stuff:
There are a few things we are already doing better than gpsd did:
So I can't even get more than a second of CPU after running for a few hours now. Compared to gpsd, which took about 1 minute of CPU every hour, I'm very happy wih the performance. Timings, on my Dell i5, YMMV.