Commit Graph

13 Commits

Author SHA1 Message Date
LittleSam129
c9569164e0 Add protocol/bpsk_radio: reusable BPSK radio primitives
Lab042 cannot reuse the DSP from the earlier labs the way its
specification assumed. Three blockers turned up on inspection:

- importing lab018, lab019 or lab023 creates directories and writes .npy,
  .png and report files at module level, so importing them silently
  re-runs their experiments
- build_radio_frame() takes no arguments and encodes a fixed text message
- decode_radio_frame() returns a status string rather than the payload

So the verified primitives move into a module that is safe to import and
does no work of its own. Function bodies are carried over verbatim, and
the source lab is named above each one:

- from Lab023: bytes_to_bits, bits_to_bytes, bpsk_modulate,
  bpsk_demodulate, estimate_carrier_parameters, correct_phase_and_frequency
- from Lab019: build_frame_marker, find_radio_frame
- from Lab018: root_raised_cosine_taps

build_radio_frame and parse_radio_frame are written fresh here to carry
arbitrary payloads; the on-air structure is unchanged, still preamble,
sync word, length, packet.

Verified against the originals by loading their function definitions in
isolation and comparing outputs: 31 comparisons, no divergence, including
the CFO estimator over random phase and frequency offsets.

End-to-end check with no hardware: a 5828-byte JPEG through fragments,
packets, frames, shaping at 128 samples per symbol and matched filtering
recovers 12 of 12 fragments and reassembles byte-identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 14:16:32 +03:00
LittleSam129
f26d7d74ef Lab041: add session and restart safety 2026-08-05 14:14:24 +03:00
LittleSam129
88addff5b6 Lab040: add persistent emergency intent and safe reset 2026-08-05 13:12:49 +03:00
LittleSam129
b3ebe1637f Lab039: model two-stage failsafe braking 2026-08-05 11:44:43 +03:00
LittleSam129
23cfdf581b Lab038: add control failsafe and emergency acknowledgement 2026-08-04 14:06:50 +03:00
LittleSam129
50e45ca611 Lab037: evaluate control repetition on lossy link 2026-08-04 13:18:49 +03:00
LittleSam129
22c2eeab8c Lab035: add proactive video frame admission 2026-08-03 15:42:16 +03:00
LittleSam129
b63e36abdb Lab034: evaluate stale video frame dropping 2026-08-03 13:17:55 +03:00
LittleSam129
21751f41dd Lab033: add priority link scheduler 2026-08-03 12:21:49 +03:00
LittleSam129
2ac1571c40 Lab031: evaluate FEC packet interleaving 2026-07-29 12:25:51 +03:00
LittleSam129
edab87b5d2 Lab030: add packet erasure FEC 2026-07-29 11:40:37 +03:00
LittleSam129
04ce66fdfe Lab028: add video packetization and CRC reassembly 2026-07-27 13:46:01 +03:00
LittleSam129
1ff04b12b9 Repair project layout and fix Lab024B spectrum detection 2026-07-21 13:51:41 +03:00