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

Time Mark

Precise event timestamping via the EXTINT pin (GPIO 17) using UBX-TIM-TM2.

Source: examples/CPP/TimeMark/, examples/C/TimeMark/, examples/Python/time_mark.py

Note
HAT Compatibility — Time mark is available only on the L1/L5 TIME HAT (NEO-F10T).

Code

config.timing = TimingConfig {
    .enableTimeMark = true,
    .timeBase = std::nullopt
};
hat->start(config);

hat->enableTimeMarkTrigger();
hat->triggerTimeMark();

auto tm = hat->waitAndGetFreshTimeMark();
printf("rising TOW: %u ms + %u ns, accuracy: %u ns\n",
    tm.towRising_ms, tm.towSubRising_ns, tm.accuracyEstimate_ns);
config['timing'] = {
    'enable_time_mark': True,
    'time_base': None
}
hat.start(config)

hat.enable_time_mark_trigger()
hat.trigger_time_mark()

tm = hat.wait_and_get_fresh_time_mark()
print(f"rising TOW: {tm.tow_rising_ms} ms + {tm.tow_sub_rising_ns} ns")
print(f"accuracy: {tm.accuracy_estimate_ns} ns")

Running

python3 examples/Python/time_mark.py