mirror of https://github.com/f4exb/sdrangel.git
Compare commits
47 Commits
1346efdfc5
...
147a88ccd8
Author | SHA1 | Date |
---|---|---|
Daniele Forsi | 147a88ccd8 | |
Daniele Forsi | 8c3f7e3775 | |
Daniele Forsi | 13222cac8d | |
Edouard Griffiths | d7f6ec7518 | |
srcejon | 4439b435b7 | |
srcejon | 84960eff03 | |
srcejon | c3a1c8db0e | |
srcejon | 2973eff337 | |
srcejon | d09b3a2fb2 | |
srcejon | 5e79f06c0e | |
srcejon | 6979117b26 | |
srcejon | 54713ef67c | |
srcejon | a77b6f1b36 | |
f4exb | 872bc8f13f | |
Edouard Griffiths | a6c1dc56c4 | |
srcejon | c9632b9fe3 | |
srcejon | 7b6bbe88f3 | |
srcejon | 304f0ea89a | |
srcejon | a76262f0b7 | |
srcejon | 67723563a4 | |
Edouard Griffiths | 98f5e610d7 | |
Edouard Griffiths | 631f55e9e8 | |
srcejon | 5b0d5b9efb | |
srcejon | 1d8d297565 | |
srcejon | 44385832c3 | |
srcejon | 035e6f59be | |
srcejon | be7199531d | |
srcejon | 116d6674bd | |
mxi-box | 32aee52ab3 | |
srcejon | 83498f848b | |
srcejon | 7b6c9e23ec | |
srcejon | 9c31f0066a | |
srcejon | c27ea6d5d7 | |
Daniele Forsi | 92246cdc71 | |
Daniele Forsi | 8711f77fdb | |
f4exb | 6351ae0655 | |
f4exb | 9c72d4fd14 | |
f4exb | 8961e1a353 | |
f4exb | 5ff2ce2575 | |
f4exb | 7c3bf5edcd | |
f4exb | cd7f0c16c4 | |
f4exb | 1691a3dfb3 | |
f4exb | 788df1eda3 | |
f4exb | 3c9f74aeb5 | |
f4exb | a02d1839ef | |
f4exb | c21223771a | |
f4exb | ba075bcf66 |
|
@ -27,7 +27,6 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "dsp/wfir.h"
|
||||
#include "deviceplutosdr.h"
|
||||
#include "deviceplutosdrbox.h"
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
225
ft8/ft8.cpp
225
ft8/ft8.cpp
|
@ -1233,6 +1233,32 @@ std::vector<std::vector<float>> FT8::un_gray_code_r(const std::vector<std::vecto
|
|||
return m79a;
|
||||
}
|
||||
|
||||
//
|
||||
// Generic Gray decoding for magnitudes (floats)
|
||||
//
|
||||
std::vector<std::vector<float>> FT8::un_gray_code_r_gen(const std::vector<std::vector<float>> &mags)
|
||||
{
|
||||
if (mags.size() == 0) {
|
||||
return mags;
|
||||
}
|
||||
|
||||
std::vector<std::vector<float>> magsa(mags.size());
|
||||
int nsyms = mags.front().size();
|
||||
|
||||
for (unsigned int si = 0; si < mags.size(); si++)
|
||||
{
|
||||
magsa[si].resize(nsyms);
|
||||
|
||||
for (int bini = 0; bini < nsyms; bini++)
|
||||
{
|
||||
int grayi = bini ^ (bini >> 1);
|
||||
magsa[si][bini] = mags[si][grayi];
|
||||
}
|
||||
}
|
||||
|
||||
return magsa;
|
||||
}
|
||||
|
||||
//
|
||||
// normalize levels by windowed median.
|
||||
// this helps, but why?
|
||||
|
@ -1807,6 +1833,52 @@ void FT8::soft_decode(const FFTEngine::ffts_t &c79, float ll174[])
|
|||
m79 = un_gray_code_r(m79);
|
||||
int lli = 0;
|
||||
|
||||
// tone numbers that make second index bit zero or one.
|
||||
int zeroi[4][3];
|
||||
int onei[4][3];
|
||||
|
||||
for (int biti = 0; biti < 3; biti++)
|
||||
{
|
||||
if (biti == 0)
|
||||
{
|
||||
// high bit
|
||||
zeroi[0][0] = 0;
|
||||
zeroi[1][0] = 1;
|
||||
zeroi[2][0] = 2;
|
||||
zeroi[3][0] = 3;
|
||||
onei[0][0] = 4;
|
||||
onei[1][0] = 5;
|
||||
onei[2][0] = 6;
|
||||
onei[3][0] = 7;
|
||||
}
|
||||
|
||||
if (biti == 1)
|
||||
{
|
||||
// middle bit
|
||||
zeroi[0][1] = 0;
|
||||
zeroi[1][1] = 1;
|
||||
zeroi[2][1] = 4;
|
||||
zeroi[3][1] = 5;
|
||||
onei[0][1] = 2;
|
||||
onei[1][1] = 3;
|
||||
onei[2][1] = 6;
|
||||
onei[3][1] = 7;
|
||||
}
|
||||
|
||||
if (biti == 2)
|
||||
{
|
||||
// low bit
|
||||
zeroi[0][2] = 0;
|
||||
zeroi[1][2] = 2;
|
||||
zeroi[2][2] = 4;
|
||||
zeroi[3][2] = 6;
|
||||
onei[0][2] = 1;
|
||||
onei[1][2] = 3;
|
||||
onei[2][2] = 5;
|
||||
onei[3][2] = 7;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i79 = 0; i79 < 79; i79++)
|
||||
{
|
||||
if (i79 < 7 || (i79 >= 36 && i79 < 36 + 7) || i79 >= 72) {
|
||||
|
@ -1823,56 +1895,13 @@ void FT8::soft_decode(const FFTEngine::ffts_t &c79, float ll174[])
|
|||
|
||||
for (int biti = 0; biti < 3; biti++)
|
||||
{
|
||||
// tone numbers that make this bit zero or one.
|
||||
int zeroi[4];
|
||||
int onei[4];
|
||||
|
||||
if (biti == 0)
|
||||
{
|
||||
// high bit
|
||||
zeroi[0] = 0;
|
||||
zeroi[1] = 1;
|
||||
zeroi[2] = 2;
|
||||
zeroi[3] = 3;
|
||||
onei[0] = 4;
|
||||
onei[1] = 5;
|
||||
onei[2] = 6;
|
||||
onei[3] = 7;
|
||||
}
|
||||
|
||||
if (biti == 1)
|
||||
{
|
||||
// middle bit
|
||||
zeroi[0] = 0;
|
||||
zeroi[1] = 1;
|
||||
zeroi[2] = 4;
|
||||
zeroi[3] = 5;
|
||||
onei[0] = 2;
|
||||
onei[1] = 3;
|
||||
onei[2] = 6;
|
||||
onei[3] = 7;
|
||||
}
|
||||
|
||||
if (biti == 2)
|
||||
{
|
||||
// low bit
|
||||
zeroi[0] = 0;
|
||||
zeroi[1] = 2;
|
||||
zeroi[2] = 4;
|
||||
zeroi[3] = 6;
|
||||
onei[0] = 1;
|
||||
onei[1] = 3;
|
||||
onei[2] = 5;
|
||||
onei[3] = 7;
|
||||
}
|
||||
|
||||
// strongest tone that would make this bit be zero.
|
||||
int got_best_zero = 0;
|
||||
float best_zero = 0;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float x = m79[i79][zeroi[i]];
|
||||
float x = m79[i79][zeroi[i][biti]];
|
||||
|
||||
if (got_best_zero == 0 || x > best_zero)
|
||||
{
|
||||
|
@ -1887,7 +1916,7 @@ void FT8::soft_decode(const FFTEngine::ffts_t &c79, float ll174[])
|
|||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float x = m79[i79][onei[i]];
|
||||
float x = m79[i79][onei[i][biti]];
|
||||
if (got_best_one == 0 || x > best_one)
|
||||
{
|
||||
got_best_one = 1;
|
||||
|
@ -1916,6 +1945,7 @@ void FT8::soft_decode_mags(FT8Params& params, const std::vector<std::vector<floa
|
|||
Stats bests(params.problt_how_sig, params.log_tail, params.log_rate);
|
||||
Stats all(params.problt_how_noise, params.log_tail, params.log_rate);
|
||||
make_stats_gen(mags, nbSymbolBits, bests, all);
|
||||
mags = un_gray_code_r_gen(mags);
|
||||
int lli = 0;
|
||||
int zoX = 1<<(nbSymbolBits-1);
|
||||
int zoY = nbSymbolBits;
|
||||
|
@ -2073,6 +2103,52 @@ void FT8::c_soft_decode(const FFTEngine::ffts_t &c79x, float ll174[])
|
|||
m79 = un_gray_code_r(m79);
|
||||
int lli = 0;
|
||||
|
||||
// tone numbers that make second index bit zero or one.
|
||||
int zeroi[4][3];
|
||||
int onei[4][3];
|
||||
|
||||
for (int biti = 0; biti < 3; biti++)
|
||||
{
|
||||
if (biti == 0)
|
||||
{
|
||||
// high bit
|
||||
zeroi[0][0] = 0;
|
||||
zeroi[1][0] = 1;
|
||||
zeroi[2][0] = 2;
|
||||
zeroi[3][0] = 3;
|
||||
onei[0][0] = 4;
|
||||
onei[1][0] = 5;
|
||||
onei[2][0] = 6;
|
||||
onei[3][0] = 7;
|
||||
}
|
||||
|
||||
if (biti == 1)
|
||||
{
|
||||
// middle bit
|
||||
zeroi[0][1] = 0;
|
||||
zeroi[1][1] = 1;
|
||||
zeroi[2][1] = 4;
|
||||
zeroi[3][1] = 5;
|
||||
onei[0][1] = 2;
|
||||
onei[1][1] = 3;
|
||||
onei[2][1] = 6;
|
||||
onei[3][1] = 7;
|
||||
}
|
||||
|
||||
if (biti == 2)
|
||||
{
|
||||
// low bit
|
||||
zeroi[0][2] = 0;
|
||||
zeroi[1][2] = 2;
|
||||
zeroi[2][2] = 4;
|
||||
zeroi[3][2] = 6;
|
||||
onei[0][2] = 1;
|
||||
onei[1][2] = 3;
|
||||
onei[2][2] = 5;
|
||||
onei[3][2] = 7;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i79 = 0; i79 < 79; i79++)
|
||||
{
|
||||
if (i79 < 7 || (i79 >= 36 && i79 < 36 + 7) || i79 >= 72) {
|
||||
|
@ -2089,56 +2165,13 @@ void FT8::c_soft_decode(const FFTEngine::ffts_t &c79x, float ll174[])
|
|||
|
||||
for (int biti = 0; biti < 3; biti++)
|
||||
{
|
||||
// tone numbers that make this bit zero or one.
|
||||
int zeroi[4];
|
||||
int onei[4];
|
||||
|
||||
if (biti == 0)
|
||||
{
|
||||
// high bit
|
||||
zeroi[0] = 0;
|
||||
zeroi[1] = 1;
|
||||
zeroi[2] = 2;
|
||||
zeroi[3] = 3;
|
||||
onei[0] = 4;
|
||||
onei[1] = 5;
|
||||
onei[2] = 6;
|
||||
onei[3] = 7;
|
||||
}
|
||||
|
||||
if (biti == 1)
|
||||
{
|
||||
// middle bit
|
||||
zeroi[0] = 0;
|
||||
zeroi[1] = 1;
|
||||
zeroi[2] = 4;
|
||||
zeroi[3] = 5;
|
||||
onei[0] = 2;
|
||||
onei[1] = 3;
|
||||
onei[2] = 6;
|
||||
onei[3] = 7;
|
||||
}
|
||||
|
||||
if (biti == 2)
|
||||
{
|
||||
// low bit
|
||||
zeroi[0] = 0;
|
||||
zeroi[1] = 2;
|
||||
zeroi[2] = 4;
|
||||
zeroi[3] = 6;
|
||||
onei[0] = 1;
|
||||
onei[1] = 3;
|
||||
onei[2] = 5;
|
||||
onei[3] = 7;
|
||||
}
|
||||
|
||||
// strongest tone that would make this bit be zero.
|
||||
int got_best_zero = 0;
|
||||
float best_zero = 0;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float x = m79[i79][zeroi[i]];
|
||||
float x = m79[i79][zeroi[i][biti]];
|
||||
|
||||
if (got_best_zero == 0 || x > best_zero)
|
||||
{
|
||||
|
@ -2153,7 +2186,7 @@ void FT8::c_soft_decode(const FFTEngine::ffts_t &c79x, float ll174[])
|
|||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float x = m79[i79][onei[i]];
|
||||
float x = m79[i79][onei[i][biti]];
|
||||
|
||||
if (got_best_one == 0 || x > best_one)
|
||||
{
|
||||
|
@ -2560,8 +2593,14 @@ int FT8::decode(const float ll174[], int a174[], FT8Params& _params, int use_osd
|
|||
if (OSD::check_crc(a174)) {
|
||||
// success!
|
||||
return 1;
|
||||
} else {
|
||||
comment = "CRC fail";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
comment = "LDPC fail";
|
||||
}
|
||||
|
||||
if (use_osd && _params.osd_depth >= 0 && ldpc_ok >= _params.osd_ldpc_thresh)
|
||||
{
|
||||
|
@ -2576,6 +2615,10 @@ int FT8::decode(const float ll174[], int a174[], FT8Params& _params, int use_osd
|
|||
OSD::ldpc_encode(oplain, a174);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
comment = "OSD fail";
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -3172,7 +3215,7 @@ int FT8::one_iter1(
|
|||
hz1_for_cb,
|
||||
params.use_osd,
|
||||
"",
|
||||
m79
|
||||
m79
|
||||
);
|
||||
|
||||
if (ret) {
|
||||
|
|
|
@ -286,6 +286,11 @@ public:
|
|||
//
|
||||
static void soft_decode_mags(FT8Params& params, const std::vector<std::vector<float>>& mags, int nbSymbolBits, float ll174[]);
|
||||
|
||||
//
|
||||
// Generic Gray decoding for magnitudes (floats)
|
||||
//
|
||||
static std::vector<std::vector<float>> un_gray_code_r_gen(const std::vector<std::vector<float>> &mags);
|
||||
|
||||
private:
|
||||
//
|
||||
// reduce the sample rate from arate to brate.
|
||||
|
|
|
@ -934,11 +934,11 @@ bool Packing::packfree(int a77[], const std::string& msg)
|
|||
return true;
|
||||
}
|
||||
|
||||
void Packing::pack1(int a77[], int c28_1, int c28_2, int g15, int report)
|
||||
void Packing::pack1(int a77[], int c28_1, int c28_2, int g15, int reply)
|
||||
{
|
||||
pa64(a77, 0, 28, c28_1);
|
||||
pa64(a77, 28+1, 28, c28_2);
|
||||
a77[28+1+28+1] = report;
|
||||
a77[28+1+28+1] = reply;
|
||||
pa64(a77, 28+1+28+2, 15, g15);
|
||||
pa64(a77, 28+1+28+2+15, 3, 1);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
static bool packcall_std(int& c28, const std::string& callstr);
|
||||
static bool packgrid(int& g15, const std::string& locstr);
|
||||
static bool packfree(int a77[], const std::string& msg);
|
||||
static void pack1(int a77[], int c28_1, int c28_2, int g15, int report);
|
||||
static void pack1(int a77[], int c28_1, int c28_2, int g15, int reply);
|
||||
|
||||
private:
|
||||
static int ihashcall(std::string call, int m);
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "dsp/hbfilterchainconverter.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "feature/feature.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "beamsteeringcwmodbaseband.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <QDebug>
|
||||
|
||||
#include "dsp/upchannelizer.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
|
||||
#include "beamsteeringcwmodbaseband.h"
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "device/deviceapi.h"
|
||||
#include "dsp/hbfilterchainconverter.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "feature/feature.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
|
|
|
@ -22,9 +22,7 @@
|
|||
#include <QDebug>
|
||||
|
||||
#include "dsp/downchannelizer.h"
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
|
||||
#include "doa2baseband.h"
|
||||
#include "doa2settings.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "gui/dialogpositioner.h"
|
||||
#include "dsp/hbfilterchainconverter.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "doa2gui.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "device/deviceapi.h"
|
||||
#include "dsp/hbfilterchainconverter.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "feature/feature.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "interferometerbaseband.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "dsp/downchannelizer.h"
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
|
||||
#include "interferometerbaseband.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "gui/dialpopup.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
|
|
|
@ -32,13 +32,10 @@
|
|||
#include "SWGWorkspaceInfo.h"
|
||||
#include "SWGChannelReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(ChannelPower::MsgConfigureChannelPower, Message)
|
||||
|
||||
|
@ -289,13 +286,26 @@ int ChannelPower::webapiSettingsPutPatch(
|
|||
ChannelPowerSettings settings = m_settings;
|
||||
webapiUpdateChannelSettings(settings, channelSettingsKeys, response);
|
||||
|
||||
MsgConfigureChannelPower *msg = MsgConfigureChannelPower::create(settings, channelSettingsKeys, force);
|
||||
// Ensure inputFrequencyOffset and frequency are consistent
|
||||
QStringList settingsKeys = channelSettingsKeys;
|
||||
if (settingsKeys.contains("frequency") && !settingsKeys.contains("inputFrequencyOffset"))
|
||||
{
|
||||
settings.m_inputFrequencyOffset = settings.m_frequency - m_centerFrequency;
|
||||
settingsKeys.append("inputFrequencyOffset");
|
||||
}
|
||||
else if (settingsKeys.contains("inputFrequencyOffset") && !settingsKeys.contains("frequency"))
|
||||
{
|
||||
settings.m_frequency = m_centerFrequency + settings.m_inputFrequencyOffset;
|
||||
settingsKeys.append("frequency");
|
||||
}
|
||||
|
||||
MsgConfigureChannelPower *msg = MsgConfigureChannelPower::create(settings, settingsKeys, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
qDebug("ChannelPower::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureChannelPower *msgToGUI = MsgConfigureChannelPower::create(settings, channelSettingsKeys, force);
|
||||
MsgConfigureChannelPower *msgToGUI = MsgConfigureChannelPower::create(settings, settingsKeys, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
|
@ -312,6 +322,12 @@ void ChannelPower::webapiUpdateChannelSettings(
|
|||
if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
||||
settings.m_inputFrequencyOffset = response.getChannelPowerSettings()->getInputFrequencyOffset();
|
||||
}
|
||||
if (channelSettingsKeys.contains("frequencyMode")) {
|
||||
settings.m_frequencyMode = (ChannelPowerSettings::FrequencyMode) response.getChannelPowerSettings()->getFrequencyMode();
|
||||
}
|
||||
if (channelSettingsKeys.contains("frequency")) {
|
||||
settings.m_frequency = response.getChannelPowerSettings()->getFrequency();
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth")) {
|
||||
settings.m_rfBandwidth = response.getChannelPowerSettings()->getRfBandwidth();
|
||||
}
|
||||
|
@ -356,6 +372,8 @@ void ChannelPower::webapiUpdateChannelSettings(
|
|||
void ChannelPower::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const ChannelPowerSettings& settings)
|
||||
{
|
||||
response.getChannelPowerSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
response.getChannelPowerSettings()->setFrequencyMode(settings.m_frequencyMode);
|
||||
response.getChannelPowerSettings()->setFrequency(settings.m_frequency);
|
||||
response.getChannelPowerSettings()->setRfBandwidth(settings.m_rfBandwidth);
|
||||
response.getChannelPowerSettings()->setPulseThreshold(settings.m_pulseThreshold);
|
||||
response.getChannelPowerSettings()->setAveragePeriodUs(settings.m_averagePeriodUS);
|
||||
|
@ -469,6 +487,12 @@ void ChannelPower::webapiFormatChannelSettings(
|
|||
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
|
||||
swgChannelPowerSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
}
|
||||
if (channelSettingsKeys.contains("frequencyMode") || force) {
|
||||
swgChannelPowerSettings->setFrequencyMode(settings.m_frequencyMode);
|
||||
}
|
||||
if (channelSettingsKeys.contains("inputFrequency") || force) {
|
||||
swgChannelPowerSettings->setFrequency(settings.m_frequency);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth") || force) {
|
||||
swgChannelPowerSettings->setRfBandwidth(settings.m_rfBandwidth);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -24,10 +24,8 @@
|
|||
#include "dsp/dspcommands.h"
|
||||
#include "ui_channelpowergui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/dialpopup.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "dsp/dspengine.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "channelpowersettings.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h1>Channel Power Plugin</h1>
|
||||
<h1>Channel Power Plugin</h1>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
|
@ -10,38 +10,48 @@ The top and bottom bars of the channel window are described [here](../../../sdrg
|
|||
|
||||
![Channel power plugin GUI](../../../doc/img/ChannelPower_plugin_settings.png)
|
||||
|
||||
<h3>1: Frequency shift from center frequency of reception</h3>
|
||||
<h3>1: Channel frequency entry mode</h3>
|
||||
|
||||
Use the wheels to adjust the channel center frequency as a shift in Hz from the center frequency of reception. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.
|
||||
Select from one of the following modes to determine how the channel center frequency is calculated:
|
||||
|
||||
<h3>2: BW - Channel Bandwidth</h3>
|
||||
* Δf - Specify an offset in Hz from device center frequency.
|
||||
* f - Specific a frequency in Hz.
|
||||
|
||||
<h3>2: Channel Frequency</h3>
|
||||
|
||||
Specifies channel center frequency according to frequency entry mode (1):
|
||||
|
||||
* Δf - Offset in Hz from device center frequency.
|
||||
* f - Absolute frequency in Hz.
|
||||
|
||||
<h3>3: BW - Channel Bandwidth</h3>
|
||||
|
||||
Bandwidth in Hz of the channel for which power is to be measured.
|
||||
|
||||
<h3>3: Tavg - Average Time</h3>
|
||||
<h3>4: Tavg - Average Time</h3>
|
||||
|
||||
Time period overwhich the channel power is averaged. Values range from 10us to 10s in powers of 10. The available values depend upon the sample rate.
|
||||
|
||||
<h3>4: THp - Pulse Threshold</h3>
|
||||
<h3>5: THp - Pulse Threshold</h3>
|
||||
|
||||
The pulse threshold sets the power in dB for which the channel power needs to exceed, in order to be included in the pulse average power measurement.
|
||||
|
||||
<h3>5: Avg - Average Power</h3>
|
||||
<h3>6: Avg - Average Power</h3>
|
||||
|
||||
Displays the most recent average power measurement in dB.
|
||||
|
||||
<h3>6: Max - Max Peak Power</h3>
|
||||
<h3>7: Max - Max Peak Power</h3>
|
||||
|
||||
Displays the maximum instantaneous peak power measurement in dB.
|
||||
|
||||
<h3>7: Min - Min Peak Power</h3>
|
||||
<h3>8: Min - Min Peak Power</h3>
|
||||
|
||||
Displays the minimum instantaneous peak power measurement in dB.
|
||||
|
||||
<h3>8: Pulse - Pulse Average Power</h3>
|
||||
<h3>9: Pulse - Pulse Average Power</h3>
|
||||
|
||||
Displays the most recent pulse average power measurement in dB.
|
||||
|
||||
<h3>9: Clear Data</h3>
|
||||
<h3>10: Clear Data</h3>
|
||||
|
||||
Clears current measurements (min and max values are reset).
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "SWGADSBDemodReport.h"
|
||||
#include "SWGTargetAzimuthElevation.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplemimo.h"
|
||||
#include "device/deviceapi.h"
|
||||
|
|
|
@ -43,12 +43,10 @@
|
|||
#include "plugin/pluginapi.h"
|
||||
#include "util/airlines.h"
|
||||
#include "util/crc.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "util/units.h"
|
||||
#include "util/morse.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/clickablelabel.h"
|
||||
#include "gui/tabletapandhold.h"
|
||||
|
@ -56,7 +54,6 @@
|
|||
#include "gui/dialogpositioner.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "adsbdemodreport.h"
|
||||
#include "adsbdemod.h"
|
||||
|
@ -4671,6 +4668,7 @@ void ADSBDemodGUI::feedSelect(const QPoint& p)
|
|||
{
|
||||
ADSBDemodFeedDialog dialog(&m_settings);
|
||||
dialog.move(p);
|
||||
new DialogPositioner(&dialog, false);
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
|
@ -5040,6 +5038,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
|
|||
|
||||
ADSBDemodGUI::~ADSBDemodGUI()
|
||||
{
|
||||
disconnect(&MainCore::instance()->getSettings(), &MainSettings::preferenceChanged, this, &ADSBDemodGUI::preferenceChanged);
|
||||
if (m_templateServer)
|
||||
{
|
||||
m_templateServer->close();
|
||||
|
|
|
@ -20,10 +20,8 @@
|
|||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "settings/rollupstate.h"
|
||||
|
||||
#include "adsbdemodsettings.h"
|
||||
|
||||
|
|
|
@ -19,14 +19,6 @@
|
|||
#include <QTime>
|
||||
#include <QDebug>
|
||||
|
||||
#include "util/stepfunctions.h"
|
||||
#include "util/db.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplemimo.h"
|
||||
#include "device/deviceapi.h"
|
||||
|
||||
#include "adsbdemodreport.h"
|
||||
#include "adsbdemodsink.h"
|
||||
#include "adsbdemodsinkworker.h"
|
||||
#include "adsb.h"
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
#include "dsp/channelsamplesink.h"
|
||||
#include "dsp/nco.h"
|
||||
#include "dsp/interpolator.h"
|
||||
#include "util/movingaverage.h"
|
||||
|
||||
#include "adsbdemodsettings.h"
|
||||
#include "adsbdemodstats.h"
|
||||
#include "adsbdemodsinkworker.h"
|
||||
|
||||
class ADSBDemodSink : public ChannelSampleSink {
|
||||
|
|
|
@ -20,11 +20,7 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "util/stepfunctions.h"
|
||||
#include "util/db.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
|
||||
#include "adsbdemodreport.h"
|
||||
#include "adsbdemodsink.h"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "util/crc.h"
|
||||
#include "util/message.h"
|
||||
#include "util/messagequeue.h"
|
||||
#include "adsbdemodstats.h"
|
||||
|
||||
|
|
|
@ -431,7 +431,6 @@ Item {
|
|||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: (mouse) => {
|
||||
console.log("AIRPORT CLICKED ************************* ");
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
showRangeItem.visible = !rangeGroup.groupVisible
|
||||
hideRangeItem.visible = rangeGroup.groupVisible
|
||||
|
@ -508,7 +507,6 @@ Item {
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: (mouse) => {
|
||||
console.log("AIRPORT 2 CLICKED ************************* ");
|
||||
if (showFreq) {
|
||||
var freqIdx = Math.floor((mouse.y-5)/((height-10)/airportDataRows))
|
||||
if (freqIdx == 0) {
|
||||
|
|
|
@ -86,7 +86,7 @@ Clicking the Display Settings button will open the Display Settings dialog, whic
|
|||
* The font used for the table.
|
||||
* Whether demodulator statistics are displayed (primarily an option for developers).
|
||||
* Whether the columns in the table are automatically resized after an aircraft is added to it. If unchecked, columns can be resized manually and should be saved with presets.
|
||||
* The transistion altitude in feet for use in ATC mode. Below the TA, altitude will be displayed. Above the TA flight levels will be displayed.
|
||||
* The transition altitude in feet for use in ATC mode. Below the TA, altitude will be displayed. Above the TA flight levels will be displayed.
|
||||
|
||||
You can also enter an [aviationstack](https://aviationstack.com/product) API key, needed to download flight information (such as departure and arrival airports and times).
|
||||
|
||||
|
|
|
@ -30,14 +30,10 @@
|
|||
|
||||
#include "SWGChannelSettings.h"
|
||||
#include "SWGWorkspaceInfo.h"
|
||||
#include "SWGChannelReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "util/ais.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(AISDemod::MsgConfigureAISDemod, Message)
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -37,25 +37,19 @@
|
|||
#include "dsp/dspcommands.h"
|
||||
#include "ui_aisdemodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/ais.h"
|
||||
#include "util/csv.h"
|
||||
#include "util/db.h"
|
||||
#include "util/mmsi.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/dialpopup.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/glscopesettings.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/tabletapandhold.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
#include "maincore.h"
|
||||
#include "feature/featurewebapiutils.h"
|
||||
|
||||
#include "aisdemod.h"
|
||||
#include "aisdemodsink.h"
|
||||
|
||||
void AISDemodGUI::resizeTable()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "aisdemodsettings.h"
|
||||
|
|
|
@ -20,13 +20,10 @@
|
|||
|
||||
#include <complex.h>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
#include "util/db.h"
|
||||
#include "util/stepfunctions.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "aisdemod.h"
|
||||
|
|
|
@ -38,11 +38,8 @@
|
|||
#include "SWGChannelReport.h"
|
||||
#include "SWGAMDemodReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplesource.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
|
|
@ -30,10 +30,8 @@
|
|||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "settings/rollupstate.h"
|
||||
#include "amdemodsettings.h"
|
||||
|
||||
AMDemodSettings::AMDemodSettings() :
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <complex.h>
|
||||
|
||||
#include "audio/audiooutputdevice.h"
|
||||
#include "dsp/fftfilt.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "util/db.h"
|
||||
|
|
|
@ -31,18 +31,12 @@
|
|||
#include "SWGChannelSettings.h"
|
||||
#include "SWGWorkspaceInfo.h"
|
||||
#include "SWGAPTDemodSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
#include "SWGChannelActions.h"
|
||||
#include "SWGMapItem.h"
|
||||
#include "SWGAPTDemodActions.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(APTDemod::MsgConfigureAPTDemod, Message)
|
||||
MESSAGE_CLASS_DEFINITION(APTDemod::MsgPixels, Message)
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -37,22 +37,15 @@
|
|||
#include "dsp/dspcommands.h"
|
||||
#include "ui_aptdemodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "util/morse.h"
|
||||
#include "util/units.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/dialpopup.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/graphicsviewzoom.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "aptdemod.h"
|
||||
#include "aptdemodsink.h"
|
||||
#include "aptdemodsettingsdialog.h"
|
||||
#include "aptdemodselectdialog.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "aptdemodsettings.h"
|
||||
|
|
|
@ -20,12 +20,6 @@
|
|||
|
||||
#include <complex.h>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/db.h"
|
||||
#include "util/stepfunctions.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "aptdemod.h"
|
||||
#include "aptdemodsink.h"
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <stdio.h>
|
||||
#include <complex.h>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "device/deviceapi.h"
|
||||
|
||||
#include "atvdemod.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "gui/dialogpositioner.h"
|
||||
#include "ui_atvdemodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "maincore.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "atvdemodsettings.h"
|
||||
|
|
|
@ -36,11 +36,9 @@
|
|||
#include "SWGBFMDemodReport.h"
|
||||
#include "SWGRDSReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplemimo.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
|
|
|
@ -37,10 +37,8 @@
|
|||
#include "dsp/dspcommands.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
|
|
|
@ -16,21 +16,15 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "boost/format.hpp"
|
||||
#include <stdio.h>
|
||||
#include <complex.h>
|
||||
|
||||
#include <QTime>
|
||||
#include <QDebug>
|
||||
|
||||
#include "audio/audiooutputdevice.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplemimo.h"
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "pipes/datapipes.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "rdsparser.h"
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
project(chirpchat)
|
||||
|
||||
if (FT8_SUPPORT)
|
||||
set(chirpchatmod_FT8_LIB ft8)
|
||||
set(chirpchatmod_FT8_INCLUDE ${CMAKE_SOURCE_DIR}/ft8)
|
||||
endif()
|
||||
|
||||
set(chirpchat_SOURCES
|
||||
chirpchatdemod.cpp
|
||||
chirpchatdemodsettings.cpp
|
||||
|
@ -10,6 +15,7 @@ set(chirpchat_SOURCES
|
|||
chirpchatdemoddecodertty.cpp
|
||||
chirpchatdemoddecoderascii.cpp
|
||||
chirpchatdemoddecoderlora.cpp
|
||||
chirpchatdemoddecoderft.cpp
|
||||
chirpchatdemodmsg.cpp
|
||||
)
|
||||
|
||||
|
@ -22,12 +28,14 @@ set(chirpchat_HEADERS
|
|||
chirpchatdemoddecodertty.h
|
||||
chirpchatdemoddecoderascii.h
|
||||
chirpchatdemoddecoderlora.h
|
||||
chirpchatdemoddecoderft.h
|
||||
chirpchatdemodmsg.h
|
||||
chirpchatplugin.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${chirpchatmod_FT8_INCLUDE}
|
||||
)
|
||||
|
||||
if(NOT SERVER_MODE)
|
||||
|
@ -61,6 +69,7 @@ target_link_libraries(${TARGET_NAME}
|
|||
sdrbase
|
||||
${TARGET_LIB_GUI}
|
||||
swagger
|
||||
${chirpchatmod_FT8_LIB}
|
||||
)
|
||||
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
|
||||
|
|
|
@ -38,17 +38,15 @@
|
|||
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "util/ax25.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "chirpchatdemodmsg.h"
|
||||
#include "chirpchatdemoddecoder.h"
|
||||
#include "chirpchatdemod.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemod::MsgConfigureChirpChatDemod, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemod::MsgReportDecodeBytes, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemod::MsgReportDecodeString, Message)
|
||||
|
||||
const char* const ChirpChatDemod::m_channelIdURI = "sdrangel.channel.chirpchatdemod";
|
||||
const char* const ChirpChatDemod::m_channelId = "ChirpChatDemod";
|
||||
|
@ -57,7 +55,9 @@ ChirpChatDemod::ChirpChatDemod(DeviceAPI* deviceAPI) :
|
|||
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_thread(nullptr),
|
||||
m_decoderThread(nullptr),
|
||||
m_basebandSink(nullptr),
|
||||
m_decoder(nullptr),
|
||||
m_running(false),
|
||||
m_spectrumVis(SDR_RX_SCALEF),
|
||||
m_basebandSampleRate(0),
|
||||
|
@ -122,7 +122,7 @@ void ChirpChatDemod::feed(const SampleVector::const_iterator& begin, const Sampl
|
|||
(void) pO;
|
||||
|
||||
if (m_running) {
|
||||
m_basebandSink->feed(begin, end);
|
||||
m_basebandSink->feed(begin, end);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,10 +133,25 @@ void ChirpChatDemod::start()
|
|||
}
|
||||
|
||||
qDebug() << "ChirpChatDemod::start";
|
||||
m_decoderThread = new QThread(this);
|
||||
m_decoder = new ChirpChatDemodDecoder();
|
||||
m_decoder->setOutputMessageQueue(getInputMessageQueue());
|
||||
m_decoder->setNbSymbolBits(m_settings.m_spreadFactor, m_settings.m_deBits);
|
||||
m_decoder->setCodingScheme(m_settings.m_codingScheme);
|
||||
m_decoder->setLoRaHasHeader(m_settings.m_hasHeader);
|
||||
m_decoder->setLoRaHasCRC(m_settings.m_hasCRC);
|
||||
m_decoder->setLoRaParityBits(m_settings.m_nbParityBits);
|
||||
m_decoder->setLoRaPacketLength(m_settings.m_packetLength);
|
||||
m_decoder->moveToThread(m_decoderThread);
|
||||
|
||||
QObject::connect(m_decoderThread, &QThread::finished, m_decoder, &QObject::deleteLater);
|
||||
QObject::connect(m_decoderThread, &QThread::finished, m_decoderThread, &QThread::deleteLater);
|
||||
m_decoderThread->start();
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new ChirpChatDemodBaseband();
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->setDecoderMessageQueue(getInputMessageQueue()); // Decoder held on the main thread
|
||||
m_basebandSink->setDecoderMessageQueue(m_decoder->getInputMessageQueue());
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
QObject::connect(m_thread, &QThread::finished, m_basebandSink, &QObject::deleteLater);
|
||||
|
@ -167,6 +182,9 @@ void ChirpChatDemod::stop()
|
|||
m_running = false;
|
||||
m_thread->exit();
|
||||
m_thread->wait();
|
||||
m_decoderThread->exit();
|
||||
m_decoderThread->wait();
|
||||
m_decoderThread = nullptr;
|
||||
}
|
||||
|
||||
bool ChirpChatDemod::handleMessage(const Message& cmd)
|
||||
|
@ -180,29 +198,28 @@ bool ChirpChatDemod::handleMessage(const Message& cmd)
|
|||
|
||||
return true;
|
||||
}
|
||||
else if (ChirpChatDemodMsg::MsgDecodeSymbols::match(cmd))
|
||||
else if (ChirpChatDemodMsg::MsgReportDecodeBytes::match(cmd))
|
||||
{
|
||||
qDebug() << "ChirpChatDemod::handleMessage: MsgDecodeSymbols";
|
||||
ChirpChatDemodMsg::MsgDecodeSymbols& msg = (ChirpChatDemodMsg::MsgDecodeSymbols&) cmd;
|
||||
qDebug() << "ChirpChatDemod::handleMessage: MsgReportDecodeBytes";
|
||||
ChirpChatDemodMsg::MsgReportDecodeBytes& msg = (ChirpChatDemodMsg::MsgReportDecodeBytes&) cmd;
|
||||
m_lastMsgSignalDb = msg.getSingalDb();
|
||||
m_lastMsgNoiseDb = msg.getNoiseDb();
|
||||
m_lastMsgSyncWord = msg.getSyncWord();
|
||||
m_lastMsgTimestamp = msg.getMsgTimestamp();
|
||||
|
||||
if (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingLoRa)
|
||||
{
|
||||
m_decoder.decodeSymbols(msg.getSymbols(), m_lastMsgBytes);
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
m_lastMsgTimestamp = dt.toString(Qt::ISODateWithMs);
|
||||
m_lastMsgPacketLength = m_decoder.getPacketLength();
|
||||
m_lastMsgNbParityBits = m_decoder.getNbParityBits();
|
||||
m_lastMsgHasCRC = m_decoder.getHasCRC();
|
||||
m_lastMsgNbSymbols = m_decoder.getNbSymbols();
|
||||
m_lastMsgNbCodewords = m_decoder.getNbCodewords();
|
||||
m_lastMsgEarlyEOM = m_decoder.getEarlyEOM();
|
||||
m_lastMsgHeaderCRC = m_decoder.getHeaderCRCStatus();
|
||||
m_lastMsgHeaderParityStatus = m_decoder.getHeaderParityStatus();
|
||||
m_lastMsgPayloadCRC = m_decoder.getPayloadCRCStatus();
|
||||
m_lastMsgPayloadParityStatus = m_decoder.getPayloadParityStatus();
|
||||
m_lastMsgBytes = msg.getBytes();
|
||||
m_lastMsgPacketLength = msg.getPacketSize();
|
||||
m_lastMsgNbParityBits = msg.getNbParityBits();
|
||||
m_lastMsgHasCRC = msg.getHasCRC();
|
||||
m_lastMsgNbSymbols = msg.getNbSymbols();
|
||||
m_lastMsgNbCodewords = msg.getNbCodewords();
|
||||
m_lastMsgEarlyEOM = msg.getEarlyEOM();
|
||||
m_lastMsgHeaderCRC = msg.getHeaderCRCStatus();
|
||||
m_lastMsgHeaderParityStatus = msg.getHeaderParityStatus();
|
||||
m_lastMsgPayloadCRC = msg.getPayloadCRCStatus();
|
||||
m_lastMsgPayloadParityStatus = msg.getPayloadParityStatus();
|
||||
|
||||
QByteArray bytesCopy(m_lastMsgBytes);
|
||||
bytesCopy.truncate(m_lastMsgPacketLength);
|
||||
|
@ -215,23 +232,8 @@ bool ChirpChatDemod::handleMessage(const Message& cmd)
|
|||
m_udpSink.writeUnbuffered(bytes, m_lastMsgPacketLength);
|
||||
}
|
||||
|
||||
if (getMessageQueueToGUI())
|
||||
{
|
||||
MsgReportDecodeBytes *msgToGUI = MsgReportDecodeBytes::create(m_lastMsgBytes);
|
||||
msgToGUI->setSyncWord(m_lastMsgSyncWord);
|
||||
msgToGUI->setSignalDb(m_lastMsgSignalDb);
|
||||
msgToGUI->setNoiseDb(m_lastMsgNoiseDb);
|
||||
msgToGUI->setPacketSize(m_lastMsgPacketLength);
|
||||
msgToGUI->setNbParityBits(m_lastMsgNbParityBits);
|
||||
msgToGUI->setHasCRC(m_lastMsgHasCRC);
|
||||
msgToGUI->setNbSymbols(m_lastMsgNbSymbols);
|
||||
msgToGUI->setNbCodewords(m_lastMsgNbCodewords);
|
||||
msgToGUI->setEarlyEOM(m_lastMsgEarlyEOM);
|
||||
msgToGUI->setHeaderParityStatus(m_lastMsgHeaderParityStatus);
|
||||
msgToGUI->setHeaderCRCStatus(m_lastMsgHeaderCRC);
|
||||
msgToGUI->setPayloadParityStatus(m_lastMsgPayloadParityStatus);
|
||||
msgToGUI->setPayloadCRCStatus(m_lastMsgPayloadCRC);
|
||||
getMessageQueueToGUI()->push(msgToGUI);
|
||||
if (getMessageQueueToGUI()) {
|
||||
getMessageQueueToGUI()->push(new ChirpChatDemodMsg::MsgReportDecodeBytes(msg)); // make a copy
|
||||
}
|
||||
|
||||
// Is this an APRS packet?
|
||||
|
@ -243,7 +245,7 @@ bool ChirpChatDemod::handleMessage(const Message& cmd)
|
|||
&& (greaterThanIdx != -1)
|
||||
&& (colonIdx != -1)
|
||||
&& ((m_lastMsgHasCRC && m_lastMsgPayloadCRC) || !m_lastMsgHasCRC)
|
||||
)
|
||||
)
|
||||
{
|
||||
QByteArray packet;
|
||||
|
||||
|
@ -289,29 +291,68 @@ bool ChirpChatDemod::handleMessage(const Message& cmd)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (ChirpChatDemodMsg::MsgReportDecodeString::match(cmd))
|
||||
{
|
||||
qDebug() << "ChirpChatDemod::handleMessage: MsgReportDecodeString";
|
||||
ChirpChatDemodMsg::MsgReportDecodeString& msg = (ChirpChatDemodMsg::MsgReportDecodeString&) cmd;
|
||||
m_lastMsgSignalDb = msg.getSingalDb();
|
||||
m_lastMsgNoiseDb = msg.getNoiseDb();
|
||||
m_lastMsgSyncWord = msg.getSyncWord();
|
||||
m_lastMsgTimestamp = msg.getMsgTimestamp();
|
||||
m_lastMsgString = msg.getString();
|
||||
|
||||
if (m_settings.m_sendViaUDP)
|
||||
{
|
||||
m_decoder.decodeSymbols(msg.getSymbols(), m_lastMsgString);
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
m_lastMsgTimestamp = dt.toString(Qt::ISODateWithMs);
|
||||
const QByteArray& byteArray = m_lastMsgString.toUtf8();
|
||||
const uint8_t *bytes = reinterpret_cast<const uint8_t*>(byteArray.data());
|
||||
m_udpSink.writeUnbuffered(bytes, byteArray.size());
|
||||
}
|
||||
|
||||
if (m_settings.m_sendViaUDP)
|
||||
{
|
||||
const QByteArray& byteArray = m_lastMsgString.toUtf8();
|
||||
const uint8_t *bytes = reinterpret_cast<const uint8_t*>(byteArray.data());
|
||||
m_udpSink.writeUnbuffered(bytes, byteArray.size());
|
||||
}
|
||||
if (getMessageQueueToGUI()) {
|
||||
getMessageQueueToGUI()->push(new ChirpChatDemodMsg::MsgReportDecodeString(msg)); // make a copy
|
||||
}
|
||||
|
||||
if (getMessageQueueToGUI())
|
||||
return true;
|
||||
}
|
||||
else if (ChirpChatDemodMsg::MsgReportDecodeFT::match(cmd))
|
||||
{
|
||||
qDebug() << "ChirpChatDemod::handleMessage: MsgReportDecodeFT";
|
||||
ChirpChatDemodMsg::MsgReportDecodeFT& msg = (ChirpChatDemodMsg::MsgReportDecodeFT&) cmd;
|
||||
m_lastMsgSignalDb = msg.getSingalDb();
|
||||
m_lastMsgNoiseDb = msg.getNoiseDb();
|
||||
m_lastMsgSyncWord = msg.getSyncWord();
|
||||
m_lastMsgTimestamp = msg.getMsgTimestamp();
|
||||
m_lastMsgString = msg.getMessage(); // for now we do not handle message components (call1, ...)
|
||||
int nbSymbolBits = m_settings.m_spreadFactor - m_settings.m_deBits;
|
||||
m_lastMsgNbSymbols = (174 / nbSymbolBits) + ((174 % nbSymbolBits) == 0 ? 0 : 1);
|
||||
|
||||
if (m_settings.m_autoNbSymbolsMax)
|
||||
{
|
||||
ChirpChatDemodSettings settings = m_settings;
|
||||
settings.m_nbSymbolsMax = m_lastMsgNbSymbols;
|
||||
applySettings(settings);
|
||||
|
||||
if (getMessageQueueToGUI()) // forward to GUI if any
|
||||
{
|
||||
MsgReportDecodeString *msgToGUI = MsgReportDecodeString::create(m_lastMsgString);
|
||||
msgToGUI->setSyncWord(m_lastMsgSyncWord);
|
||||
msgToGUI->setSignalDb(m_lastMsgSignalDb);
|
||||
msgToGUI->setNoiseDb(m_lastMsgNoiseDb);
|
||||
MsgConfigureChirpChatDemod *msgToGUI = MsgConfigureChirpChatDemod::create(settings, false);
|
||||
getMessageQueueToGUI()->push(msgToGUI);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_settings.m_sendViaUDP)
|
||||
{
|
||||
const QByteArray& byteArray = m_lastMsgString.toUtf8();
|
||||
const uint8_t *bytes = reinterpret_cast<const uint8_t*>(byteArray.data());
|
||||
m_udpSink.writeUnbuffered(bytes, byteArray.size());
|
||||
}
|
||||
|
||||
if (getMessageQueueToGUI()) {
|
||||
getMessageQueueToGUI()->push(new ChirpChatDemodMsg::MsgReportDecodeFT(msg)); // make a copy
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (DSPSignalNotification::match(cmd))
|
||||
|
@ -420,38 +461,51 @@ void ChirpChatDemod::applySettings(const ChirpChatDemodSettings& settings, bool
|
|||
}
|
||||
|
||||
if ((settings.m_spreadFactor != m_settings.m_spreadFactor)
|
||||
|| (settings.m_deBits != m_settings.m_deBits) || force) {
|
||||
m_decoder.setNbSymbolBits(settings.m_spreadFactor, settings.m_deBits);
|
||||
|| (settings.m_deBits != m_settings.m_deBits) || force)
|
||||
{
|
||||
if (m_decoder) {
|
||||
m_decoder->setNbSymbolBits(settings.m_spreadFactor, settings.m_deBits);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_codingScheme != m_settings.m_codingScheme) || force)
|
||||
{
|
||||
reverseAPIKeys.append("codingScheme");
|
||||
m_decoder.setCodingScheme(settings.m_codingScheme);
|
||||
if (m_decoder) {
|
||||
m_decoder->setCodingScheme(settings.m_codingScheme);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_hasHeader != m_settings.m_hasHeader) || force)
|
||||
{
|
||||
reverseAPIKeys.append("hasHeader");
|
||||
m_decoder.setLoRaHasHeader(settings.m_hasHeader);
|
||||
if (m_decoder) {
|
||||
m_decoder->setLoRaHasHeader(settings.m_hasHeader);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_hasCRC != m_settings.m_hasCRC) || force)
|
||||
{
|
||||
reverseAPIKeys.append("hasCRC");
|
||||
m_decoder.setLoRaHasCRC(settings.m_hasCRC);
|
||||
if (m_decoder) {
|
||||
m_decoder->setLoRaHasCRC(settings.m_hasCRC);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_nbParityBits != m_settings.m_nbParityBits) || force)
|
||||
{
|
||||
reverseAPIKeys.append("nbParityBits");
|
||||
m_decoder.setLoRaParityBits(settings.m_nbParityBits);
|
||||
if (m_decoder) {
|
||||
m_decoder->setLoRaParityBits(settings.m_nbParityBits);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_packetLength != m_settings.m_packetLength) || force)
|
||||
{
|
||||
reverseAPIKeys.append("packetLength");
|
||||
m_decoder.setLoRaPacketLength(settings.m_packetLength);
|
||||
if (m_decoder) {
|
||||
m_decoder->setLoRaPacketLength(settings.m_packetLength);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_decodeActive != m_settings.m_decodeActive) || force) {
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
#include "util/udpsinkutil.h"
|
||||
|
||||
#include "chirpchatdemodbaseband.h"
|
||||
#include "chirpchatdemoddecoder.h"
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class DeviceAPI;
|
||||
class QThread;
|
||||
class ObjectPipe;
|
||||
class ChirpChatDemodDecoder;
|
||||
|
||||
class ChirpChatDemod : public BasebandSampleSink, public ChannelAPI {
|
||||
public:
|
||||
|
@ -68,141 +68,6 @@ public:
|
|||
{ }
|
||||
};
|
||||
|
||||
class MsgReportDecodeBytes : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const QByteArray& getBytes() const { return m_bytes; }
|
||||
unsigned int getSyncWord() const { return m_syncWord; }
|
||||
float getSingalDb() const { return m_signalDb; }
|
||||
float getNoiseDb() const { return m_noiseDb; }
|
||||
unsigned int getPacketSize() const { return m_packetSize; }
|
||||
unsigned int getNbParityBits() const { return m_nbParityBits; }
|
||||
unsigned int getNbSymbols() const { return m_nbSymbols; }
|
||||
unsigned int getNbCodewords() const { return m_nbCodewords; }
|
||||
bool getHasCRC() const { return m_hasCRC; }
|
||||
bool getEarlyEOM() const { return m_earlyEOM; }
|
||||
int getHeaderParityStatus() const { return m_headerParityStatus; }
|
||||
bool getHeaderCRCStatus() const { return m_headerCRCStatus; }
|
||||
int getPayloadParityStatus() const { return m_payloadParityStatus; }
|
||||
bool getPayloadCRCStatus() const { return m_payloadCRCStatus; }
|
||||
|
||||
static MsgReportDecodeBytes* create(const QByteArray& bytes) {
|
||||
return new MsgReportDecodeBytes(bytes);
|
||||
}
|
||||
void setSyncWord(unsigned int syncWord) {
|
||||
m_syncWord = syncWord;
|
||||
}
|
||||
void setSignalDb(float db) {
|
||||
m_signalDb = db;
|
||||
}
|
||||
void setNoiseDb(float db) {
|
||||
m_noiseDb = db;
|
||||
}
|
||||
void setPacketSize(unsigned int packetSize) {
|
||||
m_packetSize = packetSize;
|
||||
}
|
||||
void setNbParityBits(unsigned int nbParityBits) {
|
||||
m_nbParityBits = nbParityBits;
|
||||
}
|
||||
void setNbSymbols(unsigned int nbSymbols) {
|
||||
m_nbSymbols = nbSymbols;
|
||||
}
|
||||
void setNbCodewords(unsigned int nbCodewords) {
|
||||
m_nbCodewords = nbCodewords;
|
||||
}
|
||||
void setHasCRC(bool hasCRC) {
|
||||
m_hasCRC = hasCRC;
|
||||
}
|
||||
void setEarlyEOM(bool earlyEOM) {
|
||||
m_earlyEOM = earlyEOM;
|
||||
}
|
||||
void setHeaderParityStatus(int headerParityStatus) {
|
||||
m_headerParityStatus = headerParityStatus;
|
||||
}
|
||||
void setHeaderCRCStatus(bool headerCRCStatus) {
|
||||
m_headerCRCStatus = headerCRCStatus;
|
||||
}
|
||||
void setPayloadParityStatus(int payloadParityStatus) {
|
||||
m_payloadParityStatus = payloadParityStatus;
|
||||
}
|
||||
void setPayloadCRCStatus(bool payloadCRCStatus) {
|
||||
m_payloadCRCStatus = payloadCRCStatus;
|
||||
}
|
||||
|
||||
private:
|
||||
QByteArray m_bytes;
|
||||
unsigned int m_syncWord;
|
||||
float m_signalDb;
|
||||
float m_noiseDb;
|
||||
unsigned int m_packetSize;
|
||||
unsigned int m_nbParityBits;
|
||||
unsigned int m_nbSymbols;
|
||||
unsigned int m_nbCodewords;
|
||||
bool m_hasCRC;
|
||||
bool m_earlyEOM;
|
||||
int m_headerParityStatus;
|
||||
bool m_headerCRCStatus;
|
||||
int m_payloadParityStatus;
|
||||
bool m_payloadCRCStatus;
|
||||
|
||||
MsgReportDecodeBytes(const QByteArray& bytes) :
|
||||
Message(),
|
||||
m_bytes(bytes),
|
||||
m_syncWord(0),
|
||||
m_signalDb(0.0),
|
||||
m_noiseDb(0.0),
|
||||
m_packetSize(0),
|
||||
m_nbParityBits(0),
|
||||
m_nbSymbols(0),
|
||||
m_nbCodewords(0),
|
||||
m_hasCRC(false),
|
||||
m_earlyEOM(false),
|
||||
m_headerParityStatus(false),
|
||||
m_headerCRCStatus(false),
|
||||
m_payloadParityStatus(false),
|
||||
m_payloadCRCStatus(false)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportDecodeString : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const QString& getString() const { return m_str; }
|
||||
unsigned int getSyncWord() const { return m_syncWord; }
|
||||
float getSingalDb() const { return m_signalDb; }
|
||||
float getNoiseDb() const { return m_noiseDb; }
|
||||
|
||||
static MsgReportDecodeString* create(const QString& str)
|
||||
{
|
||||
return new MsgReportDecodeString(str);
|
||||
}
|
||||
void setSyncWord(unsigned int syncWord) {
|
||||
m_syncWord = syncWord;
|
||||
}
|
||||
void setSignalDb(float db) {
|
||||
m_signalDb = db;
|
||||
}
|
||||
void setNoiseDb(float db) {
|
||||
m_noiseDb = db;
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_str;
|
||||
unsigned int m_syncWord;
|
||||
float m_signalDb;
|
||||
float m_noiseDb;
|
||||
|
||||
MsgReportDecodeString(const QString& str) :
|
||||
Message(),
|
||||
m_str(str),
|
||||
m_syncWord(0),
|
||||
m_signalDb(0.0),
|
||||
m_noiseDb(0.0)
|
||||
{ }
|
||||
};
|
||||
|
||||
ChirpChatDemod(DeviceAPI* deviceAPI);
|
||||
virtual ~ChirpChatDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
@ -276,9 +141,10 @@ public:
|
|||
private:
|
||||
DeviceAPI *m_deviceAPI;
|
||||
QThread *m_thread;
|
||||
QThread *m_decoderThread;
|
||||
ChirpChatDemodBaseband *m_basebandSink;
|
||||
ChirpChatDemodDecoder *m_decoder;
|
||||
bool m_running;
|
||||
ChirpChatDemodDecoder m_decoder;
|
||||
ChirpChatDemodSettings m_settings;
|
||||
SpectrumVis m_spectrumVis;
|
||||
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -15,18 +15,25 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QTime>
|
||||
|
||||
#include "chirpchatdemoddecoder.h"
|
||||
#include "chirpchatdemoddecodertty.h"
|
||||
#include "chirpchatdemoddecoderascii.h"
|
||||
#include "chirpchatdemoddecoderlora.h"
|
||||
#include "chirpchatdemoddecoderft.h"
|
||||
#include "chirpchatdemodmsg.h"
|
||||
|
||||
ChirpChatDemodDecoder::ChirpChatDemodDecoder() :
|
||||
m_codingScheme(ChirpChatDemodSettings::CodingTTY),
|
||||
m_nbSymbolBits(5),
|
||||
m_nbParityBits(1),
|
||||
m_hasCRC(true),
|
||||
m_hasHeader(true)
|
||||
{}
|
||||
m_hasHeader(true),
|
||||
m_outputMessageQueue(nullptr)
|
||||
{
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
}
|
||||
|
||||
ChirpChatDemodDecoder::~ChirpChatDemodDecoder()
|
||||
{}
|
||||
|
@ -54,7 +61,7 @@ void ChirpChatDemodDecoder::decodeSymbols(const std::vector<unsigned short>& sym
|
|||
}
|
||||
break;
|
||||
case ChirpChatDemodSettings::CodingASCII:
|
||||
if (m_nbSymbolBits == 5) {
|
||||
if (m_nbSymbolBits == 7) {
|
||||
ChirpChatDemodDecoderASCII::decodeSymbols(symbols, str);
|
||||
}
|
||||
break;
|
||||
|
@ -99,3 +106,132 @@ void ChirpChatDemodDecoder::decodeSymbols(const std::vector<unsigned short>& sym
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ChirpChatDemodDecoder::decodeSymbols( //!< For FT coding scheme
|
||||
const std::vector<std::vector<float>>& mags, // vector of symbols magnitudes
|
||||
int nbSymbolBits, //!< number of bits per symbol
|
||||
std::string& msg, //!< formatted message
|
||||
std::string& call1, //!< 1st callsign or shorthand
|
||||
std::string& call2, //!< 2nd callsign
|
||||
std::string& loc, //!< locator, report or shorthand
|
||||
bool& reply //!< true if message is a reply report
|
||||
)
|
||||
{
|
||||
if (m_codingScheme != ChirpChatDemodSettings::CodingFT) {
|
||||
return;
|
||||
}
|
||||
|
||||
ChirpChatDemodDecoderFT::decodeSymbols(
|
||||
mags,
|
||||
nbSymbolBits,
|
||||
msg,
|
||||
call1,
|
||||
call2,
|
||||
loc,
|
||||
reply,
|
||||
m_payloadParityStatus,
|
||||
m_payloadCRCStatus
|
||||
);
|
||||
}
|
||||
|
||||
bool ChirpChatDemodDecoder::handleMessage(const Message& cmd)
|
||||
{
|
||||
if (ChirpChatDemodMsg::MsgDecodeSymbols::match(cmd))
|
||||
{
|
||||
qDebug("ChirpChatDemodDecoder::handleMessage: MsgDecodeSymbols");
|
||||
ChirpChatDemodMsg::MsgDecodeSymbols& msg = (ChirpChatDemodMsg::MsgDecodeSymbols&) cmd;
|
||||
float msgSignalDb = msg.getSingalDb();
|
||||
float msgNoiseDb = msg.getNoiseDb();
|
||||
unsigned int msgSyncWord = msg.getSyncWord();
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
QString msgTimestamp = dt.toString(Qt::ISODateWithMs);
|
||||
|
||||
if (m_codingScheme == ChirpChatDemodSettings::CodingLoRa)
|
||||
{
|
||||
QByteArray msgBytes;
|
||||
decodeSymbols(msg.getSymbols(), msgBytes);
|
||||
|
||||
if (m_outputMessageQueue)
|
||||
{
|
||||
ChirpChatDemodMsg::MsgReportDecodeBytes *outputMsg = ChirpChatDemodMsg::MsgReportDecodeBytes::create(msgBytes);
|
||||
outputMsg->setSyncWord(msgSyncWord);
|
||||
outputMsg->setSignalDb(msgSignalDb);
|
||||
outputMsg->setNoiseDb(msgNoiseDb);
|
||||
outputMsg->setMsgTimestamp(msgTimestamp);
|
||||
outputMsg->setPacketSize(getPacketLength());
|
||||
outputMsg->setNbParityBits(getNbParityBits());
|
||||
outputMsg->setHasCRC(getHasCRC());
|
||||
outputMsg->setNbSymbols(getNbSymbols());
|
||||
outputMsg->setNbCodewords(getNbCodewords());
|
||||
outputMsg->setEarlyEOM(getEarlyEOM());
|
||||
outputMsg->setHeaderParityStatus(getHeaderParityStatus());
|
||||
outputMsg->setHeaderCRCStatus(getHeaderCRCStatus());
|
||||
outputMsg->setPayloadParityStatus(getPayloadParityStatus());
|
||||
outputMsg->setPayloadCRCStatus(getPayloadCRCStatus());
|
||||
m_outputMessageQueue->push(outputMsg);
|
||||
}
|
||||
}
|
||||
else if (m_codingScheme == ChirpChatDemodSettings::CodingFT)
|
||||
{
|
||||
std::string fmsg, call1, call2, loc;
|
||||
bool reply;
|
||||
decodeSymbols(
|
||||
msg.getMagnitudes(),
|
||||
m_nbSymbolBits,
|
||||
fmsg,
|
||||
call1,
|
||||
call2,
|
||||
loc,
|
||||
reply
|
||||
);
|
||||
|
||||
if (m_outputMessageQueue)
|
||||
{
|
||||
ChirpChatDemodMsg::MsgReportDecodeFT *outputMsg = ChirpChatDemodMsg::MsgReportDecodeFT::create();
|
||||
outputMsg->setSyncWord(msgSyncWord);
|
||||
outputMsg->setSignalDb(msgSignalDb);
|
||||
outputMsg->setNoiseDb(msgNoiseDb);
|
||||
outputMsg->setMsgTimestamp(msgTimestamp);
|
||||
outputMsg->setMessage(QString(fmsg.c_str()));
|
||||
outputMsg->setCall1(QString(call1.c_str()));
|
||||
outputMsg->setCall2(QString(call2.c_str()));
|
||||
outputMsg->setLoc(QString(loc.c_str()));
|
||||
outputMsg->setReply(reply);
|
||||
outputMsg->setPayloadParityStatus(getPayloadParityStatus());
|
||||
outputMsg->setPayloadCRCStatus(getPayloadCRCStatus());
|
||||
m_outputMessageQueue->push(outputMsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString msgString;
|
||||
decodeSymbols(msg.getSymbols(), msgString);
|
||||
|
||||
if (m_outputMessageQueue)
|
||||
{
|
||||
ChirpChatDemodMsg::MsgReportDecodeString *outputMsg = ChirpChatDemodMsg::MsgReportDecodeString::create(msgString);
|
||||
outputMsg->setSyncWord(msgSyncWord);
|
||||
outputMsg->setSignalDb(msgSignalDb);
|
||||
outputMsg->setNoiseDb(msgNoiseDb);
|
||||
outputMsg->setMsgTimestamp(msgTimestamp);
|
||||
m_outputMessageQueue->push(outputMsg);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChirpChatDemodDecoder::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_inputMessageQueue.pop()) != nullptr)
|
||||
{
|
||||
if (handleMessage(*message)) {
|
||||
delete message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,15 @@
|
|||
#define INCLUDE_CHIRPCHATDEMODDECODER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "util/messagequeue.h"
|
||||
#include "chirpchatdemodsettings.h"
|
||||
|
||||
class ChirpChatDemodDecoder
|
||||
class ChirpChatDemodDecoder : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ChirpChatDemodDecoder();
|
||||
~ChirpChatDemodDecoder();
|
||||
|
@ -35,8 +40,22 @@ public:
|
|||
void setLoRaHasHeader(bool hasHeader) { m_hasHeader = hasHeader; }
|
||||
void setLoRaHasCRC(bool hasCRC) { m_hasCRC = hasCRC; }
|
||||
void setLoRaPacketLength(unsigned int packetLength) { m_packetLength = packetLength; }
|
||||
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
void setOutputMessageQueue(MessageQueue *messageQueue) { m_outputMessageQueue = messageQueue; }
|
||||
|
||||
private:
|
||||
bool handleMessage(const Message& cmd);
|
||||
void decodeSymbols(const std::vector<unsigned short>& symbols, QString& str); //!< For ASCII and TTY
|
||||
void decodeSymbols(const std::vector<unsigned short>& symbols, QByteArray& bytes); //!< For raw bytes (original LoRa)
|
||||
void decodeSymbols( //!< For FT coding scheme
|
||||
const std::vector<std::vector<float>>& mags, // vector of symbols magnitudes
|
||||
int nbSymbolBits, //!< number of bits per symbol
|
||||
std::string& msg, //!< formatted message
|
||||
std::string& call1, //!< 1st callsign or shorthand
|
||||
std::string& call2, //!< 2nd callsign
|
||||
std::string& loc, //!< locator, report or shorthand
|
||||
bool& reply //!< true if message is a reply report
|
||||
);
|
||||
unsigned int getNbParityBits() const { return m_nbParityBits; }
|
||||
unsigned int getPacketLength() const { return m_packetLength; }
|
||||
bool getHasCRC() const { return m_hasCRC; }
|
||||
|
@ -48,7 +67,6 @@ public:
|
|||
int getPayloadParityStatus() const { return m_payloadParityStatus; }
|
||||
bool getPayloadCRCStatus() const { return m_payloadCRCStatus; }
|
||||
|
||||
private:
|
||||
ChirpChatDemodSettings::CodingScheme m_codingScheme;
|
||||
unsigned int m_spreadFactor;
|
||||
unsigned int m_deBits;
|
||||
|
@ -65,6 +83,11 @@ private:
|
|||
bool m_headerCRCStatus;
|
||||
int m_payloadParityStatus;
|
||||
bool m_payloadCRCStatus;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
MessageQueue *m_outputMessageQueue;
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
};
|
||||
|
||||
#endif // INCLUDE_CHIRPCHATDEMODDECODER_H
|
||||
|
|
|
@ -0,0 +1,187 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2024 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "chirpchatdemodsettings.h"
|
||||
#include "chirpchatdemoddecoderft.h"
|
||||
|
||||
#ifndef HAS_FT8
|
||||
void ChirpChatDemodDecoderFT::decodeSymbols(
|
||||
const std::vector<std::vector<float>>& mags, // vector of symbols magnitudes
|
||||
int nbSymbolBits, //!< number of bits per symbol
|
||||
QString& msg, //!< formatted message
|
||||
QString& call1, //!< 1st callsign or shorthand
|
||||
QString& call2, //!< 2nd callsign
|
||||
QString& loc, //!< locator, report or shorthand
|
||||
bool& reply //!< true if message is a reply report
|
||||
)
|
||||
{
|
||||
qWarning("ChirpChatDemodDecoderFT::decodeSymbols: not implemented");
|
||||
}
|
||||
#else
|
||||
|
||||
#include "ft8.h"
|
||||
#include "packing.h"
|
||||
|
||||
void ChirpChatDemodDecoderFT::decodeSymbols(
|
||||
const std::vector<std::vector<float>>& mags, // vector of symbols magnitudes
|
||||
int nbSymbolBits, //!< number of bits per symbol
|
||||
std::string& msg, //!< formatted message
|
||||
std::string& call1, //!< 1st callsign or shorthand
|
||||
std::string& call2, //!< 2nd callsign
|
||||
std::string& loc, //!< locator, report or shorthand
|
||||
bool& reply, //!< true if message is a reply report
|
||||
int& payloadParityStatus,
|
||||
bool& payloadCRCStatus
|
||||
)
|
||||
{
|
||||
if (mags.size()*nbSymbolBits < 174)
|
||||
{
|
||||
qWarning("ChirpChatDemodDecoderFT::decodeSymbols: insufficient number of symbols for FT payload");
|
||||
return;
|
||||
}
|
||||
|
||||
FT8::FT8Params params;
|
||||
int r174[174];
|
||||
std::string comments;
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityOK;
|
||||
payloadCRCStatus = false;
|
||||
std::vector<std::vector<float>> magsp = mags;
|
||||
|
||||
qDebug("ChirpChatDemodDecoderFT::decodeSymbols: try decode with symbol shift 0");
|
||||
int res = decodeWithShift(params, magsp, nbSymbolBits, r174, comments);
|
||||
|
||||
if (res == 0)
|
||||
{
|
||||
std::vector<std::vector<float>> magsn = mags;
|
||||
int shiftcount = 0;
|
||||
|
||||
while ((res == 0) && (shiftcount < 7))
|
||||
{
|
||||
qDebug("ChirpChatDemodDecoderFT::decodeSymbols: try decode with symbol shift %d", shiftcount + 1);
|
||||
res = decodeWithShift(params, magsp, nbSymbolBits, r174, comments, 1);
|
||||
|
||||
if (res == 0)
|
||||
{
|
||||
qDebug("ChirpChatDemodDecoderFT::decodeSymbols: try decode with symbol shift -%d", shiftcount + 1);
|
||||
res = decodeWithShift(params, magsn, nbSymbolBits, r174, comments, -1);
|
||||
}
|
||||
|
||||
shiftcount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (res == 0)
|
||||
{
|
||||
if (comments == "LDPC fail")
|
||||
{
|
||||
qWarning("ChirpChatDemodDecoderFT::decodeSymbols: LDPC failed");
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityError;
|
||||
}
|
||||
else if (comments == "OSD fail")
|
||||
{
|
||||
qWarning("ChirpChatDemodDecoderFT::decodeSymbols: OSD failed");
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityError;
|
||||
}
|
||||
else if (comments == "CRC fail")
|
||||
{
|
||||
qWarning("ChirpChatDemodDecoderFT::decodeSymbols: CRC failed");
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning("ChirpChatDemodDecoderFT::decodeSymbols: decode failed for unknown reason");
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityUndefined;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
payloadCRCStatus = true;
|
||||
FT8::Packing packing;
|
||||
std::string msgType;
|
||||
msg = packing.unpack(r174, call1, call2, loc, msgType);
|
||||
reply = false;
|
||||
|
||||
if ((msgType == "0.3") || (msgType == "0.3")) {
|
||||
reply = r174[56] != 0;
|
||||
}
|
||||
if ((msgType == "1") || (msgType == "2")) {
|
||||
reply = r174[58] != 0;
|
||||
}
|
||||
if ((msgType == "3")) {
|
||||
reply = r174[57] != 0;
|
||||
}
|
||||
if ((msgType == "5")) {
|
||||
reply = r174[34] != 0;
|
||||
}
|
||||
}
|
||||
|
||||
int ChirpChatDemodDecoderFT::decodeWithShift(
|
||||
FT8::FT8Params& params,
|
||||
std::vector<std::vector<float>>& mags,
|
||||
int nbSymbolBits,
|
||||
int *r174,
|
||||
std::string& comments,
|
||||
int shift
|
||||
)
|
||||
{
|
||||
if (shift > 0)
|
||||
{
|
||||
for (unsigned int si = 0; si < mags.size(); si++)
|
||||
{
|
||||
for (int bini = (1<<nbSymbolBits) - 1; bini > 0; bini--)
|
||||
{
|
||||
float x = mags[si][bini - 1];
|
||||
mags[si][bini - 1] = mags[si][bini];
|
||||
mags[si][bini] = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shift < 0)
|
||||
{
|
||||
for (unsigned int si = 0; si < mags.size(); si++)
|
||||
{
|
||||
for (int bini = 0; bini < (1<<nbSymbolBits) - 1; bini++)
|
||||
{
|
||||
float x = mags[si][bini + 1];
|
||||
mags[si][bini + 1] = mags[si][bini];
|
||||
mags[si][bini] = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float *lls = new float[mags.size()*nbSymbolBits]; // bits log likelihoods (>0 for 0, <0 for 1)
|
||||
std::fill(lls, lls+mags.size()*nbSymbolBits, 0.0);
|
||||
FT8::FT8::soft_decode_mags(params, mags, nbSymbolBits, lls);
|
||||
deinterleave174(lls);
|
||||
int ret = FT8::FT8::decode(lls, r174, params, 0, comments);
|
||||
delete[] lls;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ChirpChatDemodDecoderFT::deinterleave174(float ll174[])
|
||||
{
|
||||
// 174 = 2*3*29
|
||||
float t174[174];
|
||||
std::copy(ll174, ll174+174, t174);
|
||||
|
||||
for (int i = 0; i < 174; i++) {
|
||||
ll174[i] = t174[(i%6)*29 + (i%29)];
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_FT8
|
|
@ -0,0 +1,64 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2024 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_CHIRPCHATDEMODDECODERFT_H
|
||||
#define INCLUDE_CHIRPCHATDEMODDECODERFT_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace FT8 {
|
||||
class FT8Params;
|
||||
}
|
||||
|
||||
class ChirpChatDemodDecoderFT
|
||||
{
|
||||
public:
|
||||
enum ParityStatus
|
||||
{
|
||||
ParityUndefined,
|
||||
ParityError,
|
||||
ParityCorrected,
|
||||
ParityOK
|
||||
};
|
||||
|
||||
static void decodeSymbols(
|
||||
const std::vector<std::vector<float>>& mags, // vector of symbols magnitudes
|
||||
int nbSymbolBits, //!< number of bits per symbol
|
||||
std::string& msg, //!< formatted message
|
||||
std::string& call1, //!< 1st callsign or shorthand
|
||||
std::string& call2, //!< 2nd callsign
|
||||
std::string& loc, //!< locator, report or shorthand
|
||||
bool& reply, //!< true if message is a reply report
|
||||
int& payloadParityStatus,
|
||||
bool& payloadCRCStatus
|
||||
);
|
||||
|
||||
private:
|
||||
static int decodeWithShift(
|
||||
FT8::FT8Params& params,
|
||||
std::vector<std::vector<float>>& mags,
|
||||
int nbSymbolBits,
|
||||
int *r174,
|
||||
std::string& comments,
|
||||
int shift = 0
|
||||
);
|
||||
static void deinterleave174(float ll174[]);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -17,6 +17,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "chirpchatdemodsettings.h"
|
||||
#include "chirpchatdemoddecoderlora.h"
|
||||
|
||||
void ChirpChatDemodDecoderLoRa::decodeHeader(
|
||||
|
@ -71,14 +72,14 @@ void ChirpChatDemodDecoderLoRa::decodeHeader(
|
|||
|
||||
if (bad)
|
||||
{
|
||||
headerParityStatus = (int) ParityError;
|
||||
headerParityStatus = (int) ChirpChatDemodSettings::ParityError;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (error) {
|
||||
headerParityStatus = (int) ParityCorrected;
|
||||
headerParityStatus = (int) ChirpChatDemodSettings::ParityCorrected;
|
||||
} else {
|
||||
headerParityStatus = (int) ParityOK;
|
||||
headerParityStatus = (int) ChirpChatDemodSettings::ParityOK;
|
||||
}
|
||||
|
||||
if (bytes[2] != 0) {
|
||||
|
@ -300,11 +301,11 @@ void ChirpChatDemodDecoderLoRa::decodeBytes(
|
|||
}
|
||||
|
||||
if (bad) {
|
||||
payloadParityStatus = (int) ParityError;
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityError;
|
||||
} else if (error) {
|
||||
payloadParityStatus = (int) ParityCorrected;
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityCorrected;
|
||||
} else {
|
||||
payloadParityStatus = (int) ParityOK;
|
||||
payloadParityStatus = (int) ChirpChatDemodSettings::ParityOK;
|
||||
}
|
||||
|
||||
// finalization:
|
||||
|
|
|
@ -26,14 +26,6 @@
|
|||
class ChirpChatDemodDecoderLoRa
|
||||
{
|
||||
public:
|
||||
enum ParityStatus
|
||||
{
|
||||
ParityUndefined,
|
||||
ParityError,
|
||||
ParityCorrected,
|
||||
ParityOK
|
||||
};
|
||||
|
||||
static void decodeBytes(
|
||||
QByteArray& bytes,
|
||||
const std::vector<unsigned short>& inSymbols,
|
||||
|
|
|
@ -31,15 +31,14 @@
|
|||
#include "gui/glspectrum.h"
|
||||
#include "gui/glspectrumgui.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/dialpopup.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "chirpchatdemod.h"
|
||||
#include "chirpchatdemodmsg.h"
|
||||
#include "chirpchatdemodgui.h"
|
||||
|
||||
ChirpChatDemodGUI* ChirpChatDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
|
@ -103,7 +102,7 @@ bool ChirpChatDemodGUI::handleMessage(const Message& message)
|
|||
|
||||
return true;
|
||||
}
|
||||
else if (ChirpChatDemod::MsgReportDecodeBytes::match(message))
|
||||
else if (ChirpChatDemodMsg::MsgReportDecodeBytes::match(message))
|
||||
{
|
||||
if (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingLoRa) {
|
||||
showLoRaMessage(message);
|
||||
|
@ -111,11 +110,19 @@ bool ChirpChatDemodGUI::handleMessage(const Message& message)
|
|||
|
||||
return true;
|
||||
}
|
||||
else if (ChirpChatDemod::MsgReportDecodeString::match(message))
|
||||
else if (ChirpChatDemodMsg::MsgReportDecodeString::match(message))
|
||||
{
|
||||
if ((m_settings.m_codingScheme == ChirpChatDemodSettings::CodingASCII)
|
||||
|| (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingTTY)) {
|
||||
showTextMessage(message);
|
||||
|| (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingTTY)) {
|
||||
showTextMessage(message);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (ChirpChatDemodMsg::MsgReportDecodeFT::match(message))
|
||||
{
|
||||
if (m_settings.m_codingScheme == ChirpChatDemodSettings::CodingFT) {
|
||||
showFTMessage(message);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -280,6 +287,7 @@ void ChirpChatDemodGUI::on_header_stateChanged(int state)
|
|||
|
||||
ui->fecParity->setEnabled(state != Qt::Checked);
|
||||
ui->crc->setEnabled(state != Qt::Checked);
|
||||
ui->packetLength->setEnabled(state != Qt::Checked);
|
||||
|
||||
applySettings();
|
||||
}
|
||||
|
@ -543,11 +551,11 @@ void ChirpChatDemodGUI::displaySquelch()
|
|||
|
||||
void ChirpChatDemodGUI::displayLoRaStatus(int headerParityStatus, bool headerCRCStatus, int payloadParityStatus, bool payloadCRCStatus)
|
||||
{
|
||||
if (m_settings.m_hasHeader && (headerParityStatus == (int) ParityOK)) {
|
||||
if (m_settings.m_hasHeader && (headerParityStatus == (int) ChirpChatDemodSettings::ParityOK)) {
|
||||
ui->headerHammingStatus->setStyleSheet("QLabel { background-color : green; }");
|
||||
} else if (m_settings.m_hasHeader && (headerParityStatus == (int) ParityError)) {
|
||||
} else if (m_settings.m_hasHeader && (headerParityStatus == (int) ChirpChatDemodSettings::ParityError)) {
|
||||
ui->headerHammingStatus->setStyleSheet("QLabel { background-color : red; }");
|
||||
} else if (m_settings.m_hasHeader && (headerParityStatus == (int) ParityCorrected)) {
|
||||
} else if (m_settings.m_hasHeader && (headerParityStatus == (int) ChirpChatDemodSettings::ParityCorrected)) {
|
||||
ui->headerHammingStatus->setStyleSheet("QLabel { background-color : blue; }");
|
||||
} else {
|
||||
ui->headerHammingStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
|
@ -561,11 +569,11 @@ void ChirpChatDemodGUI::displayLoRaStatus(int headerParityStatus, bool headerCRC
|
|||
ui->headerCRCStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
if (payloadParityStatus == (int) ParityOK) {
|
||||
if (payloadParityStatus == (int) ChirpChatDemodSettings::ParityOK) {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background-color : green; }");
|
||||
} else if (payloadParityStatus == (int) ParityError) {
|
||||
} else if (payloadParityStatus == (int) ChirpChatDemodSettings::ParityError) {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background-color : red; }");
|
||||
} else if (payloadParityStatus == (int) ParityCorrected) {
|
||||
} else if (payloadParityStatus == (int) ChirpChatDemodSettings::ParityCorrected) {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background-color : blue; }");
|
||||
} else {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
|
@ -588,6 +596,25 @@ void ChirpChatDemodGUI::resetLoRaStatus()
|
|||
ui->nbCodewordsText->setText("---");
|
||||
}
|
||||
|
||||
void ChirpChatDemodGUI::displayFTStatus(int payloadParityStatus, bool payloadCRCStatus)
|
||||
{
|
||||
if (payloadParityStatus == (int) ChirpChatDemodSettings::ParityOK) {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background-color : green; }");
|
||||
} else if (payloadParityStatus == (int) ChirpChatDemodSettings::ParityError) {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background-color : red; }");
|
||||
} else if (payloadParityStatus == (int) ChirpChatDemodSettings::ParityCorrected) {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background-color : blue; }");
|
||||
} else {
|
||||
ui->payloadFECStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
if (payloadCRCStatus) {
|
||||
ui->payloadCRCStatus->setStyleSheet("QLabel { background-color : green; }");
|
||||
} else {
|
||||
ui->payloadCRCStatus->setStyleSheet("QLabel { background-color : red; }");
|
||||
}
|
||||
}
|
||||
|
||||
void ChirpChatDemodGUI::setBandwidths()
|
||||
{
|
||||
int maxBandwidth = m_basebandSampleRate/ChirpChatDemodSettings::oversampling;
|
||||
|
@ -607,7 +634,7 @@ void ChirpChatDemodGUI::setBandwidths()
|
|||
|
||||
void ChirpChatDemodGUI::showLoRaMessage(const Message& message)
|
||||
{
|
||||
const ChirpChatDemod::MsgReportDecodeBytes& msg = (ChirpChatDemod::MsgReportDecodeBytes&) message;
|
||||
const ChirpChatDemodMsg::MsgReportDecodeBytes& msg = (ChirpChatDemodMsg::MsgReportDecodeBytes&) message;
|
||||
QByteArray bytes = msg.getBytes();
|
||||
QString syncWordStr((tr("%1").arg(msg.getSyncWord(), 2, 16, QChar('0'))));
|
||||
|
||||
|
@ -643,7 +670,7 @@ void ChirpChatDemodGUI::showLoRaMessage(const Message& message)
|
|||
.arg(msg.getHeaderCRCStatus() ? "ok" : "err");
|
||||
|
||||
displayStatus(loRaStatus);
|
||||
displayLoRaStatus(msg.getHeaderParityStatus(), msg.getHeaderCRCStatus(), (int) ParityUndefined, true);
|
||||
displayLoRaStatus(msg.getHeaderParityStatus(), msg.getHeaderCRCStatus(), (int) ChirpChatDemodSettings::ParityUndefined, true);
|
||||
ui->payloadCRCStatus->setStyleSheet("QLabel { background:rgb(79,79,79); }"); // reset payload CRC
|
||||
}
|
||||
else
|
||||
|
@ -677,7 +704,7 @@ void ChirpChatDemodGUI::showLoRaMessage(const Message& message)
|
|||
|
||||
void ChirpChatDemodGUI::showTextMessage(const Message& message)
|
||||
{
|
||||
const ChirpChatDemod::MsgReportDecodeString& msg = (ChirpChatDemod::MsgReportDecodeString&) message;
|
||||
const ChirpChatDemodMsg::MsgReportDecodeString& msg = (ChirpChatDemodMsg::MsgReportDecodeString&) message;
|
||||
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
QString dateStr = dt.toString("HH:mm:ss");
|
||||
|
@ -693,6 +720,27 @@ void ChirpChatDemodGUI::showTextMessage(const Message& message)
|
|||
displayText(msg.getString());
|
||||
}
|
||||
|
||||
void ChirpChatDemodGUI::showFTMessage(const Message& message)
|
||||
{
|
||||
const ChirpChatDemodMsg::MsgReportDecodeFT& msg = (ChirpChatDemodMsg::MsgReportDecodeFT&) message;
|
||||
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
QString dateStr = dt.toString("HH:mm:ss");
|
||||
ui->sText->setText(tr("%1").arg(msg.getSingalDb(), 0, 'f', 1));
|
||||
ui->snrText->setText(tr("%1").arg(msg.getSingalDb() - msg.getNoiseDb(), 0, 'f', 1));
|
||||
|
||||
QString status = tr("%1 S:%2 SN:%3 FEC:%4 CRC:%5")
|
||||
.arg(dateStr)
|
||||
.arg(msg.getSingalDb(), 0, 'f', 1)
|
||||
.arg(msg.getSingalDb() - msg.getNoiseDb(), 0, 'f', 1)
|
||||
.arg(getParityStr(msg.getPayloadParityStatus()))
|
||||
.arg(msg.getPayloadCRCStatus() ? "ok" : "err");
|
||||
|
||||
displayStatus(status);
|
||||
displayText(msg.getMessage()); // We do not show constituents of the message (call1, ...)
|
||||
displayFTStatus(msg.getPayloadParityStatus(), msg.getPayloadCRCStatus());
|
||||
}
|
||||
|
||||
void ChirpChatDemodGUI::displayText(const QString& text)
|
||||
{
|
||||
QTextCursor cursor = ui->messageText->textCursor();
|
||||
|
@ -753,11 +801,11 @@ void ChirpChatDemodGUI::displayStatus(const QString& status)
|
|||
|
||||
QString ChirpChatDemodGUI::getParityStr(int parityStatus)
|
||||
{
|
||||
if (parityStatus == (int) ParityError) {
|
||||
if (parityStatus == (int) ChirpChatDemodSettings::ParityError) {
|
||||
return "err";
|
||||
} else if (parityStatus == (int) ParityCorrected) {
|
||||
} else if (parityStatus == (int) ChirpChatDemodSettings::ParityCorrected) {
|
||||
return "fix";
|
||||
} else if (parityStatus == (int) ParityOK) {
|
||||
} else if (parityStatus == (int) ChirpChatDemodSettings::ParityOK) {
|
||||
return "ok";
|
||||
} else {
|
||||
return "n/a";
|
||||
|
|
|
@ -89,14 +89,6 @@ private slots:
|
|||
void tick();
|
||||
|
||||
private:
|
||||
enum ParityStatus // matches decoder status
|
||||
{
|
||||
ParityUndefined,
|
||||
ParityError,
|
||||
ParityCorrected,
|
||||
ParityOK
|
||||
};
|
||||
|
||||
Ui::ChirpChatDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
|
@ -120,12 +112,14 @@ private:
|
|||
void displaySettings();
|
||||
void displaySquelch();
|
||||
void setBandwidths();
|
||||
void showLoRaMessage(const Message& message);
|
||||
void showLoRaMessage(const Message& message); //!< For LoRa coding scheme
|
||||
void showTextMessage(const Message& message); //!< For TTY and ASCII
|
||||
void showFTMessage(const Message& message); //!< For FT coding scheme
|
||||
void displayText(const QString& text);
|
||||
void displayBytes(const QByteArray& bytes);
|
||||
void displayStatus(const QString& status);
|
||||
void displayLoRaStatus(int headerParityStatus, bool headerCRCStatus, int payloadParityStatus, bool payloadCRCStatus);
|
||||
void displayFTStatus(int payloadParityStatus, bool payloadCRCStatus);
|
||||
QString getParityStr(int parityStatus);
|
||||
void resetLoRaStatus();
|
||||
bool handleMessage(const Message& message);
|
||||
|
|
|
@ -723,7 +723,7 @@
|
|||
<item>
|
||||
<widget class="QCheckBox" name="messageLengthAuto">
|
||||
<property name="toolTip">
|
||||
<string>Set message length in symbols automatically to provided message length (LoRa only)</string>
|
||||
<string>Set message length in symbols automatically to provided message length (LoRa and FT only)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto</string>
|
||||
|
@ -953,16 +953,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="headerCRCStatus">
|
||||
<property name="toolTip">
|
||||
<string>Header CRC status</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> HC </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="headerHammingStatus">
|
||||
<property name="toolTip">
|
||||
|
@ -973,6 +963,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="headerCRCStatus">
|
||||
<property name="toolTip">
|
||||
<string>Header CRC status</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> HC </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="payloadFECStatus">
|
||||
<property name="toolTip">
|
||||
|
|
|
@ -20,3 +20,6 @@
|
|||
#include "chirpchatdemodmsg.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemodMsg::MsgDecodeSymbols, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemodMsg::MsgReportDecodeBytes, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemodMsg::MsgReportDecodeString, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ChirpChatDemodMsg::MsgReportDecodeFT, Message)
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include <QObject>
|
||||
#include "util/message.h"
|
||||
|
||||
#include "chirpchatdemodsettings.h"
|
||||
|
||||
namespace ChirpChatDemodMsg
|
||||
{
|
||||
class MsgDecodeSymbols : public Message {
|
||||
|
@ -80,6 +82,235 @@ namespace ChirpChatDemodMsg
|
|||
m_noiseDb(0.0)
|
||||
{ m_symbols = symbols; }
|
||||
};
|
||||
|
||||
class MsgReportDecodeBytes : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const QByteArray& getBytes() const { return m_bytes; }
|
||||
unsigned int getSyncWord() const { return m_syncWord; }
|
||||
float getSingalDb() const { return m_signalDb; }
|
||||
float getNoiseDb() const { return m_noiseDb; }
|
||||
const QString& getMsgTimestamp() const { return m_msgTimestamp; }
|
||||
unsigned int getPacketSize() const { return m_packetSize; }
|
||||
unsigned int getNbParityBits() const { return m_nbParityBits; }
|
||||
unsigned int getNbSymbols() const { return m_nbSymbols; }
|
||||
unsigned int getNbCodewords() const { return m_nbCodewords; }
|
||||
bool getHasCRC() const { return m_hasCRC; }
|
||||
bool getEarlyEOM() const { return m_earlyEOM; }
|
||||
int getHeaderParityStatus() const { return m_headerParityStatus; }
|
||||
bool getHeaderCRCStatus() const { return m_headerCRCStatus; }
|
||||
int getPayloadParityStatus() const { return m_payloadParityStatus; }
|
||||
bool getPayloadCRCStatus() const { return m_payloadCRCStatus; }
|
||||
|
||||
static MsgReportDecodeBytes* create(const QByteArray& bytes) {
|
||||
return new MsgReportDecodeBytes(bytes);
|
||||
}
|
||||
void setSyncWord(unsigned int syncWord) {
|
||||
m_syncWord = syncWord;
|
||||
}
|
||||
void setSignalDb(float db) {
|
||||
m_signalDb = db;
|
||||
}
|
||||
void setNoiseDb(float db) {
|
||||
m_noiseDb = db;
|
||||
}
|
||||
void setMsgTimestamp(const QString& ts) {
|
||||
m_msgTimestamp = ts;
|
||||
}
|
||||
void setPacketSize(unsigned int packetSize) {
|
||||
m_packetSize = packetSize;
|
||||
}
|
||||
void setNbParityBits(unsigned int nbParityBits) {
|
||||
m_nbParityBits = nbParityBits;
|
||||
}
|
||||
void setNbSymbols(unsigned int nbSymbols) {
|
||||
m_nbSymbols = nbSymbols;
|
||||
}
|
||||
void setNbCodewords(unsigned int nbCodewords) {
|
||||
m_nbCodewords = nbCodewords;
|
||||
}
|
||||
void setHasCRC(bool hasCRC) {
|
||||
m_hasCRC = hasCRC;
|
||||
}
|
||||
void setEarlyEOM(bool earlyEOM) {
|
||||
m_earlyEOM = earlyEOM;
|
||||
}
|
||||
void setHeaderParityStatus(int headerParityStatus) {
|
||||
m_headerParityStatus = headerParityStatus;
|
||||
}
|
||||
void setHeaderCRCStatus(bool headerCRCStatus) {
|
||||
m_headerCRCStatus = headerCRCStatus;
|
||||
}
|
||||
void setPayloadParityStatus(int payloadParityStatus) {
|
||||
m_payloadParityStatus = payloadParityStatus;
|
||||
}
|
||||
void setPayloadCRCStatus(bool payloadCRCStatus) {
|
||||
m_payloadCRCStatus = payloadCRCStatus;
|
||||
}
|
||||
|
||||
private:
|
||||
QByteArray m_bytes;
|
||||
unsigned int m_syncWord;
|
||||
float m_signalDb;
|
||||
float m_noiseDb;
|
||||
QString m_msgTimestamp;
|
||||
unsigned int m_packetSize;
|
||||
unsigned int m_nbParityBits;
|
||||
unsigned int m_nbSymbols;
|
||||
unsigned int m_nbCodewords;
|
||||
bool m_hasCRC;
|
||||
bool m_earlyEOM;
|
||||
int m_headerParityStatus;
|
||||
bool m_headerCRCStatus;
|
||||
int m_payloadParityStatus;
|
||||
bool m_payloadCRCStatus;
|
||||
|
||||
MsgReportDecodeBytes(const QByteArray& bytes) :
|
||||
Message(),
|
||||
m_bytes(bytes),
|
||||
m_syncWord(0),
|
||||
m_signalDb(0.0),
|
||||
m_noiseDb(0.0),
|
||||
m_packetSize(0),
|
||||
m_nbParityBits(0),
|
||||
m_nbSymbols(0),
|
||||
m_nbCodewords(0),
|
||||
m_hasCRC(false),
|
||||
m_earlyEOM(false),
|
||||
m_headerParityStatus(false),
|
||||
m_headerCRCStatus(false),
|
||||
m_payloadParityStatus((int) ChirpChatDemodSettings::ParityUndefined),
|
||||
m_payloadCRCStatus(false)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportDecodeString : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const QString& getString() const { return m_str; }
|
||||
unsigned int getSyncWord() const { return m_syncWord; }
|
||||
float getSingalDb() const { return m_signalDb; }
|
||||
float getNoiseDb() const { return m_noiseDb; }
|
||||
const QString& getMsgTimestamp() const { return m_msgTimestamp; }
|
||||
|
||||
static MsgReportDecodeString* create(const QString& str)
|
||||
{
|
||||
return new MsgReportDecodeString(str);
|
||||
}
|
||||
void setSyncWord(unsigned int syncWord) {
|
||||
m_syncWord = syncWord;
|
||||
}
|
||||
void setSignalDb(float db) {
|
||||
m_signalDb = db;
|
||||
}
|
||||
void setNoiseDb(float db) {
|
||||
m_noiseDb = db;
|
||||
}
|
||||
void setMsgTimestamp(const QString& ts) {
|
||||
m_msgTimestamp = ts;
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_str;
|
||||
unsigned int m_syncWord;
|
||||
float m_signalDb;
|
||||
float m_noiseDb;
|
||||
QString m_msgTimestamp;
|
||||
|
||||
MsgReportDecodeString(const QString& str) :
|
||||
Message(),
|
||||
m_str(str),
|
||||
m_syncWord(0),
|
||||
m_signalDb(0.0),
|
||||
m_noiseDb(0.0)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportDecodeFT : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const QString& getMessage() const { return m_message; }
|
||||
const QString& getCall1() const { return m_call1; }
|
||||
const QString& getCall2() const { return m_call2; }
|
||||
const QString& getLoc() const { return m_loc; }
|
||||
bool isReply() const { return m_reply; }
|
||||
bool isFreeText() const { return m_freeText; }
|
||||
unsigned int getSyncWord() const { return m_syncWord; }
|
||||
float getSingalDb() const { return m_signalDb; }
|
||||
float getNoiseDb() const { return m_noiseDb; }
|
||||
const QString& getMsgTimestamp() const { return m_msgTimestamp; }
|
||||
int getPayloadParityStatus() const { return m_payloadParityStatus; }
|
||||
bool getPayloadCRCStatus() const { return m_payloadCRCStatus; }
|
||||
|
||||
static MsgReportDecodeFT* create()
|
||||
{
|
||||
return new MsgReportDecodeFT();
|
||||
}
|
||||
void setMessage(const QString& message) {
|
||||
m_message = message;
|
||||
}
|
||||
void setCall1(const QString& call1) {
|
||||
m_call1 = call1;
|
||||
}
|
||||
void setCall2(const QString& call2) {
|
||||
m_call2 = call2;
|
||||
}
|
||||
void setLoc(const QString& loc) {
|
||||
m_loc = loc;
|
||||
}
|
||||
void setReply(bool reply) {
|
||||
m_reply = reply;
|
||||
}
|
||||
void setFreeText(bool freeText) {
|
||||
m_freeText = freeText;
|
||||
}
|
||||
void setSyncWord(unsigned int syncWord) {
|
||||
m_syncWord = syncWord;
|
||||
}
|
||||
void setSignalDb(float db) {
|
||||
m_signalDb = db;
|
||||
}
|
||||
void setNoiseDb(float db) {
|
||||
m_noiseDb = db;
|
||||
}
|
||||
void setMsgTimestamp(const QString& ts) {
|
||||
m_msgTimestamp = ts;
|
||||
}
|
||||
void setPayloadParityStatus(int payloadParityStatus) {
|
||||
m_payloadParityStatus = payloadParityStatus;
|
||||
}
|
||||
void setPayloadCRCStatus(bool payloadCRCStatus) {
|
||||
m_payloadCRCStatus = payloadCRCStatus;
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_message;
|
||||
QString m_call1;
|
||||
QString m_call2;
|
||||
QString m_loc;
|
||||
bool m_reply;
|
||||
bool m_freeText;
|
||||
unsigned int m_syncWord;
|
||||
float m_signalDb;
|
||||
float m_noiseDb;
|
||||
QString m_msgTimestamp;
|
||||
int m_payloadParityStatus;
|
||||
bool m_payloadCRCStatus;
|
||||
|
||||
MsgReportDecodeFT() :
|
||||
Message(),
|
||||
m_reply(false),
|
||||
m_freeText(false),
|
||||
m_syncWord(0),
|
||||
m_signalDb(0.0),
|
||||
m_noiseDb(0.0),
|
||||
m_payloadParityStatus((int) ChirpChatDemodSettings::ParityUndefined),
|
||||
m_payloadCRCStatus(false)
|
||||
{ }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // INCLUDE_CHIRPCHATDEMODMSG_H
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
|
@ -26,6 +25,7 @@
|
|||
|
||||
const int ChirpChatDemodSettings::bandwidths[] = {
|
||||
325, // 384k / 1024
|
||||
488, // 500k / 1024
|
||||
750, // 384k / 512
|
||||
1500, // 384k / 256
|
||||
2604, // 333k / 128
|
||||
|
@ -53,7 +53,7 @@ const int ChirpChatDemodSettings::bandwidths[] = {
|
|||
400000, // 400k / 1
|
||||
500000 // 500k / 1
|
||||
};
|
||||
const int ChirpChatDemodSettings::nbBandwidths = 3*8 + 3;
|
||||
const int ChirpChatDemodSettings::nbBandwidths = 3*8 + 4;
|
||||
const int ChirpChatDemodSettings::oversampling = 2;
|
||||
|
||||
ChirpChatDemodSettings::ChirpChatDemodSettings() :
|
||||
|
|
|
@ -41,6 +41,14 @@ struct ChirpChatDemodSettings
|
|||
CodingFT //!< FT8/4 scheme (payload 174 bits LDPC)
|
||||
};
|
||||
|
||||
enum ParityStatus
|
||||
{
|
||||
ParityUndefined,
|
||||
ParityError,
|
||||
ParityCorrected,
|
||||
ParityOK
|
||||
};
|
||||
|
||||
int m_inputFrequencyOffset;
|
||||
int m_bandwidthIndex;
|
||||
int m_spreadFactor;
|
||||
|
|
|
@ -286,8 +286,10 @@ void ChirpChatDemodSink::processSample(const Complex& ci)
|
|||
|
||||
m_preambleHistory[m_chirpCount] = imax;
|
||||
m_chirpCount++;
|
||||
double preDrop = magsqPre - magsqSFD;
|
||||
double dropRatio = -preDrop / magsqSFD;
|
||||
|
||||
if (magsqPre < magsqSFD) // preamble drop
|
||||
if ((preDrop < 0.0) && (dropRatio > 0.5)) // preamble drop
|
||||
{
|
||||
m_magsqTotalAvg(magsqSFDTotal);
|
||||
|
||||
|
@ -455,19 +457,12 @@ void ChirpChatDemodSink::processSample(const Complex& ci)
|
|||
|| ((m_settings.m_eomSquelchTenths*magsq)/10.0 > m_magsqMax))
|
||||
{
|
||||
qDebug("ChirpChatDemodSink::processSample: symbol %02u: %4u|%11.6f", m_chirpCount, symbol, magsq);
|
||||
// const std::vector<float>& magnitudes = m_decodeMsg->getMagnitudes().back();
|
||||
// int i = 0;
|
||||
// for (auto magnitude : magnitudes)
|
||||
// {
|
||||
// qDebug("ChirpChatDemodSink::processSample: mag[%02d] = %11.6f", i, magnitude);
|
||||
// i++;
|
||||
// }
|
||||
m_magsqOnAvg(magsq);
|
||||
m_chirpCount++;
|
||||
|
||||
if (m_chirpCount > m_settings.m_nbSymbolsMax)
|
||||
{
|
||||
qDebug("ChirpChatDemodSink::processSample: message length exceeded");
|
||||
qDebug("ChirpChatDemodSink::processSample: message length reached");
|
||||
m_state = ChirpChatStateReset;
|
||||
m_decodeMsg->setSignalDb(CalcDb::dbPower(m_magsqOnAvg.asDouble() / (1<<m_settings.m_spreadFactor)));
|
||||
m_decodeMsg->setNoiseDb(CalcDb::dbPower(m_magsqOffAvg.asDouble() / (1<<m_settings.m_spreadFactor)));
|
||||
|
|
|
@ -11,7 +11,7 @@ LoRa is a property of Semtech and the details of the protocol are not made publi
|
|||
- To get an idea of what is LoRa: [here](https://www.link-labs.com/blog/what-is-lora)
|
||||
- A detailed inspection of LoRa modulation and protocol: [here](https://static1.squarespace.com/static/54cecce7e4b054df1848b5f9/t/57489e6e07eaa0105215dc6c/1464376943218/Reversing-Lora-Knight.pdf)
|
||||
|
||||
⚠ Only spread factors of 11 and 12 are working in LoRa mode thus with the distance enhancement active (DE=2)
|
||||
⚠ Only spread factors of 11 and 12 are working in LoRa mode with the distance enhancement active (DE=2)
|
||||
|
||||
Transmissions from the RN2483 module (SF=11 and SF=12 with DE=2) could be successfully received. It has not been tested with Semtech SX127x hardware. This LoRa decoder is designed for experimentation. For production grade applications it is recommended to use dedicated hardware instead.
|
||||
|
||||
|
@ -69,6 +69,7 @@ Thus available bandwidths are:
|
|||
- **2604** (333333 / 128) Hz not in LoRa standard
|
||||
- **1500** (384000 / 256) Hz not in LoRa standard
|
||||
- **750** (384000 / 512) Hz not in LoRa standard
|
||||
- **488** (500000 / 1024) Hz not in LoRa standard
|
||||
- **375** (384000 / 1024) Hz not in LoRa standard
|
||||
|
||||
The ChirpChat signal is oversampled by two therefore it needs a baseband of at least twice the bandwidth. This drives the maximum value on the slider automatically.
|
||||
|
@ -109,7 +110,9 @@ This is the Spread Factor parameter of the ChirpChat signal. This is the log2 of
|
|||
|
||||
The LoRa standard specifies 0 (no DE) or 2 (DE active). The ChirpChat DE range is extended to all values between 0 and 4 bits.
|
||||
|
||||
This is the log2 of the number of FFT bins used for one symbol. Extending the number of FFT bins per symbol decreases the probability to detect the wrong symbol as an adjacent bin. It can also overcome frequency drift on long messages.
|
||||
The LoRa standard also specifies that the LowDataRateOptimizatio flag (thus DE=2 vs DE=0 here) should be set when the symbol time defined as BW / 2^SF exceeds 16 ms (See section 4.1.1.6 of the SX127x datasheet). In practice this happens for SF=11 and SF=12 and large enough bandwidths (you can do the maths).
|
||||
|
||||
Here this value is the log2 of the number of FFT bins used for one symbol. Extending the number of FFT bins per symbol decreases the probability to detect the wrong symbol as an adjacent bin. It can also overcome frequency or samlping time drift on long messages particularly for small bandwidths.
|
||||
|
||||
In practice it is difficult to make correct decodes if only one FFT bin is used to code one symbol (DE=0) therefore it is recommended to use a DE factor of 2 or more. With medium SNR DE=1 can still achieve good results.
|
||||
|
||||
|
@ -128,6 +131,7 @@ In addition to the LoRa standard plain ASCII and TTY have been added for pure te
|
|||
- **LoRa**: LoRa standard (see LoRa documentation)
|
||||
- **ASCII**: This is plain 7 bit ASCII coded characters. It needs exactly 7 effective bits per symbols (SF - DE = 7)
|
||||
- **TTY**: Baudot (Teletype) 5 bit encoded characters. It needs exactly 5 effective bits per symbols (SF - DE = 5)
|
||||
- **FT**: FT8/4 protocol. The 174 payload bits are packed into chirp symbols with zero padding if necessary
|
||||
|
||||
<h4>A.2: Start/Stop decoder</h4>
|
||||
|
||||
|
@ -145,7 +149,7 @@ This is the expected number of symbols in a message. When a header is present in
|
|||
|
||||
<h4>A.5: Auto message length</h4>
|
||||
|
||||
LoRa mode only. Set message length (A.4) equal to the number of symbols specified in the message just received. When messages are sent repeatedly this helps adjusting in possible message length changes automatically.
|
||||
LoRa and DT modes only. Set message length (A.4) equal to the number of symbols specified (or implied for FT) in the message just received. When messages are sent repeatedly this helps adjusting in possible message length changes automatically.
|
||||
|
||||
<h4>A.6: Sync word</h4>
|
||||
|
||||
|
@ -163,21 +167,21 @@ When a header is expected this control is disabled because the value used is the
|
|||
|
||||
<h4>A.9: Payload CRC presence</h4>
|
||||
|
||||
Use this checkbox to tell if you expect a 2 byte CRC at the end of the payload.
|
||||
LoRa mode: Use this checkbox to tell if you expect a 2 byte CRC at the end of the payload. FT mode: there is always a CRC.
|
||||
|
||||
When a header is expected this control is disabled because the value used is the one found in the header.
|
||||
LoRa: When a header is expected this control is disabled because the value used is the one found in the header.
|
||||
|
||||
<h4>A.10: Packet length</h4>
|
||||
|
||||
This is the expected packet length in bytes without header and CRC.
|
||||
This is the expected packet length in bytes without header and CRC. For FT this is the number of symbols.
|
||||
|
||||
When a header is expected this control is disabled because the value used is the one found in the header.
|
||||
LoRa: When a header is expected this control is disabled because the value used is the one found in the header.
|
||||
|
||||
<h4>A.11: Number of symbols and codewords</h4>
|
||||
|
||||
This is the number of symbols (left of slash) and codewords (right of slash) used for the payload including header and CRC.
|
||||
|
||||
<h4>A.12: Header FEC indicator</h4>
|
||||
<h4>A.12: Header FEC indicator (LoRa)</h4>
|
||||
|
||||
Header uses a H(4,8) FEC. The color of the indicator gives the status of header parity checks:
|
||||
|
||||
|
@ -186,27 +190,27 @@ Header uses a H(4,8) FEC. The color of the indicator gives the status of header
|
|||
- **Blue**: recovered error
|
||||
- **Green**: no errors
|
||||
|
||||
<h4>A.13: Header CRC indicator</h4>
|
||||
<h4>A.13: Header CRC indicator (LoRa)</h4>
|
||||
|
||||
The header has a one byte CRC. The color of this indicator gives the CRC status:
|
||||
|
||||
- **Green**: CRC OK
|
||||
- **Red**: CRC error
|
||||
|
||||
<h4>A.14: Payload FEC indicator</h4>
|
||||
<h4>A.14: Payload FEC indicator (LoRa and FT)</h4>
|
||||
|
||||
The color of the indicator gives the status of payload parity checks:
|
||||
|
||||
- **Grey**: undefined
|
||||
- **Red**: unrecoverable error. H(4,7) cannot distinguish between recoverable and unrecoverable error. Therefore this is never displayed for H(4,7)
|
||||
- **Blue**: recovered error
|
||||
- **Red**: unrecoverable error. H(4,7) cannot distinguish between recoverable and unrecoverable error. Therefore this is never displayed for H(4,7). For FT it means that LDPC decoding failed.
|
||||
- **Blue**: recovered error (LoRa only)
|
||||
- **Green**: no errors
|
||||
|
||||
<h4>A.15: Payload CRC indicator</h4>
|
||||
<h4>A.15: Payload CRC indicator (LoRa and FT)</h4>
|
||||
|
||||
The payload can have a two byte CRC. The color of this indicator gives the CRC status:
|
||||
|
||||
- **Grey**: No CRC
|
||||
- **Grey**: No CRC (LoRa)
|
||||
- **Green**: CRC OK
|
||||
- **Red**: CRC error
|
||||
|
||||
|
@ -216,7 +220,7 @@ Use this push button to clear the message window (12)
|
|||
|
||||
<h3>12: Message window</h3>
|
||||
|
||||
This is where the message and status data are displayed. The display varies if the coding scheme is purely text based (TTY, ASCII) or text/binary mixed based (LoRa). The text vs binary consideration concerns the content of the message not the way it is transmitted on air that is by itself binary.
|
||||
This is where the message and status data are displayed. The display varies if the coding scheme is purely text based (TTY, ASCII, FT) or text/binary mixed based (LoRa). The text vs binary consideration concerns the content of the message not the way it is transmitted on air that is by itself binary.
|
||||
|
||||
<h4>12.a: Text messages</h4>
|
||||
|
||||
|
|
|
@ -34,15 +34,10 @@
|
|||
#include "SWGChannelSettings.h"
|
||||
#include "SWGWorkspaceInfo.h"
|
||||
#include "SWGDABDemodSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
#include "SWGMapItem.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(DABDemod::MsgConfigureDABDemod, Message)
|
||||
|
|
|
@ -30,11 +30,9 @@
|
|||
#include "dsp/dspcommands.h"
|
||||
#include "ui_dabdemodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "dabdemodsettings.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
|
||||
#include <complex.h>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "dabdemod.h"
|
||||
|
|
|
@ -28,15 +28,13 @@
|
|||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/dialpopup.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "mainwindow.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "ui_datvdemodgui.h"
|
||||
#include "datvdemodreport.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "leansdr/dvb.h"
|
||||
#include "leansdr/sdr.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@
|
|||
#include <QFileInfo>
|
||||
#include <QMutexLocker>
|
||||
|
||||
#include "audio/audiooutputdevice.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "device/deviceapi.h"
|
||||
|
||||
#include "datvdemodreport.h"
|
||||
|
||||
const unsigned int DATVDemodSink::m_rfFilterFftLength = 512;
|
||||
|
|
|
@ -114,7 +114,7 @@ Use this dial to flip through standard DATV symbol rates: 25, 33, 66, 125, 250,
|
|||
|
||||
<h5>B.2a.4: FEC rate</h5>
|
||||
|
||||
Dpends on the standard and modulation
|
||||
Depends on the standard and modulation
|
||||
|
||||
- DVB-S with all modulations: 1/2 , 2/3 , 3/4, 5/6 and 7/8.
|
||||
- DVB-S2 and QPSK: 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 8/9, 9/10
|
||||
|
|
|
@ -33,12 +33,9 @@
|
|||
#include "SWGWorkspaceInfo.h"
|
||||
#include "SWGDSCDemodSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
#include "SWGMapItem.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <QAction>
|
||||
#include <QClipboard>
|
||||
#include <QFileDialog>
|
||||
#include <QRegExp>
|
||||
#include <QScrollBar>
|
||||
#include <QMenu>
|
||||
#include <QDesktopServices>
|
||||
|
@ -36,13 +37,10 @@
|
|||
#include "dsp/dspdevicesourceengine.h"
|
||||
#include "ui_dscdemodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/csv.h"
|
||||
#include "util/db.h"
|
||||
#include "util/mmsi.h"
|
||||
#include "util/units.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/decimaldelegate.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/glscopesettings.h"
|
||||
|
@ -55,7 +53,6 @@
|
|||
#include "maincore.h"
|
||||
|
||||
#include "dscdemod.h"
|
||||
#include "dscdemodsink.h"
|
||||
|
||||
#include "SWGMapItem.h"
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "dscdemodsettings.h"
|
||||
|
|
|
@ -19,13 +19,10 @@
|
|||
|
||||
#include <complex.h>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "util/db.h"
|
||||
#include "util/popcount.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "dscdemod.h"
|
||||
#include "dscdemodsink.h"
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#include "dsddecoder.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include "audio/audiofifo.h"
|
||||
|
||||
|
||||
DSDDecoder::DSDDecoder()
|
||||
{
|
||||
|
|
|
@ -39,9 +39,7 @@
|
|||
#include "SWGDSDDemodSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
#include "SWGDSDDemodReport.h"
|
||||
#include "SWGRDSReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
|
|
|
@ -27,10 +27,8 @@
|
|||
#include "dsp/scopevisxy.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "dsddemodsettings.h"
|
||||
|
|
|
@ -25,19 +25,10 @@
|
|||
#include <QNetworkReply>
|
||||
#include <QBuffer>
|
||||
|
||||
#include "SWGChannelSettings.h"
|
||||
#include "SWGDSDDemodSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
#include "SWGDSDDemodReport.h"
|
||||
#include "SWGRDSReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "feature/feature.h"
|
||||
#include "audio/audiooutputdevice.h"
|
||||
#include "util/db.h"
|
||||
#include "util/messagequeue.h"
|
||||
#include "maincore.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "SWGEndOfTrainDemodSettings.h"
|
||||
#include "SWGChannelReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "settings/serializable.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
|
|
|
@ -32,21 +32,15 @@
|
|||
#include "dsp/dspcommands.h"
|
||||
#include "ui_endoftraindemodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/csv.h"
|
||||
#include "util/db.h"
|
||||
#include "util/units.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/glscopesettings.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/dialogpositioner.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
#include "maincore.h"
|
||||
|
||||
#include "endoftraindemod.h"
|
||||
#include "endoftraindemodsink.h"
|
||||
|
||||
void EndOfTrainDemodGUI::resizeTable()
|
||||
{
|
||||
|
|
|
@ -736,7 +736,7 @@
|
|||
<string>Light Batt</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Market light battery condtion</string>
|
||||
<string>Market light battery condition</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
|
|
|
@ -18,10 +18,8 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "util/db.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
#include "maincore.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
This plugin can be used to demodulate End-of-Train packets. These are packets transmitted by an [End-of-Train Device](https://en.wikipedia.org/wiki/End-of-train_device),
|
||||
that can be found on some trains.
|
||||
It transmits information about whether motion is detected, brake pressue, whether the marker light is on and battery information.
|
||||
It transmits information about whether motion is detected, brake pressure, whether the marker light is on and battery information.
|
||||
|
||||
* Frequency: 457.9375 MHz (North America, India), 477.7 MHz (Australia) and 450.2625 MHz (New Zealand).
|
||||
* Modulation: FSK, 1800Hz space, 1200 mark, +-3kHz deviation.
|
||||
|
@ -93,7 +93,7 @@ The received packets table displays the contents of the packets that have been r
|
|||
* Disc - Discretionary bit that is used for varying data by different vendors.
|
||||
* Valve - Valve circuit status (Ok or Fail).
|
||||
* Conf - Confirmation indicator.
|
||||
* Turbine - Air tubine equiped.
|
||||
* Turbine - Air turbine equipped.
|
||||
* Motion - Whether motion is detected (i.e. is the rear of the train is moving).
|
||||
* Light Batt - Marker light battery condition (Ok or Low).
|
||||
* Light - Marker light status (On or off).
|
||||
|
|
|
@ -31,11 +31,9 @@
|
|||
#include "SWGChannelReport.h"
|
||||
#include "SWGFreeDVDemodReport.h"
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplemimo.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "util/db.h"
|
||||
#include "maincore.h"
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue