Skip to content

Add standalone two-sensor Pulse Transit Time web lab - #210

Draft
yury-g wants to merge 6 commits into
masterfrom
agent/dual-channel-ptt-web-lab
Draft

Add standalone two-sensor Pulse Transit Time web lab#210
yury-g wants to merge 6 commits into
masterfrom
agent/dual-channel-ptt-web-lab

Conversation

@yury-g

@yury-g yury-g commented Aug 16, 2026

Copy link
Copy Markdown
Member

What changed

This PR now keeps the two products explicitly separate:

  • Signal Coach remains a one-sensor A0 coach with its own page, serial adapter, sender, documentation, and validation lane.
  • Pulse Transit Time Lab is a standalone two-sensor A0/A1 research app under docs/pulse-transit-time/, with its own page, strict PTT1 protocol, 500 Hz / 250000-baud sender, tests, documentation, and physical gate.
  • PTT deliberately imports only the transport-neutral signal-coach-core.mjs detection algorithm. No Signal Coach UI, protocol adapter, firmware identity, or validation result is shared.

The standalone PTT app adds:

  • synchronized A0 proximal / A1 distal acquisition;
  • independent channel quality, threshold, clipping, warmup, and pairing checks;
  • one-to-one same-cycle pairing in a configurable 5–300 ms window;
  • live threshold/window tuning that resets analysis without dropping the serial connection;
  • strict canonical unsigned-decimal PTT1,timestamp_us,proximal,distal parsing;
  • targeted, idempotent teardown for manual disconnect, EOF/read failure, and the selected-port disconnect event;
  • visible simulated-bench labeling that is absent from the normal URL.

The PR also retains the library-side fixed/adaptive-threshold support and stale-cycle PTT pairing hardening, and prevents the one-sensor Signal Coach sender from emitting a startup catch-up burst after its setup delay.

Verification

  • 6/6 Node protocol, core, and source-pack suites passed.
  • Headless browser lifecycle checks passed for EOF, read failure, manual disconnect, selected-device disconnect, unrelated-device disconnect, and live PTT tuning.
  • Arduino UNO R4 WiFi compiles passed:
    • Signal Coach sender: 52,048 bytes flash / 6,744 bytes RAM
    • standalone PTT sender: 52,288 bytes flash / 6,744 bytes RAM
    • library PTT example: 56,568 bytes flash / 6,848 bytes RAM
  • Checked-in and tutorial Signal Coach sender bodies match, including startup scheduling.
  • The PTT page's embedded sender matches the checked-in sketch.
  • Local links and git diff --check passed.
  • Independent adversarial review found no remaining P1–P3 issues.

Physical HOLD gate

This remains a draft. Browser simulation, compilation, and transport behavior are not physiological PTT evidence.

Before merge, publication, issue #202 closure, or customer notification, record a real two-sensor run showing:

  • A0 proximal and A1 distal with shared 5V/GND;
  • both channel quality states sustained at GOOD without clipping;
  • repeatedly increasing same-cycle accepted-pair count;
  • a reasonably stable median over a sustained placement;
  • a visibly fresh result after disconnect/reconnect;
  • exact placement, attachment, threshold, window, duration, and raw result notes.

PTT here is an educational timing experiment. It does not estimate blood pressure and is not for diagnosis or treatment.

@yury-g yury-g changed the title Add dual-sensor PTT mode to Signal Coach Add standalone two-sensor Pulse Transit Time web lab Aug 19, 2026
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