diff --git a/doc/img/MainWindow_spectrum_gui.png b/doc/img/MainWindow_spectrum_gui.png index 324798a7e..7530e9ebd 100644 Binary files a/doc/img/MainWindow_spectrum_gui.png and b/doc/img/MainWindow_spectrum_gui.png differ diff --git a/doc/img/MainWindow_spectrum_gui.xcf b/doc/img/MainWindow_spectrum_gui.xcf index 75763fdd8..42951e886 100644 Binary files a/doc/img/MainWindow_spectrum_gui.xcf and b/doc/img/MainWindow_spectrum_gui.xcf differ diff --git a/doc/img/MainWindow_spectrum_gui_A.png b/doc/img/MainWindow_spectrum_gui_A.png index d2608e60f..83bd101af 100644 Binary files a/doc/img/MainWindow_spectrum_gui_A.png and b/doc/img/MainWindow_spectrum_gui_A.png differ diff --git a/doc/img/MainWindow_spectrum_gui_A.xcf b/doc/img/MainWindow_spectrum_gui_A.xcf index 9f2b65820..a946d71a9 100644 Binary files a/doc/img/MainWindow_spectrum_gui_A.xcf and b/doc/img/MainWindow_spectrum_gui_A.xcf differ diff --git a/doc/img/MainWindow_spectrum_gui_A_fscale1.png b/doc/img/MainWindow_spectrum_gui_A_fscale1.png new file mode 100644 index 000000000..f3d1de60f Binary files /dev/null and b/doc/img/MainWindow_spectrum_gui_A_fscale1.png differ diff --git a/doc/img/MainWindow_spectrum_gui_A_fscale2.png b/doc/img/MainWindow_spectrum_gui_A_fscale2.png new file mode 100644 index 000000000..d370e5164 Binary files /dev/null and b/doc/img/MainWindow_spectrum_gui_A_fscale2.png differ diff --git a/sdrbase/dsp/spectrumsettings.cpp b/sdrbase/dsp/spectrumsettings.cpp index d35913079..e908aaa1a 100644 --- a/sdrbase/dsp/spectrumsettings.cpp +++ b/sdrbase/dsp/spectrumsettings.cpp @@ -131,7 +131,7 @@ QByteArray SpectrumSettings::serialize() const s.writeS32(45, m_measurementPrecision); s.writeS32(46, m_measurementCenterFrequencyOffset); s.writeBool(47, m_findHistogramPeaks); - s.writeBool(58, m_truncateFreqScale); + s.writeBool(48, m_truncateFreqScale); s.writeS32(100, m_histogramMarkers.size()); for (int i = 0; i < m_histogramMarkers.size(); i++) { diff --git a/sdrgui/gui/scaleengine.cpp b/sdrgui/gui/scaleengine.cpp index be5c4d0e6..673e5b8e0 100644 --- a/sdrgui/gui/scaleengine.cpp +++ b/sdrgui/gui/scaleengine.cpp @@ -746,7 +746,7 @@ void ScaleEngine::updateTruncation() for (int i = widthOrder+1; i <= maxOrder; i++) { int irangeMin = floor(m_rangeMin / pow(10, i)); - int irangeMax = floor(m_rangeMin / pow(10, i)); + int irangeMax = floor(m_rangeMax / pow(10, i)); if (irangeMin == irangeMax) { diff --git a/sdrgui/gui/spectrum.md b/sdrgui/gui/spectrum.md index 8fa681178..2b6f77ace 100644 --- a/sdrgui/gui/spectrum.md +++ b/sdrgui/gui/spectrum.md @@ -119,29 +119,43 @@ Toggles the grid display Controls the intensity of the grid display -

B.1.3: Reset spectrum histogram

+

B.1.3: Truncate frequency scale upper digits

+ +If possible truncate the non significant upper digits on frequency scale. This is useful when the bandwidth is much smaller than the center frequency. For example if center frequency is 1.00001 GHz and bandwidth is 15.625 kHz this results in 3 ticks being displayed with "1.0000" prefixing all values: + +![Spectrum GUI A Fscale 1](../../doc/img/MainWindow_spectrum_gui_A_fscale1.png) + +When truncation is engaged 1 GHz will be subtracted from all values resulting in a more readable scale with more definition: + +![Spectrum GUI A Fscale 2](../../doc/img/MainWindow_spectrum_gui_A_fscale2.png) + +A leading tick marks the fact that upper digits have been truncated and values are suffixed with the multiplier character (k, M, G) for better readability. + +Note that resolution depends on which boundaries are crossed within the bandwidth and sometimes truncation is not possible (in the example if 1 GHz falls within range) resulting in no change in scale display. + +

B.1.4: Reset spectrum histogram

This resets the maximum spectrum trace and phosphor remanence -

B.1.4: Phosphor display

+

B.1.5: Phosphor display

Toggles the phosphor display on the spectrum -

B.1.5: Maximum hold trace

+

B.1.6: Maximum hold trace

Toggles the maximum hold trace display (red trace) on the spectrum -

B.1.6: Phosphor display stroke and max hold decay

+

B.1.7: Phosphor display stroke and max hold decay

-This controls the decay rate of the stroke when phosphor display is engaged (B.1.4). The histogram pixel value is diminished by this value each time a new FFT is produced. A value of zero means no decay and thus phosphor history and max hold (red line) will be kept until the clear button (B.1.3) is pressed. +This controls the decay rate of the stroke when phosphor display is engaged (B.1.5). The histogram pixel value is diminished by this value each time a new FFT is produced. A value of zero means no decay and thus phosphor history and max hold (red line) will be kept until the clear button (B.1.4) is pressed. -

B.1.7: Phosphor display stroke and max hold decay divisor

+

B.1.8: Phosphor display stroke and max hold decay divisor

-When phosphor display is engaged (B.1.4) and stroke decay is 1 (B.1.6) this divides the unit decay by this value by diminishing histogram pixel value by one each time a number of FFTs equal to this number have been produced. Thus the actual decay rate is 1 over this value. This allow setting a slower decay rate than one unit for each new FFT. +When phosphor display is engaged (B.1.5) and stroke decay is 1 (B.1.7) this divides the unit decay by this value by diminishing histogram pixel value by one each time a number of FFTs equal to this number have been produced. Thus the actual decay rate is 1 over this value. This allow setting a slower decay rate than one unit for each new FFT. -

B.1.8: Phosphor display stroke strength

+

B.1.9: Phosphor display stroke strength

-This controls the stroke strength when phosphor display is engaged (B.1.4). The histogram value is incremented by this value at each new FFT until the maximum (red) is reached. +This controls the stroke strength when phosphor display is engaged (B.1.5). The histogram value is incremented by this value at each new FFT until the maximum (red) is reached.

B.2: Spectrum display controls - block #2

diff --git a/sdrgui/resources/truncate.png b/sdrgui/resources/truncate.png index 87251a2a0..351860c26 100644 Binary files a/sdrgui/resources/truncate.png and b/sdrgui/resources/truncate.png differ diff --git a/sdrgui/resources/truncate.xcf b/sdrgui/resources/truncate.xcf index a9f83e8aa..e6db493c5 100644 Binary files a/sdrgui/resources/truncate.xcf and b/sdrgui/resources/truncate.xcf differ