Scope: added DOA projections and updated ChannelAnalzyer

pull/442/head
f4exb 2019-11-15 22:58:18 +01:00
rodzic 5649162d9e
commit 19da4eae76
10 zmienionych plików z 96 dodań i 64 usunięć

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 6.0 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 13 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 12 KiB

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -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,

Wyświetl plik

@ -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 &pi;) i.e. zero centered between -&pi; and +&pi;. 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 -&#960; to &#960; phase into two &#960; wide sectors centered on 0 and &#960; 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 -&#960; to &#960; phase into two &#960; wide sectors centered on 0 and &#960; on the -1 to +1 range (sector is 1.0 wide):
- 0 &rarr; 0.5,
- &#960; &rarr; -0.5
- QPSK: maps -&#960; to &#960; phase into four &#960;/2 wide sectors centered on 0, &#960;/2, &#960;, -&#960;/2 on the -1 to +1 range (sector is 0.5 wide):
- **QPSK**: maps -&#960; to &#960; phase into four &#960;/2 wide sectors centered on 0, &#960;/2, &#960;, -&#960;/2 on the -1 to +1 range (sector is 0.5 wide):
- 0 &rarr; 0.25
- &#960;/2 &rarr; 0.75
- &#960; &rarr; -0.75
- -&#960;/2 &rarr; -0.25
- 8PSK: maps -&#960; to &#960; phase into eight &#960;/4 wide sectors centered on 0, &#960;/4, &#960;/2, 3&#960;/4, &#960;, -3&#960;/4, -&#960;/2, -&#960;/4 on the -1 to +1 range (sector is 0.25 wide):
- **8PSK**: maps -&#960; to &#960; phase into eight &#960;/4 wide sectors centered on 0, &#960;/4, &#960;/2, 3&#960;/4, &#960;, -3&#960;/4, -&#960;/2, -&#960;/4 on the -1 to +1 range (sector is 0.25 wide):
- 0 &rarr; 0.125
- &#960;/4 &rarr; 0.375
- &#960;/2 &rarr; 0.625
@ -239,7 +249,7 @@ To construct a trace which represents real values the incoming complex signal mu
- -3&#960;/4 &rarr; -0.625
- -&#960;/2 &rarr; -0.375
- -&#960;/4 &rarr; -0.125
- 16PSK: maps -&#960; to &#960; phase into sixteen &#960;/8 wide sectors centered on 0, &#960;/8, &#960;/4, 3&#960;/8, &#960;/2, 5&#960;/8, 3&#960;/4, 7&#960;/8, &#960;, -7&#960;/8, -3&#960;/4, -5&#960;/8, -&#960;/2, -3&#960;/8, -&#960;/4, -&#960;/8 on the -1 to +1 range (sector is 0.125 wide):
- **16PSK**: maps -&#960; to &#960; phase into sixteen &#960;/8 wide sectors centered on 0, &#960;/8, &#960;/4, 3&#960;/8, &#960;/2, 5&#960;/8, 3&#960;/4, 7&#960;/8, &#960;, -7&#960;/8, -3&#960;/4, -5&#960;/8, -&#960;/2, -3&#960;/8, -&#960;/4, -&#960;/8 on the -1 to +1 range (sector is 0.125 wide):
- 0 &rarr; 0.0625
- &#960;/8 &rarr; 0.1875
- &#960;/4 &rarr; 0.3125

Wyświetl plik

@ -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);

Wyświetl plik

@ -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

Wyświetl plik

@ -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;

Wyświetl plik

@ -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);