Commit Graph
16 Commits
Author SHA1 Message Date
aweandClaude Opus 4.8 6f1eaf19e4 cart: вынести SBUS и логику пульта в отдельные модули
Подготовка к ролям TX/RX: выделяю из монолитного main.cpp
переиспользуемые части без изменения поведения.

- sbus.{h,cpp}: упаковка 25-байтового SBUS-кадра, инициализация и
  вывод инвертированного SBUS на USART1 (PA9) — единственный владелец
  провода к драйверу, общий для будущих ролей.
- stick.{h,cpp}: калибровка стика, нормализация осей и профиль
  газа/поворота, формирование ch[16]. Неиспользованные в прежнем loop
  expo()/toSbus() и мёртвые константы не переносятся.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-19 13:12:07 +03:00
aweandClaude Fable 5 7329750c0c sar3d: fixed default scene window X [-2,2], Y [-0.5,2], Z [0,8] m
The grid bounds are now explicit config (sar3d_x/y/z_min/max_m) instead of
being derived from the antenna span and the depth gate. The depth mask
still zeroes voxels outside [min_depth, max_depth], so the wider Z window
just shows the masked wedge. The bound fields are double: the parity tool
recomputes the notebook-derived bounds (notebook_grid_bounds) and passes
them through the live config, and a float roundtrip shifted the axes by
~1e-7 m, flipping depth-mask knife-edge voxels against the reference npz.
Parity on frames 0034-0036 unchanged (1.3e-6, axes bit-match).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-25 17:12:18 +03:00
aweandClaude Fable 5 60f6c9e567 sar3d: chunk the aperture kernel over voxels to survive low free VRAM
Full-volume acc/cnt device buffers (~115 MB for the 9.6M-voxel grid) plus
the CUDA context did not fit next to a desktop session that had taken the
T600's 4 GB down to ~190 MB free, so every frame died with cuMemAlloc OOM
and the GUI showed no sar3d picture. The kernel now processes
[gid_begin, gid_end) ranges and the host launches it in 2M-voxel chunks
reusing one ~24 MB buffer pair. Parity vs the reference volumes is
unchanged (max diff 1.3e-6).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-25 17:01:22 +03:00
aweandClaude Fable 5 e1dfbec712 sar3d: python plumbing for the new parameters and real replay timing
- replay_raw_producer carries the RECORDED per-trace capture windows
  from each snapshot's meta.json (re-anchored by the same shift as the
  frame time) instead of one synthetic window for all traces — without
  this the segmented timing model degenerates in replay;
- GUI/profile/orchestration swap the removed window knobs
  (center_depth, half_width_*, grid_n*) for the notebook parameters
  (ground depth, pitch override, voxel pitch, Y range, X margin, norm
  edge margin, smooth sigma, comp power, tx per segment).

Headless replay smoke on the 20260922_mine_fast_true dataset passes:
51 sar3d result collections, transparent preprocessor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-25 16:42:14 +03:00
aweandClaude Fable 5 b8cb572bc4 sar3d: port the Multi_antenna_3D_clean_v1 notebook algorithm
The old sar3d core was a port of the superseded Horns_3D notebook and
produced wrong volumes. The compute core now follows the reference
notebook exactly:

- segmented_interleaved frame timing rebuilt from per-trace capture
  stamps (uniform tx_per_segment split as the no-stamps fallback), with
  the coarse inter-segment dtau and the intra-sweep dtau applied as one
  phase ramp before the IFFT;
- ground scene coordinates with the ground_depth_m lift (scene Y=0 is
  the ground), full-region grid instead of a window around a center
  depth, geo_ref compensation anchored on the ground plane, power 0.3;
- notebook finalization in C++: |acc/cnt|, depth mask, normalization
  without the Y-edge planes, separable Gaussian over (Z, X), level;
- CUDA kernel computes geometry in double: float32 loses ~3e-4 of an
  A-scan sample in tau and drifts ~1e-4 from the float64 reference.

Live-config keys follow: the center_depth/half_width/grid_n window knobs
are replaced by ground/voxel/y-range/margin/sigma/power/tx_per_segment.

Parity against the notebook npz exports (frames 0034-0036 of the
20260922_mine_fast_true dataset): max|diff| <= 1.6e-6 off the depth-mask
knife edge, identical argmax, level rel diff <= 7e-7. Verified via
make sar3d_parity --dump-dir + scripts/sar3d_volume_compare.py; the
executable spec lives in scripts/sar3d_reference_check.py (bit-tight
against the npz, including the animation shifted-grid arithmetic).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-25 16:42:01 +03:00
aweandClaude Fable 5 e9a0b43ed3 revert gpr heatmap threshold, keep it for sar3d only
The display threshold from 'add treshhold' (e113ef6) was meant for the
sar3d projections; the GPR heatmap goes back to full-range levels and
the constant moves into sar3d_plot_mixin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-25 14:52:20 +03:00
awe ebf0462d85 Revert "move to new version"
This reverts commit e202f57ef8.
2026-09-25 14:51:04 +03:00
awe 243963063c make gpr update 2026-09-21 13:39:04 +03:00
awe f0ad4e6185 jetson compile fix 2026-09-18 16:34:44 +03:00
awe fa9da949df jetsom compile 2026-09-17 19:26:22 +03:00
awe e202f57ef8 move to new version 2026-09-17 17:58:36 +03:00
awe e113ef60ab add treshhold 2026-09-17 16:43:22 +03:00
awe 16ccafff69 test new version 2026-09-16 13:22:21 +03:00
awe b3339d101c projector version 2026-09-15 19:06:05 +03:00
aweandClaude Opus 4.8 e219f6ec02 Add laser temperature monitoring for current-variation runs
Independent monitor + checker for CHANGE_CURRENT_LD1 variation, where the
board sweeps LD1 current autonomously while both laser temperatures must stay
on their static setpoints. Nothing previously verified that the setpoints were
actually reached, so a stale temperature silently corrupted measurements.

New package python_app/hardware_full/laser_control/monitoring/:
- session.py: LaserVariationSession snapshot (targets + tolerance frozen at start)
- readings_channel.py: JSONL append/tail channel for per-sweep readings
- monitor.py: LaserTemperatureMonitor polls the board once per sweep, publishes
- checker.py: LaserTemperatureChecker validates temp1/temp2 vs targets (0.03 C),
  warns to console per laser with anti-spam state

CLI entry points scripts/laser_temp_monitor.py and scripts/laser_temp_checker.py
run as independent processes communicating via IPC files.

Also: add temp_tolerance_c to LaserVariationModeModel (schema + codec round-trip)
and write the session snapshot from apply_kamil_adc_laser_control's variation path
so the checker works with pipeline-started runs too.

Tests in tests/test_laser_temp_monitoring.py (17 cases); existing laser-control
protocol and config-codec suites remain green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-27 21:41:14 +03:00
awe 52c1218bf7 Independent monitor + checker for CHANGE_CURRENT_LD1 variation 2026-07-27 16:24:58 +03:00