Skip to main content
GNSS HAT Library Documentation
Shop 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 UBX-TIM-TM2. The receiver detects rising and falling edges on the EXTINT pin (GPIO 17) and timestamps them with nanosecond accuracy.

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

Reading Time Mark Events

MethodBehavior
waitAndGetFreshTimeMark()Blocks until a new event arrives
timeMark()Returns last event or nullopt/None (non-blocking)
auto tm = hat->waitAndGetFreshTimeMark();
printf("rising TOW: %u ms + %u ns, accuracy: %u ns\n",
    tm.towRising_ms, tm.towSubRising_ns, tm.accuracyEstimate_ns);
tm = hat.wait_and_get_fresh_time_mark()
print(f"rising TOW: {tm.tow_rising_ms} ms + {tm.tow_sub_rising_ns} ns")

Software-Triggered Time Marks

hat->enableTimeMarkTrigger();    // configure GPIO 17 as output
hat->triggerTimeMark();          // toggle EXTINT → receiver timestamps the edge
auto tm = hat->waitAndGetFreshTimeMark();

Trigger Edge Options

ValueC++PythonDescription
ToggleETimeMarkTriggerEdge::ToggleTimeMarkTriggerEdge.TOGGLEToggle pin state (default)
RisingETimeMarkTriggerEdge::RisingTimeMarkTriggerEdge.RISINGForce pin HIGH
FallingETimeMarkTriggerEdge::FallingTimeMarkTriggerEdge.FALLINGForce pin LOW

See Navigation Data — TimeMark for the complete field reference.