mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-10 15:31:21 +00:00
fix(gui): GUI-C3 — derive live-mode range/velocity resolution from waveform
RadarDataWorker (live capture path) was converting bin indices to physical units using RadarSettings placeholders (range_resolution=6.0, velocity_resolution=1.0). The 1.0 m/s velocity figure was a stub — the correct value at 167us PRI / 16-chirp sub-frame / 10.5 GHz carrier is ~5.34 m/s, so reported velocities were off by ~5.3x. ReplayWorker already used WaveformConfig.range_resolution_m and velocity_resolution_mps; this commit applies the same pattern to the live worker. WaveformConfig defaults match the AERIS-10 3 km mode parameters. A set_waveform() hook is provided so the dashboard can swap configs when range-mode switching is wired through. Verified: 83/83 v7 GUI tests pass.
This commit is contained in:
@@ -84,8 +84,16 @@ class RadarDataWorker(QThread):
|
|||||||
self._recorder = recorder
|
self._recorder = recorder
|
||||||
self._gps = gps_data_ref
|
self._gps = gps_data_ref
|
||||||
self._settings = settings or RadarSettings()
|
self._settings = settings or RadarSettings()
|
||||||
|
# GUI-C3: derive range/velocity resolution from waveform parameters
|
||||||
|
# rather than the RadarSettings placeholders (1.0 m/s velocity was
|
||||||
|
# ~5.3x off for the 167us PRI / 16-chirp sub-frame at 10.5 GHz).
|
||||||
|
from .models import WaveformConfig
|
||||||
|
self._waveform = WaveformConfig()
|
||||||
self._running = False
|
self._running = False
|
||||||
|
|
||||||
|
def set_waveform(self, wf) -> None:
|
||||||
|
self._waveform = wf
|
||||||
|
|
||||||
# Frame queue for production RadarAcquisition → this thread
|
# Frame queue for production RadarAcquisition → this thread
|
||||||
self._frame_queue: queue.Queue = queue.Queue(maxsize=4)
|
self._frame_queue: queue.Queue = queue.Queue(maxsize=4)
|
||||||
|
|
||||||
@@ -180,8 +188,8 @@ class RadarDataWorker(QThread):
|
|||||||
|
|
||||||
# Extract detections from FPGA CFAR flags
|
# Extract detections from FPGA CFAR flags
|
||||||
det_indices = np.argwhere(frame.detections > 0)
|
det_indices = np.argwhere(frame.detections > 0)
|
||||||
r_res = self._settings.range_resolution
|
r_res = self._waveform.range_resolution_m
|
||||||
v_res = self._settings.velocity_resolution
|
v_res = self._waveform.velocity_resolution_mps
|
||||||
|
|
||||||
for idx in det_indices:
|
for idx in det_indices:
|
||||||
rbin, dbin = idx
|
rbin, dbin = idx
|
||||||
|
|||||||
Reference in New Issue
Block a user