diff --git a/doc/img/MainWindow_spectrum_gui.png b/doc/img/MainWindow_spectrum_gui.png
new file mode 100644
index 000000000..59d6e8209
Binary files /dev/null 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
new file mode 100644
index 000000000..30bff4c32
Binary files /dev/null and b/doc/img/MainWindow_spectrum_gui.xcf differ
diff --git a/sdrgui/gui/glspectrumgui.cpp b/sdrgui/gui/glspectrumgui.cpp
index a22343e42..a13a49c40 100644
--- a/sdrgui/gui/glspectrumgui.cpp
+++ b/sdrgui/gui/glspectrumgui.cpp
@@ -513,7 +513,7 @@ void GLSpectrumGUI::setAveragingToolitp()
if (m_glSpectrum)
{
QString s;
- float averagingTime = (m_fftSize * m_averagingNb) / (float) m_glSpectrum->getSampleRate();
+ float averagingTime = (m_fftSize * (m_averagingNb == 0 ? 1 : m_averagingNb)) / (float) m_glSpectrum->getSampleRate();
setNumberStr(averagingTime, 2, s);
ui->averaging->setToolTip(QString("Number of averaging samples (avg time: %1s)").arg(s));
}
diff --git a/sdrgui/readme.md b/sdrgui/readme.md
index 4feffd754..b4013862f 100644
--- a/sdrgui/readme.md
+++ b/sdrgui/readme.md
@@ -226,7 +226,102 @@ Use this push button to add a new channel with the selected plugin
4. Spectrum display control
-These are the controls of the main spectrum display in (7). Please refer to the spectrum display documentation (TBD) for details.
+![Spectrum GUI](../doc/img/MainWindow_spectrum_gui.png)
+
+These are the controls of the main spectrum display in (7). The same controls are found in the plugins that feature a spectrum display:
+ - Channel Analyzer
+ - Broadcast FM demodulator
+ - SSB demodulator
+ - UDP source
+ - UDP sink
+
+4.1. FFT window selector
+
+Use this combo box to select which window is applied to the FFT:
+ - **Bart**: Bartlett
+ - **B-H**: Blackmann-Harris
+ - **FT**: Flat top
+ - **Ham**: Hamming (default)
+ - **Han**: Hanning
+ - **Rec**: Rectangular (no window)
+
+4.2. FFT size
+
+Select the size of the FFT window among these values:
+ - 128
+ - 256
+ - 512
+ - 1k = 1024 (default)
+ - 2k = 2048
+ - 4k = 4096
+
+4.3. Reference level
+
+This is the level in dB at the top of the display range. You can select values between 0 and -110 in 5 dB steps
+
+4.4. Range
+
+This is the range of display in dB. You can select values between 5 and 100 in 5 dB steps
+
+4.5. Averaging mode
+
+Use this combo to select which averaging mode is applied:
+ - **No**: no averaging. Disables averaging regardless of the number of averaged samples (4.6). This is the default option
+ - **Mov**: moving average. This is a sliding average over the amount of samples specified next (4.6). There is one complete FFT line produced at every FFT sampling period
+ - **Fix**: fixed average. Average is done over the amount of samples specified next (4.6) and a result is produced at the end of the corresponding period then the next block of averaged samples is processed. There is one complete FFT line produced every FFT sampling period multiplied by the number of averaged samples (4.6). The time scale on the waterfall display is updated accordingly.
+
+4.6. Number of averaged samples
+
+Each FFT bin (squared magnitude) is averaged over a number of samples. This combo allows selecting the number of samples between these values: 0 (no averaging), 2, 5, 10, 20, 50, 100, 200, 500, 1k (1000). The tooltip mentions the resulting averaging period considering the baseband sample rate and FFT size.
+Averaging reduces the noise variance and can be used to better detect weak continuous signals. The fixed averaging mode allows long time monitoring on the waterfall.
+
+4.7. Phosphor display stroke decay
+
+This controls the decay rate of the stroke when phosphor display is engaged (4.C)
+
+4.8. Phosphor display holdoff
+
+This controls the holdoff when phosphor display is engaged (4.C)
+
+4.9. Phosphor display stroke strength
+
+This controls the stroke strength when phosphor display is engaged (4.C)
+
+4.A. Trace intensity
+
+This controls the intensity of the maximum (4.D) and current (4.E) spectrum trace
+
+4.B. Clear spectrum
+
+This resets the maximum spectrum trace and phosphor remanence
+
+4.C. Phosphor display
+
+Toggles the phosphor display on the spectrum
+
+4.D. Maximum trace
+
+Toggles the maximum trace display (red trace) on the spectrum
+
+4.E. Current trace
+
+Toggles the current trace display (yellow trace) on the spectrum
+
+4.F. Waterfall/spectrum placement
+
+Toggles the spectrum on top or on bottom versus waterfall
+
+4.G. Waterfall
+
+Toggles the waterfall display
+
+4.H.Grid
+
+Toggles the grid display
+
+4.I.Grid intensity
+
+Controls the intensity of the grid display
5. Presets and commands