Skip to content

Rx UNIX_EPOCH timestamps add the epoch offset once per hardware packet #381

Open

Description

@dmitrymmm

In TRXLooper::ReceivePacketsLoop the user packet's timestamp is initialized once per DMA buffer, but the epoch correction sits inside the per-sub-packet loop:

for (int i = 0; i < srcPktCount; ++i)
{
    ...
    if (mConfig.timestampType == TimestampType::UNIX_EPOCH)
    {
        userPkt->meta.timestamp = userPkt->meta.timestamp + Timespec(startUnixTime);
        userPkt->meta.timestamp = userPkt->meta.timestamp - fpgaFrontEndDelay;
    }
}

One user packet aggregates packetsToBatch hardware packets (3 at 30.72 Msps with the default heuristic), so the delivered timestamp becomes hwts + N*startUnixTime - N*delay. With startUnixTime around 1.75e9 seconds the reported Rx time is billions of seconds in the future.

Activity

  1. dmitrymmm commented on Aug 3, 2026

    @dmitrymmm
    ContributorAuthor

    Fix submitted in #376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions