3 ms·
Why do people use gpsd instead of just reading $GPGLL or $GPRMC from /dev/ttyACM0 or /dev/ttyUSB0 or whatever, which always seemed far more reliable to me?
by dheera 5y ago
Why do people use gpsd instead of just reading $GPGLL or $GPRMC from /dev/ttyACM0 or /dev/ttyUSB0 or whatever, which always seemed far more reliable to me?
- gsich 5y agoAllows multiple applications to use a GPS source.
- dheera 5y agoOkay, then why not just take the /dev/ttyACM0 output and redirect it to a standard TCP port with like 5 lines of code? And can't multiple applications read a /dev/tty device read-only with just e.g. "cat /dev/ttyACM0"?
- BenjiWiebe 5y agoNo, multiple applications cannot read the same data from a tty device.
- rcxdude 5y agoTechnically you can (in that you won't usually get an error), but the result is not what you would want: each byte only gets delivered to one of the readers, in a somewhat unpredictable manner, either mangling the data or starving one of the readers
- AlotOfReading 5y agoThe faq answers this [1]. The issue is that GNSS vendors and standards need to clean up their act before you can do this reliably across different receivers. [1] https://gpsd.gitlab.io/gpsd/faq.html#why_not_parse_nmea https://gpsd.gitlab.io/gpsd/faq.html#why_not_parse_nmea
- dheera 5y agoI suppose. But I've had so many more problems with gpsd (especially when e.g. USB enumerates devices randomly) that on outdoor robots I've switched to parsing NMEA strings and binary data over serial directly, specifically for reliability reasons. Also I've had gpsd think some other non-GPS serial device was GPS, took up the port, and I got frustrated at its incompetency and apt-get uninstalled it.
- AlotOfReading 5y agoYeah, if gpsd sees anything with the right serial chip it'll assume it's a receiver. The whole thing pretty big pile of hacks, but it has utility nonetheless.