mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Ensure bandwidth is positive. Use engineering units for bandwidths.
This commit is contained in:
parent
25709aa9a8
commit
97632e1b56
@ -2307,8 +2307,9 @@ void GLSpectrumView::measure3dBBandwidth()
|
||||
}
|
||||
|
||||
// Calcualte bandwidth
|
||||
float hzPerBin = m_sampleRate / (float) m_fftSize;
|
||||
int bins = rightBin - leftBin - 1;
|
||||
bins = std::max(1, bins);
|
||||
float hzPerBin = m_sampleRate / (float) m_fftSize;
|
||||
float bandwidth = bins * hzPerBin;
|
||||
int centerBin = leftBin + (rightBin - leftBin) / 2;
|
||||
float centerFrequency = binToFrequency(centerBin);
|
||||
|
@ -157,7 +157,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Occupied b/w</string>
|
||||
<string>Occupied bandwidth</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user