mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -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);
|
||||
|
@ -350,7 +350,7 @@ void SpectrumMeasurements::createAdjacentChannelPowerTable()
|
||||
void SpectrumMeasurements::createOccupiedBandwidthTable()
|
||||
{
|
||||
QStringList rows = {"Occupied B/W"};
|
||||
QStringList units = {" Hz"};
|
||||
QStringList units = {"Hz"};
|
||||
|
||||
createMeasurementsTable(rows, units);
|
||||
}
|
||||
@ -358,7 +358,7 @@ void SpectrumMeasurements::createOccupiedBandwidthTable()
|
||||
void SpectrumMeasurements::create3dBBandwidthTable()
|
||||
{
|
||||
QStringList rows = {"3dB B/W"};
|
||||
QStringList units = {" Hz"};
|
||||
QStringList units = {"Hz"};
|
||||
|
||||
createMeasurementsTable(rows, units);
|
||||
}
|
||||
|
@ -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