mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
feat: QO-100 beacon lock — stabilise LNB drift to NB transponder beacon
Click the beacon on the spectrum; the controller tracks it and continuously trims the transverter LO so the whole downlink stays put as the LNB drifts. - BeaconLock.pas: TBeaconTracker scaffold (narrowband NCO/FLL) — kept but no longer in the control path (FLL diverged on the suppressed-carrier BPSK beacon + Pluto DC offset). Measurement now uses the proven display-FFT path. - RadioController: FBeaconLockHz folded into XvtrTranslate (on top of LOError). MeasureBeaconFFT finds the beacon by POWER-WEIGHTED CENTROID of the lobe (BPSK has a suppressed carrier → broad symmetric ~2.4 kHz lobe, not a line; a peak-finder jitters, the centroid sits on the carrier). Track position in ABSOLUTE display Hz (FBeaconTrackHz) so scrolling the waterfall/centre never moves the search window off the beacon. Closed loop: e = tracked - ref, d(e)/d(LockHz) = -1 -> LockHz += gain*e; settle cooldown after each correction (display-FFT lags the LO retune -> avoids overshoot); deadband 75 Hz + centroid/prominence smoothing + lock hysteresis for a steady lock. Correction applied only after the user clicks (manual seed), so a crowded band can't pull a neighbour to the reference. - WDSPEngine: SetBeaconTracker + RX-IQ tap (tracker idle now, ~1 check/sample). - SpectrumView + GL: beacon markers — green = reference (10489.750), orange = tracked centroid. - MainForm: BEACON button (RX block, XVTR-only). Flow: BEACON -> "CLICK BCN" -> click beacon -> "L<corr> /<prom>". ServiceBeaconLock driven by MeterTimer. Reference defaults to the middle BPSK beacon 10489.750. Tested on-air against Es'hail-2: locks and holds, survives waterfall drag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,7 @@ type
|
||||
procedure DrawAGCLines(W, H: Integer; DBmax, InvRange: Double);
|
||||
procedure DrawSpectrumCurve(W, H: Integer; DBmax, InvRange: Double);
|
||||
procedure DrawMarker(W, H: Integer);
|
||||
procedure DrawBeaconMarkersGL(W, H: Integer);
|
||||
procedure DrawADCOverlay(W, H: Integer);
|
||||
procedure DrawCachedOverlays(W, H: Integer);
|
||||
function FormatFreqGL(Hz: Double): string;
|
||||
@@ -656,6 +657,21 @@ begin
|
||||
else DrawTexture(FMarkerLabelTex, MX - 4 - FMarkerLabelTex.W, 4);
|
||||
end;
|
||||
|
||||
procedure TSpectrumViewOpenGL.DrawBeaconMarkersGL(W, H: Integer);
|
||||
// QO-100 beacon-маркеры: опорная частота (зелёная) + позиция трекера (оранж).
|
||||
procedure Vline(FreqHz: Double; Col: TColor);
|
||||
var x: Integer;
|
||||
begin
|
||||
if FSpanHz <= 0 then Exit;
|
||||
x := Round((FreqHz - (FCenterFreq - FSpanHz / 2)) / FSpanHz * W);
|
||||
if (x < 0) or (x >= W) then Exit;
|
||||
DrawLine(x, 0, x, H, Col, 1, False);
|
||||
end;
|
||||
begin
|
||||
Vline(FBeaconRefFreq, clLime); // где маяк ДОЛЖЕН быть
|
||||
Vline(FBeaconTrkFreq, TColor($000AA5FF)); // где сидит трекер (оранж)
|
||||
end;
|
||||
|
||||
procedure TSpectrumViewOpenGL.DrawADCOverlay(W, H: Integer);
|
||||
var
|
||||
B: TBitmap;
|
||||
@@ -781,6 +797,7 @@ begin
|
||||
DrawAGCLines(W, H, DBmax, InvRange);
|
||||
DrawSpectrumCurve(W, H, DBmax, InvRange);
|
||||
DrawMarker(W, H);
|
||||
if FBeaconMarkActive then DrawBeaconMarkersGL(W, H);
|
||||
DrawADCOverlay(W, H);
|
||||
DrawCachedOverlays(W, H);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user