Skip to main content
GNSS Documentation
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Timepulse

The u-blox module outputs a configurable pulse signal on GPIO 5 — typically used as PPS (Pulse Per Second) for time synchronization.

Usage

hat->enableTimepulse();
while (true)
{
    hat->timepulse();
    auto nav = hat->navigation();
    printf("PPS! %s\n",
        Utils::utcTimeFromGnss_ISO8601(nav.pvt).c_str());
}
hat->disableTimepulse();
hat.enable_timepulse()
while True:
    hat.timepulse()  # blocks until next PPS, releases GIL
    nav = hat.get_navigation()
    print(f"PPS! {gnsshat.utc_time_iso8601(nav)}")
hat.disable_timepulse()
Note
Kernel PPS Conflict — If you use the kernel PPS driver for chrony/gpsd (via dtoverlay=pps-gpio,gpiopin=5), do not call enableTimepulse() from the library. Both claim GPIO 5 and cannot coexist.
Note
GPSD Conflict — Do not use enableTimepulse() when gpsd/pps is managing the same GPIO pin.

See Timepulse Configuration for full details.