Skip to content

Relative Noise Floor Scaling (client-side auto-adjust) #66

Description

@ten9876

Feature

Implement client-side noise floor auto-adjust for the FFT display. When enabled, automatically adjusts min_dbm so the noise floor sits at a user-configurable position (0-100%) in the FFT display.

Background

  • The radio reports noise_floor_position and noise_floor_position_enable in display pan status
  • These fields are read-onlydisplay pan set noise_floor_position=N returns 5000002D (incorrect parameter)
  • SmartSDR must implement this client-side by measuring the noise floor from FFT data and adjusting min_dbm/max_dbm

Current State

  • UI controls (Floor slider + On/Off button) were built and removed — the auto-adjust algorithm needs tuning
  • Initial implementation measured 20th percentile of smoothed FFT bins and adjusted min_dbm every 10 frames
  • Problems observed: oscillation, jitter, and incorrect floor tracking

Proposed Approach

  1. Use a slower update rate (every 50-100 frames instead of 10)
  2. Heavier smoothing on the noise floor estimate (exponential moving average)
  3. Hysteresis — only adjust if the error exceeds a threshold (e.g., 3 dB)
  4. Damped adjustment — move min_dbm gradually toward the target, not in one step

Code Reference

  • src/gui/SpectrumWidget.hm_noiseFloorEnable, m_noiseFloorPosition members (still present)
  • src/gui/SpectrumWidget.cpp — auto-adjust block in updateSpectrum() (still present, just unwired)
  • src/gui/SpectrumOverlayMenu.cpp — UI controls removed, signals still in header
  • src/models/RadioModel.cppsetPanNoiseFloorPosition/Enable (can be removed, radio doesn't accept)

Related

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing featurepriority: mediumMedium priorityspectrumPanadapter and waterfall

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions