mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Scope: added DOA projections and updated ChannelAnalzyer
This commit is contained in:
parent
5649162d9e
commit
19da4eae76
BIN
doc/img/ChAnalyzerNG_plugin_polar_grid.png
Normal file
BIN
doc/img/ChAnalyzerNG_plugin_polar_grid.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
BIN
doc/img/ChAnalyzerNG_plugin_polar_grid.xcf
Normal file
BIN
doc/img/ChAnalyzerNG_plugin_polar_grid.xcf
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
@ -25,7 +25,7 @@
|
||||
|
||||
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
||||
QString("Channel Analyzer"),
|
||||
QString("4.11.12"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -13,6 +13,8 @@ This plugin can be used to analyze the complex signal received in its passband.
|
||||
- Power i.e. squared magnitude log (dB)
|
||||
- Phase
|
||||
- Phase derivative (instant frequency)
|
||||
- Direction Of Arrival on Positive side
|
||||
- Direction Of Arrival on Negative side
|
||||
- BPSK symbol mapping
|
||||
- QPSK symbol mapping
|
||||
- 8-PSK symbol mapping
|
||||
@ -167,27 +169,33 @@ This button selects the display of all traces on the left side of the screen and
|
||||
|
||||
Use this button to toggle points display (on) or line display (off) for the 2D XY display on the right. The points display may yield a more visible graph when the distinct artifact is an accumulation of points.
|
||||
|
||||
<h3>7. Select trace intensity</h3>
|
||||
<h3>7. Rectangular or polar grid</h3>
|
||||
|
||||
Use this button to switch between a rectangular and polar grid overlay on the XY display. Polar grid makes sense only if the X axis represents a phase from -1.0 to 1.0 in normalized value (radians divided by π) i.e. zero centered between -π and +π. In practice it means Phase, DOA positive or DOA negative projections only with largest amplitude setting and zero offset. The grid represents the unit circle and axes for angles in degrees: -180, -150, -135, -120, -90, -60, -45, -30, 0, 30, 45, 60, 90, 135, 150, (180) as illustrated below:
|
||||
|
||||
![Channel Analyzer NG plugin scope1 controls](../../../doc/img/ChAnalyzerNG_plugin_polar_grid.png)
|
||||
|
||||
<h3>8. Select trace intensity</h3>
|
||||
|
||||
This button lets you adjust the traces intensity. The value in percent of the maximum intensity appears as a tooltip
|
||||
|
||||
<h3>8. Select grid intensity</h3>
|
||||
<h3>9. Select grid intensity</h3>
|
||||
|
||||
This button lets you adjust the grid intensity. The value in percent of the maximum intensity appears as a tooltip
|
||||
|
||||
<h3>9. Displayed trace length</h3>
|
||||
<h3>10. Displayed trace length</h3>
|
||||
|
||||
This slider lets you adjust the length of the traces on display. Each step further divides the length of the full trace controlled by (10). The duration of the full length shown on display appears on the left of the slider and the corresponding number of samples appears as a tooltip.
|
||||
|
||||
<h3>10. Trace offset</h3>
|
||||
<h3>11. Trace offset</h3>
|
||||
|
||||
This slider lets you move the start of traces on display. Each step moves the trace by an amount of time corresponding to 1/100 of the length of the full trace controlled by (10). The time offset from the start of the traces appears on the left of the slider and the corresponding number of samples appears as a tooltip.
|
||||
|
||||
<h3>11. Trace length</h3>
|
||||
<h3>12. Trace length</h3>
|
||||
|
||||
This slider lets you control the full length of the trace. Each step increases the corresponding amount of samples by 4800 samples with a minimum of 4800 samples and a maximum of 20*4800 = 96000 samples. The duration of a full trace appears on the left of the slider and he corresponding number of samples appears as a tooltip.
|
||||
|
||||
<h3>12. Trace sample rate</h3>
|
||||
<h3>13. Trace sample rate</h3>
|
||||
|
||||
This is the sample rate used by the scope and corresponds to the final sample rate after the whole decimation chain. It should be the same amount as the one displayed on the plugin control (C.6)
|
||||
|
||||
@ -215,22 +223,24 @@ The bottom button with the down arrow lets you move the currently selected trace
|
||||
|
||||
To construct a trace which represents real values the incoming complex signal must be "projected" on the real axis. This combo lets you select the projection scheme:
|
||||
|
||||
- Real: take the real part
|
||||
- Imag: take the imaginary part
|
||||
- Mag: calculate magnitude in linear representation. This is just the module of the complex sample
|
||||
- MagSq: calculate power in linear representation. This is the squared module of the complex sample
|
||||
- MagDB: calculate power in log representation as 10*log10(x) or decibel (dB) representation. This is the squared module of the complex sample expressed in decibels
|
||||
- Phi: instantaneous phase. This is the argument of the complex sample.
|
||||
- dPhi: instantaneous derivative of the phase. This is the difference of arguments between successive samples thus represents the instantaneous frequency.
|
||||
- BPSK: maps -π to π phase into two π wide sectors centered on 0 and π on the -1 to +1 range (sector is 1.0 wide):
|
||||
- **Real**: take the real part
|
||||
- **Imag**: take the imaginary part
|
||||
- **Mag**: calculate magnitude in linear representation. This is just the module of the complex sample
|
||||
- **MagSq**: calculate power in linear representation. This is the squared module of the complex sample
|
||||
- **MagDB**: calculate power in log representation as 10*log10(x) or decibel (dB) representation. This is the squared module of the complex sample expressed in decibels
|
||||
- **Phi**: instantaneous phase. This is the argument of the complex sample.
|
||||
- **DOAP**: direction of arrival on the positive side. Assumes the phase of signal is the phase difference between two sources at half wavelength distance. Axis of reference (towards angle zero) is assumed to be the half line between reference source (1) and probe source (2). Assumes the angle is positive (left side of axis)
|
||||
- **DOAN**: direction of arrival on the negative side. Assumes the phase of signal is the phase difference between two sources at half wavelength distance. Axis of reference (towards angle zero) is assumed to be the half line between reference source (1) and probe source (2). Assumes the angle is negative (right side of axis)
|
||||
- **dPhi**: instantaneous derivative of the phase. This is the difference of arguments between successive samples thus represents the instantaneous frequency.
|
||||
- **BPSK**: maps -π to π phase into two π wide sectors centered on 0 and π on the -1 to +1 range (sector is 1.0 wide):
|
||||
- 0 → 0.5,
|
||||
- π → -0.5
|
||||
- QPSK: maps -π to π phase into four π/2 wide sectors centered on 0, π/2, π, -π/2 on the -1 to +1 range (sector is 0.5 wide):
|
||||
- **QPSK**: maps -π to π phase into four π/2 wide sectors centered on 0, π/2, π, -π/2 on the -1 to +1 range (sector is 0.5 wide):
|
||||
- 0 → 0.25
|
||||
- π/2 → 0.75
|
||||
- π → -0.75
|
||||
- -π/2 → -0.25
|
||||
- 8PSK: maps -π to π phase into eight π/4 wide sectors centered on 0, π/4, π/2, 3π/4, π, -3π/4, -π/2, -π/4 on the -1 to +1 range (sector is 0.25 wide):
|
||||
- **8PSK**: maps -π to π phase into eight π/4 wide sectors centered on 0, π/4, π/2, 3π/4, π, -3π/4, -π/2, -π/4 on the -1 to +1 range (sector is 0.25 wide):
|
||||
- 0 → 0.125
|
||||
- π/4 → 0.375
|
||||
- π/2 → 0.625
|
||||
@ -239,7 +249,7 @@ To construct a trace which represents real values the incoming complex signal mu
|
||||
- -3π/4 → -0.625
|
||||
- -π/2 → -0.375
|
||||
- -π/4 → -0.125
|
||||
- 16PSK: maps -π to π phase into sixteen π/8 wide sectors centered on 0, π/8, π/4, 3π/8, π/2, 5π/8, 3π/4, 7π/8, π, -7π/8, -3π/4, -5π/8, -π/2, -3π/8, -π/4, -π/8 on the -1 to +1 range (sector is 0.125 wide):
|
||||
- **16PSK**: maps -π to π phase into sixteen π/8 wide sectors centered on 0, π/8, π/4, 3π/8, π/2, 5π/8, 3π/4, 7π/8, π, -7π/8, -3π/4, -5π/8, -π/2, -3π/8, -π/4, -π/8 on the -1 to +1 range (sector is 0.125 wide):
|
||||
- 0 → 0.0625
|
||||
- π/8 → 0.1875
|
||||
- π/4 → 0.3125
|
||||
|
@ -72,6 +72,18 @@ Real Projector::run(const Sample& s)
|
||||
case ProjectionPhase:
|
||||
v = std::atan2((float) s.m_imag, (float) s.m_real) / M_PI;
|
||||
break;
|
||||
case ProjectionDOAP:
|
||||
{
|
||||
Real p = std::atan2((float) s.m_imag, (float) s.m_real) / M_PI; // calculate phase. Assume phase difference between
|
||||
v = acos(p) / M_PI; // two sources at half wavelength distance with sources axis as reference (positive side)
|
||||
}
|
||||
break;
|
||||
case ProjectionDOAN:
|
||||
{
|
||||
Real p = std::atan2((float) s.m_imag, (float) s.m_real) / M_PI; // calculate phase. Assume phase difference between
|
||||
v = -(acos(p) / M_PI); // two sources at half wavelength distance with sources axis as reference (negative source)
|
||||
}
|
||||
break;
|
||||
case ProjectionDPhase:
|
||||
{
|
||||
Real curArg = std::atan2((float) s.m_imag, (float) s.m_real);
|
||||
|
@ -30,6 +30,8 @@ public:
|
||||
ProjectionMagSq, //!< Calculate linear squared magnitude or power
|
||||
ProjectionMagDB, //!< Calculate logarithmic (dB) of squared magnitude
|
||||
ProjectionPhase, //!< Calculate phase
|
||||
ProjectionDOAP, //!< Calculate ambiguous DOA from phase as phase difference (assuming positive)
|
||||
ProjectionDOAN, //!< Calculate ambiguous DOA from phase as phase difference (assuming negative)
|
||||
ProjectionDPhase, //!< Calculate phase derivative i.e. instantaneous frequency scaled to sample rate
|
||||
ProjectionBPSK, //!< Phase comparator BPSK evaluation
|
||||
ProjectionQPSK, //!< Phase comparator QPSK evaluation
|
||||
|
@ -746,7 +746,11 @@ void GLScope::paintGL()
|
||||
|
||||
// If X is an angle and XY display is in polar grid we will perform polar conversion of traces
|
||||
bool polarConversion = m_projectionTypes ?
|
||||
(*m_projectionTypes).size() > 0 ? (*m_projectionTypes)[0] == Projector::ProjectionPhase : false
|
||||
(*m_projectionTypes).size() > 0 ?
|
||||
((*m_projectionTypes)[0] == Projector::ProjectionPhase)
|
||||
|| ((*m_projectionTypes)[0] == Projector::ProjectionDOAP)
|
||||
|| ((*m_projectionTypes)[0] == Projector::ProjectionDOAN)
|
||||
: false
|
||||
: false;
|
||||
polarConversion &= m_displayPolGrid;
|
||||
|
||||
@ -1730,6 +1734,8 @@ void GLScope::setYScale(ScaleEngine &scale, uint32_t highlightedTraceIndex)
|
||||
}
|
||||
break;
|
||||
case Projector::ProjectionPhase: // Phase or frequency
|
||||
case Projector::ProjectionDOAP:
|
||||
case Projector::ProjectionDOAN:
|
||||
case Projector::ProjectionDPhase:
|
||||
scale.setRange(Unit::None, -1.0 / traceData.m_amp + amp_ofs, 1.0 / traceData.m_amp + amp_ofs);
|
||||
break;
|
||||
|
@ -1314,6 +1314,8 @@ void GLScopeGUI::fillProjectionCombo(QComboBox* comboBox)
|
||||
comboBox->addItem("MagSq", Projector::ProjectionMagSq);
|
||||
comboBox->addItem("MagdB", Projector::ProjectionMagDB);
|
||||
comboBox->addItem("Phi", Projector::ProjectionPhase);
|
||||
comboBox->addItem("DOAP", Projector::ProjectionDOAP);
|
||||
comboBox->addItem("DOAN", Projector::ProjectionDOAN);
|
||||
comboBox->addItem("dPhi", Projector::ProjectionDPhase);
|
||||
comboBox->addItem("BPSK", Projector::ProjectionBPSK);
|
||||
comboBox->addItem("QPSK", Projector::ProjectionQPSK);
|
||||
|
Loading…
Reference in New Issue
Block a user