Skip to content

Fix nsp clock sync#174

Merged
cboulay merged 2 commits intomasterfrom
fix_NSP_clock_sync
Apr 9, 2026
Merged

Fix nsp clock sync#174
cboulay merged 2 commits intomasterfrom
fix_NSP_clock_sync

Conversation

@cboulay
Copy link
Copy Markdown
Collaborator

@cboulay cboulay commented Apr 9, 2026

The nplay probe header->time is not filled correctly on the Gemini NSP. It seems to be derived from a different, buggy counter that runs at 95.6% of real time (exactly 0xE000 ticks per 2-second interval instead of 60000).

This PR adds a fallback method when the clock offset estimation is pure. It simply uses the most recently-received packet's timestamp compared to its receipt time, and assumes 700 microseconds of ESW processing + transmission latency.

I don't like hard-coding this kinds of assumptions but it's approximately correct based on some timing I've done with a raspberry pi slaved to the Gemini device's PTP clocks.

cboulay added 2 commits April 9, 2026 00:13
…late clock offset. Simply use the most recently-received packet's timestamp and assume 700 usec ESW processing + transmission latency.
@cboulay cboulay merged commit 07d2aea into master Apr 9, 2026
16 checks passed
@cboulay cboulay deleted the fix_NSP_clock_sync branch April 9, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant