Skip to content

FakePPS: raise the PPS edge before logging - #104

Merged
michalpelka merged 1 commit into
mainfrom
mp/fakepps-edge-first
Nov 30, 2026
Merged

michalpelka merged 1 commit into
mainfrom
mp/fakepps-edge-first

Conversation

@michalpelka

@michalpelka michalpelka commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The jitter line was printed to stdout (journald pipe, flushed by std::endl) between the busy-wait and gpiod_line_set_value, so the PPS edge went out after a write() of variable length.

Measured on MandEye IMU data (STM32 gps_time re-anchors on every PPS): timestamp steps at each second of 21.7 us RMS, up to 78 us, against 0.35 us within a second.

Change

Print the line after the GPIO edge instead of before it.

Test

Deployed on a MandEye RPi 5 with NTP disabled. The spread seen on the scope against GPS PPS with infinite persistence was RPi clock drift, not jitter: the edge moves steadily, with no random jumps.

Not yet re-checked on an IMU recording.

🤖 Generated with Claude Code

https://claude.ai/code/session_0158FTTDzFsuHg97qLmDZN8z

The jitter line was printed to stdout (journald pipe, flushed by
std::endl) between the busy-wait and gpiod_line_set_value, so the edge
went out after a write() of variable length. Print it after the edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTDzFsuHg97qLmDZN8z
@michalpelka
michalpelka force-pushed the mp/fakepps-edge-first branch from 80815c7 to 1774bc1 Compare November 30, 2026 00:10
@michalpelka
michalpelka merged commit 82aa5e3 into main Nov 30, 2026
1 of 2 checks passed
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