GPSD Integration
The library can forward NMEA sentences (GGA, RMC, GSA, GSV, ZDA) to a virtual serial port for gpsd.
hat->startForwardForGpsd();
printf("gpsd device: %s\n", hat->getGpsdDevicePath().c_str());
while (running)
{
auto nav = hat->waitAndGetFreshNavigation();
}
hat->stopForwardForGpsd();
hat.start_forward_for_gpsd()
print(f"gpsd device: {hat.get_gpsd_device_path()}")
while running:
nav = hat.wait_and_get_fresh_navigation()
hat.stop_forward_for_gpsd()
The TIME HAT outputs NMEA natively on /dev/ttyAMA0. gpsd can read it directly — no library needed.
Plug a USB cable from the HAT to the Pi — the module appears as /dev/ttyACM0. gpsd reads it directly.
NoteUSB Shortcut — USB is the simplest way to get gpsd running on the L1 and RTK HATs. No bridge daemon, no library needed. JustDEVICES="/dev/ttyACM0"in gpsd config.
For production use, the jpgnss2gpsd-bridge systemd daemon creates /dev/jimmypaputto/gnss at boot. See GPSD Daemon Guide.