Goby3 3.2.3
2025.05.13
|
The goby_gps
application publishes data from the widely used GPS server, gpsd
. It does not directly read data from the NMEA-0183 serial stream of the GPS. While this slightly increases the complexity of setup, the benefits of serving GPS data using gpsd
usually outweighs the drawback of this additional application. For example, NTP and Chronyd can directly receive GPS data from gpsd
and correct the system time based on the GPS time.
gpsd has comprehensive documentation of its own, so there's no need to duplicate that information here.
For Debian/Ubuntu systems, setting up gpsd is usually as simple as:
and then editing /etc/default/gpsd
to specify your GPS devices. For example, if your GPS is connected to the serial port /dev/ttyS0
, you would change the DEVICES line to read:
Then reboot or do a
It is very helpful to check that GPS data is correctly coming into gpsd
using one of the various tools, such as cgps
:
If you see valid time, latitude, longitude, etc., then gpsd
is set up correctly. If not, check your serial port and consider directly examining the NMEA traffic using minicom
or a similar tool.
goby_gps
is a client for GPSD using the TCP / JSON protocol.
Upon startup goby_gps
connects to gpsd
using a TCP client and then sends a WATCH
command to gpsd
to enable streaming of GPS data.
goby_gps
handles three types of gpsd
data: TPV (time-position-velocity), SKY (sky view of the GPS satellites), and ATT (vehicle attitude). These are converted from JSON into equivalent Protocol Buffers messages and published on the ZeroMQ interprocess layer.
The groups are defined in:
and the Protobuf messages are in goby/src/middleware/protobuf/gpsd.proto
and can be included using:
If you're only interested in position data, you can simply subscribe to the TPV data from another ZeroMQ-based application: