mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 12:36:07 -05:00
The waterfall mapped 256 palette indexes over the absolute dBFS level of the mean bin value, about 2.5 steps per dB at a -100 dBFS floor, so weak signals were only a few steps above the noise. WaterfallScaler now tracks the noise floor as a smoothed 25th percentile of the bins (robust to occupied spans) and maps a fixed 45 dB span above it, so contrast no longer depends on sample size, DFT size or tuner gain. The classic palette's flat blue blocks are replaced with a blue ramp over the bottom quarter, where the noise floor now sits. Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
@@ -55,6 +55,8 @@ public abstract class DftSpectralDisplay extends StackPane
|
||||
private static final String PEAK_HOLD = "peak.hold";
|
||||
private static final String SPECTRUM_ENABLED = "spectrum.enabled";
|
||||
private static final String WATERFALL_ENABLED = "waterfall.enabled";
|
||||
private static final String WATERFALL_RANGE = "waterfall.range";
|
||||
private static final String WATERFALL_AVERAGING = "waterfall.averaging";
|
||||
private static final String DIVIDER_POSITION = "divider.position";
|
||||
private static final String DECIBEL_SCALE = "decibel.scale";
|
||||
private static final String CONFIG_PINNED = "config.pinned";
|
||||
@@ -121,6 +123,9 @@ public abstract class DftSpectralDisplay extends StackPane
|
||||
});
|
||||
mSpectralDisplay.averagingProperty().addListener((ob, ov, nv) -> save(AVERAGING, nv.intValue()));
|
||||
mSpectralDisplay.peakHoldProperty().addListener((ob, ov, nv) -> save(PEAK_HOLD, nv));
|
||||
mSpectralDisplay.waterfallRangeProperty().addListener((ob, ov, nv) -> save(WATERFALL_RANGE, nv.intValue()));
|
||||
mSpectralDisplay.waterfallAveragingProperty().addListener((ob, ov, nv) ->
|
||||
save(WATERFALL_AVERAGING, nv.intValue()));
|
||||
mSpectralDisplay.dividerPositionProperty().addListener((ob, ov, nv) ->
|
||||
save(DIVIDER_POSITION, String.valueOf(nv.doubleValue())));
|
||||
mDecibelLayer.visibleProperty().addListener((ob, ov, nv) -> save(DECIBEL_SCALE, nv));
|
||||
@@ -205,6 +210,12 @@ public abstract class DftSpectralDisplay extends StackPane
|
||||
mSpectralDisplay.averagingProperty().set(Math.max(SpectralDisplay.AVERAGING_MINIMUM,
|
||||
Math.min(SpectralDisplay.AVERAGING_MAXIMUM, averaging)));
|
||||
mSpectralDisplay.peakHoldProperty().set(properties.get(key(PEAK_HOLD), false));
|
||||
mSpectralDisplay.waterfallRangeProperty().set(Math.max(WaterfallScaler.RANGE_MINIMUM,
|
||||
Math.min(WaterfallScaler.RANGE_MAXIMUM, properties.get(key(WATERFALL_RANGE),
|
||||
WaterfallScaler.RANGE_DEFAULT))));
|
||||
mSpectralDisplay.waterfallAveragingProperty().set(Math.max(WaterfallScaler.AVERAGING_MINIMUM,
|
||||
Math.min(WaterfallScaler.AVERAGING_MAXIMUM, properties.get(key(WATERFALL_AVERAGING),
|
||||
WaterfallScaler.AVERAGING_DEFAULT))));
|
||||
mDecibelLayer.visibleProperty().set(properties.get(key(DECIBEL_SCALE), true));
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user