Lab042: transmit an image over the air, add the air loopback mode

First transmission through a real radio path in the project. A 4756-byte
JPEG went from transmitter to receiver over two antennas 60 cm apart at
225 MHz and reassembled byte-identical, reproduced across three runs.

The cable loopback still needs an SMA male-to-male adapter that has not
arrived, so this air run is a track verification, not the controlled
measurement: room levels are not held the way a cable holds them. Its
purpose was to exercise the device wrapper the models cannot cover.

Four defects the software model passed but the hardware exposed, each
reproduced and fixed:

- a 566 528-sample frame did not fit the 262 144 receive buffer, and the
  sample stream is not continuous across separate reads, so a frame on the
  seam was destroyed. Reception now uses one buffer sized to the frame
- carrier correction was always applied, but with a shared reference the
  true offset is near zero and the 80-symbol marker estimate is noise;
  correcting by it rotated phase along the whole frame, 65% bit errors
  measured. Ported should_apply_cfo_correction from Lab023
- receiver gain of 20 dB left the signal at 0.0003 of full scale. Levels
  set by measurement: RX 50 dB, TX -10 dB give zero bit errors with margin
- the error-vector metric returned zero on a failed receive, reporting a
  perfect signal where there was none, the same class of defect as the
  written-in figures of Lab041. Replaced with an explicit not-computed value

The air TX gain ceiling is now derived from the link budget by antenna
distance rather than a constant. Three loopback modes: software, cable,
air. PROJECT_LOG entry 019 records the run and the defects.

Software and cable results stay reproducible; 125 tests pass, gate passes.
This commit is contained in:
LittleSam129
2026-08-17 11:50:04 +03:00
parent 13f183f7c7
commit fce14f038e
11 changed files with 441 additions and 49 deletions

View File

@@ -0,0 +1,11 @@
index,packet_bytes,frame_bits,correlation_score,sample_phase,carrier_offset_hz,carrier_coherence,cfo_correction_applied,error_vector_magnitude,frame_found,header_parsed,crc_valid,fragment_recovered
0,536,4384,0.9995083676316812,15,-0.8161804653898344,0.9999521460387033,False,0.013939054015288657,True,True,True,True
1,536,4384,0.9994247234007716,49,0.034058565997241885,0.9999449532988285,False,0.007533311365459869,True,True,True,True
2,536,4384,0.9995067920215722,121,-0.4024654150100275,0.9999698768639075,False,0.007802389734928202,True,True,True,True
3,536,4384,0.9995973624847003,79,0.05360429263743072,0.9999563681724133,False,0.008067411996806204,True,True,True,True
4,536,4384,0.9995573203179389,37,-0.7726047795897841,0.999951969069221,False,0.008830283803028178,True,True,True,True
5,536,4384,0.9994972026358666,35,0.14518673176235097,0.9999740428064059,False,0.007829934600060385,True,True,True,True
6,536,4384,0.9994993201100448,33,-0.6575975246787777,0.9999581020309138,False,0.008192298206454165,True,True,True,True
7,536,4384,0.9995337736352732,97,-0.32146831121434616,0.9999654759558527,False,0.00773812855638587,True,True,True,True
8,536,4384,0.9995377136427829,90,-0.32692415971800415,0.9999706666958124,False,0.008197030505111991,True,True,True,True
9,172,1472,0.9994478378475372,53,-0.6175162038574342,0.9999730687021144,False,0.011683449034017782,True,True,True,True
1 index packet_bytes frame_bits correlation_score sample_phase carrier_offset_hz carrier_coherence cfo_correction_applied error_vector_magnitude frame_found header_parsed crc_valid fragment_recovered
2 0 536 4384 0.9995083676316812 15 -0.8161804653898344 0.9999521460387033 False 0.013939054015288657 True True True True
3 1 536 4384 0.9994247234007716 49 0.034058565997241885 0.9999449532988285 False 0.007533311365459869 True True True True
4 2 536 4384 0.9995067920215722 121 -0.4024654150100275 0.9999698768639075 False 0.007802389734928202 True True True True
5 3 536 4384 0.9995973624847003 79 0.05360429263743072 0.9999563681724133 False 0.008067411996806204 True True True True
6 4 536 4384 0.9995573203179389 37 -0.7726047795897841 0.999951969069221 False 0.008830283803028178 True True True True
7 5 536 4384 0.9994972026358666 35 0.14518673176235097 0.9999740428064059 False 0.007829934600060385 True True True True
8 6 536 4384 0.9994993201100448 33 -0.6575975246787777 0.9999581020309138 False 0.008192298206454165 True True True True
9 7 536 4384 0.9995337736352732 97 -0.32146831121434616 0.9999654759558527 False 0.00773812855638587 True True True True
10 8 536 4384 0.9995377136427829 90 -0.32692415971800415 0.9999706666958124 False 0.008197030505111991 True True True True
11 9 172 1472 0.9994478378475372 53 -0.6175162038574342 0.9999730687021144 False 0.011683449034017782 True True True True