mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
feat: QO-100 beacon lock — robustness, persistence, FT8-aware UI
Builds on the beacon-lock baseline: keeps the proven display-FFT control
path (hardware-LO trim folded into the active transverter LOError), and
hardens it. The narrowband NCO/FLL scaffold (BeaconLock.pas) is removed —
it was never in the control path.
- RadioController:
* Persist live: each correction folds straight into the active xvtr
LOError (visible in Settings, survives restart as LNB calibration);
disk writes throttled. FBeaconLockHz is now only a session indicator.
* Robust tracking vs nearby signals: narrow ±2 kHz gate while locked
(±6 kHz only for acquisition), slew-rate outlier rejection (a sudden
centroid jump = interferer, not slow LNB drift → ignored), and lobe
shape validation in MeasureBeaconFFT (width + power symmetry) so a CW
carrier / one-sided neighbour isn't mistaken for the BPSK beacon.
Prominence measured over the in-window noise floor (gate-width robust).
* Fast convergence: feed-forward (predict post-retune position so the
window follows the beacon through the jump) + near-deadbeat correction
on the manual click → one click locks instead of repeated tapping.
* Single central BPSK beacon (10489.750); dead CoarseBeaconOffset and
unused throttle counters removed; stale NCO/FLL/4 Hz comments fixed.
- WDSPEngine: drop the per-sample TBeaconTracker RX-IQ tap (tracker gone).
- MainForm: BEACON is now a plain button, shown only on Pluto in a
transverter. Lock status (off / click / search / LOCK + correction +
prominence) moves to status-bar field 7 in place of PLL on Pluto;
openHPSDR keeps PLL there.
- SettingsForm/StatusBar: widen LO Error field to ±10 MHz (QO-100 LNBs
drift hundreds of kHz) and widen status field 7 for the beacon text.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-17
@@ -25,7 +25,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Math, SyncObjs,
|
||||
WDSP, BeaconLock;
|
||||
WDSP;
|
||||
|
||||
const
|
||||
// WDSP mode integers (нет именованных констант в WDSP.pas)
|
||||
@@ -292,7 +292,6 @@ type
|
||||
FMuted: Boolean;
|
||||
FVolume: Double;
|
||||
FLastError: string;
|
||||
FBeaconTracker: TBeaconTracker; // QO-100 beacon lock (НЕ владеем; см. контроллер)
|
||||
|
||||
function ModeToWDSP(Mode: Integer): Integer;
|
||||
procedure ApplyDefaultFilter;
|
||||
@@ -355,9 +354,6 @@ type
|
||||
procedure UpdateAGCLines(SpectrumW: Integer); // читает hang/thresh из WDSP для линии на спектре
|
||||
procedure SetSpectrumWidth(W: Integer); // обновляет FLastSpectrumW для корректных AGC линий
|
||||
procedure SetShift(ShiftHz: Double); // CTUN NCO сдвиг
|
||||
// QO-100 beacon lock: трекер кормится RX-IQ из DSP-потока. Владелец —
|
||||
// контроллер; движок лишь подаёт сэмплы и сообщает sample rate.
|
||||
procedure SetBeaconTracker(T: TBeaconTracker);
|
||||
procedure SetNRMode(Mode: Integer);
|
||||
procedure SetNR(Enable: Boolean);
|
||||
procedure SetNBMode(Mode: Integer);
|
||||
@@ -1123,7 +1119,6 @@ begin
|
||||
// Обновляем параметры
|
||||
FSampleRate := NewRate;
|
||||
FBufSize := FAudioBufSize * NewRate div FAudioRate;
|
||||
if FBeaconTracker <> nil then FBeaconTracker.Configure(FSampleRate);
|
||||
|
||||
// Перераспределяем буферы под новый размер
|
||||
SetLength(FRXIn, FBufSize * 2);
|
||||
@@ -1218,11 +1213,6 @@ begin
|
||||
|
||||
FeedDisplaySample(IR * SCALE, QR * SCALE);
|
||||
|
||||
// QO-100 beacon lock: тот же baseband-IQ @ FSampleRate (трекер сам
|
||||
// мгновенно выходит, если лок не активен — стоимость ~1 проверка/сэмпл).
|
||||
if FBeaconTracker <> nil then
|
||||
FBeaconTracker.Feed(IR * SCALE, QR * SCALE);
|
||||
|
||||
FRXAccI[FRXAccPos] := IR * SCALE;
|
||||
FRXAccQ[FRXAccPos] := QR * SCALE;
|
||||
Inc(FRXAccPos);
|
||||
@@ -1381,12 +1371,6 @@ begin
|
||||
UpdateAGCLines(FLastSpectrumW);
|
||||
end;
|
||||
|
||||
procedure TWDSPEngine.SetBeaconTracker(T: TBeaconTracker);
|
||||
begin
|
||||
FBeaconTracker := T;
|
||||
if (T <> nil) and (FSampleRate > 0) then T.Configure(FSampleRate);
|
||||
end;
|
||||
|
||||
procedure TWDSPEngine.SetShift(ShiftHz: Double);
|
||||
begin
|
||||
FShiftHz := ShiftHz;
|
||||
|
||||
Reference in New Issue
Block a user