kopia lustrzana https://github.com/AlexandreRouma/SDRPlusPlus
Porównaj commity
8 Commity
7ab743d05b
...
c0a84f8703
Autor | SHA1 | Data |
---|---|---|
AlexandreRouma | c0a84f8703 | |
AlexandreRouma | f66f2c25e1 | |
AlexandreRouma | bddfe5396f | |
AlexandreRouma | d5fa76df06 | |
AlexandreRouma | 8029cef4da | |
AlexandreRouma | d84bb9bdec | |
AlexandreRouma | a0ff745b63 | |
AlexandreRouma | a08d2a0f85 |
|
@ -43,14 +43,14 @@ option(OPT_BUILD_FALCON9_DECODER "Build the falcon9 live decoder (Dependencies:
|
|||
option(OPT_BUILD_KG_SSTV_DECODER "Build the KG SSTV (KG-STV) decoder module (no dependencies required)" OFF)
|
||||
option(OPT_BUILD_M17_DECODER "Build the M17 decoder module (Dependencies: codec2)" OFF)
|
||||
option(OPT_BUILD_METEOR_DEMODULATOR "Build the meteor demodulator module (no dependencies required)" ON)
|
||||
option(OPT_BUILD_PAGER_DECODER "Build the pager decoder module (no dependencies required)" OFF)
|
||||
option(OPT_BUILD_PAGER_DECODER "Build the pager decoder module (no dependencies required)" ON)
|
||||
option(OPT_BUILD_RADIO "Main audio modulation decoder (AM, FM, SSB, etc...)" ON)
|
||||
option(OPT_BUILD_WEATHER_SAT_DECODER "Build the HRPT decoder module (no dependencies required)" OFF)
|
||||
|
||||
# Misc
|
||||
option(OPT_BUILD_DISCORD_PRESENCE "Build the Discord Rich Presence module" ON)
|
||||
option(OPT_BUILD_FREQUENCY_MANAGER "Build the Frequency Manager module" ON)
|
||||
option(OPT_BUILD_IQ_EXPORTER "Build the IQ Exporter module" OFF)
|
||||
option(OPT_BUILD_IQ_EXPORTER "Build the IQ Exporter module" ON)
|
||||
option(OPT_BUILD_RECORDER "Audio and baseband recorder" ON)
|
||||
option(OPT_BUILD_RIGCTL_CLIENT "Rigctl client to make SDR++ act as a panadapter" ON)
|
||||
option(OPT_BUILD_RIGCTL_SERVER "Rigctl backend for controlling SDR++ with software like gpredict" ON)
|
||||
|
|
|
@ -8,16 +8,12 @@
|
|||
#include "dsp.h"
|
||||
#include "pocsag.h"
|
||||
|
||||
const char* msgTypes[] = {
|
||||
"Numeric",
|
||||
"Unknown (0b01)",
|
||||
"Unknown (0b10)",
|
||||
"Alphanumeric",
|
||||
};
|
||||
#define BAUDRATE 2400
|
||||
#define SAMPLERATE (BAUDRATE*10)
|
||||
|
||||
class POCSAGDecoder : public Decoder {
|
||||
public:
|
||||
POCSAGDecoder(const std::string& name, VFOManager::VFO* vfo) : diag(0.6, 2400) {
|
||||
POCSAGDecoder(const std::string& name, VFOManager::VFO* vfo) : diag(0.6, BAUDRATE) {
|
||||
this->name = name;
|
||||
this->vfo = vfo;
|
||||
|
||||
|
@ -28,9 +24,9 @@ public:
|
|||
|
||||
// Init DSP
|
||||
vfo->setBandwidthLimits(12500, 12500, true);
|
||||
vfo->setSampleRate(24000, 12500);
|
||||
dsp.init(vfo->output, 24000, 2400);
|
||||
reshape.init(&dsp.soft, 2400.0, (2400 / 30.0) - 2400.0);
|
||||
vfo->setSampleRate(SAMPLERATE, 12500);
|
||||
dsp.init(vfo->output, SAMPLERATE, BAUDRATE);
|
||||
reshape.init(&dsp.soft, BAUDRATE, (BAUDRATE / 30.0) - BAUDRATE);
|
||||
dataHandler.init(&dsp.out, _dataHandler, this);
|
||||
diagHandler.init(&reshape.out, _diagHandler, this);
|
||||
|
||||
|
@ -49,6 +45,10 @@ public:
|
|||
// TODO
|
||||
}
|
||||
|
||||
if (ImGui::Button("Detune")) {
|
||||
dsp.detune();
|
||||
}
|
||||
|
||||
ImGui::FillWidth();
|
||||
diag.draw();
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ public:
|
|||
}
|
||||
|
||||
void start() {
|
||||
flog::debug("POCSAG start");
|
||||
dsp.start();
|
||||
reshape.start();
|
||||
dataHandler.start();
|
||||
|
@ -69,7 +68,6 @@ public:
|
|||
}
|
||||
|
||||
void stop() {
|
||||
flog::debug("POCSAG stop");
|
||||
dsp.stop();
|
||||
reshape.stop();
|
||||
dataHandler.stop();
|
||||
|
|
|
@ -23,14 +23,14 @@ public:
|
|||
|
||||
// Configure blocks
|
||||
demod.init(NULL, -4500.0, samplerate);
|
||||
dcBlock.init(NULL, 0.001);
|
||||
//dcBlock.init(NULL, 0.001); // NOTE: DC blocking causes issues because no scrambling, think more about it
|
||||
float taps[] = { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f };
|
||||
shape = dsp::taps::fromArray<float>(10, taps);
|
||||
fir.init(NULL, shape);
|
||||
recov.init(NULL, samplerate/baudrate, 1e5, 0.1, 0.05);
|
||||
recov.init(NULL, samplerate/baudrate, 1e-4, 1.0, 0.05);
|
||||
|
||||
// Free useless buffers
|
||||
dcBlock.out.free();
|
||||
// dcBlock.out.free();
|
||||
fir.out.free();
|
||||
recov.out.free();
|
||||
|
||||
|
@ -40,13 +40,17 @@ public:
|
|||
|
||||
int process(int count, dsp::complex_t* in, float* softOut, uint8_t* out) {
|
||||
count = demod.process(count, in, demod.out.readBuf);
|
||||
count = dcBlock.process(count, demod.out.readBuf, demod.out.readBuf);
|
||||
//count = dcBlock.process(count, demod.out.readBuf, demod.out.readBuf);
|
||||
count = fir.process(count, demod.out.readBuf, demod.out.readBuf);
|
||||
count = recov.process(count, demod.out.readBuf, softOut);
|
||||
dsp::digital::BinarySlicer::process(count, softOut, out);
|
||||
return count;
|
||||
}
|
||||
|
||||
void detune() {
|
||||
recov.setOmega(9.99);
|
||||
}
|
||||
|
||||
int run() {
|
||||
int count = base_type::_in->read();
|
||||
if (count < 0) { return -1; }
|
||||
|
@ -63,7 +67,7 @@ public:
|
|||
|
||||
private:
|
||||
dsp::demod::Quadrature demod;
|
||||
dsp::correction::DCBlocker<float> dcBlock;
|
||||
//dsp::correction::DCBlocker<float> dcBlock;
|
||||
dsp::tap<float> shape;
|
||||
dsp::filter::FIR<float, float> fir;
|
||||
dsp::clock_recovery::MM<float> recov;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define POCSAG_FRAME_SYNC_CODEWORD ((uint32_t)(0b01111100110100100001010111011000))
|
||||
#define POCSAG_IDLE_CODEWORD_DATA ((uint32_t)(0b011110101100100111000))
|
||||
#define POCSAG_BATCH_BIT_COUNT (POCSAG_BATCH_CODEWORD_COUNT*32)
|
||||
#define POCSAG_DATA_BITS_PER_CW 20
|
||||
|
||||
#define POCSAG_GEN_POLY ((uint32_t)(0b11101101001))
|
||||
|
||||
|
@ -28,6 +29,11 @@ namespace pocsag {
|
|||
'['
|
||||
};
|
||||
|
||||
Decoder::Decoder() {
|
||||
// Zero out batch
|
||||
memset(batch, 0, sizeof(batch));
|
||||
}
|
||||
|
||||
void Decoder::process(uint8_t* symbols, int count) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
// Get symbol
|
||||
|
@ -78,8 +84,26 @@ namespace pocsag {
|
|||
|
||||
void Decoder::flushMessage() {
|
||||
if (!msg.empty()) {
|
||||
// Send out message
|
||||
onMessage(addr, msgType, msg);
|
||||
|
||||
// Reset state
|
||||
msg.clear();
|
||||
currChar = 0;
|
||||
currOffset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void printbin(uint32_t cw) {
|
||||
for (int i = 31; i >= 0; i--) {
|
||||
printf("%c", ((cw >> i) & 1) ? '1':'0');
|
||||
}
|
||||
}
|
||||
|
||||
void bitswapChar(char in, char& out) {
|
||||
out = 0;
|
||||
for (int i = 0; i < 7; i++) {
|
||||
out |= ((in >> (6-i)) & 1) << i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,14 +126,14 @@ namespace pocsag {
|
|||
if (type == CODEWORD_TYPE_IDLE) {
|
||||
// If a non-empty message is available, send it out and clear
|
||||
flushMessage();
|
||||
flog::debug("[{}:{}]: IDLE", (i >> 1), i&1);
|
||||
}
|
||||
else if (type == CODEWORD_TYPE_ADDRESS) {
|
||||
// If a non-empty message is available, send it out and clear
|
||||
flushMessage();
|
||||
|
||||
// Decode message type
|
||||
msgType = (MessageType)((cw >> 11) & 0b11);
|
||||
msgType = MESSAGE_TYPE_ALPHANUMERIC;
|
||||
// msgType = (MessageType)((cw >> 11) & 0b11);
|
||||
|
||||
// Decode address and append lower 8 bits from position
|
||||
addr = ((cw >> 13) & 0b111111111111111111) << 3;
|
||||
|
@ -129,11 +153,20 @@ namespace pocsag {
|
|||
msg += NUMERIC_CHARSET[data & 0b1111];
|
||||
}
|
||||
else if (msgType == MESSAGE_TYPE_ALPHANUMERIC) {
|
||||
|
||||
}
|
||||
// Unpack ascii bits 7 at a time (TODO: could be more efficient)
|
||||
for (int i = 19; i >= 0; i--) {
|
||||
// Append bit to char
|
||||
currChar |= ((data >> i) & 1) << (currOffset++);
|
||||
|
||||
// Save last data
|
||||
lastMsgData = data;
|
||||
// When the char is full, append to message
|
||||
if (currOffset >= 7) {
|
||||
// TODO: maybe replace with std::isprint
|
||||
if (currChar) { msg += currChar; }
|
||||
currChar = 0;
|
||||
currOffset = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ namespace pocsag {
|
|||
|
||||
class Decoder {
|
||||
public:
|
||||
Decoder();
|
||||
|
||||
void process(uint8_t* symbols, int count);
|
||||
|
||||
NewEvent<Address, MessageType, const std::string&> onMessage;
|
||||
|
@ -43,6 +45,7 @@ namespace pocsag {
|
|||
MessageType msgType;
|
||||
std::string msg;
|
||||
|
||||
uint32_t lastMsgData;
|
||||
char currChar = 0;
|
||||
int currOffset = 0;
|
||||
};
|
||||
}
|
|
@ -79,6 +79,8 @@ cp $build_dir/misc_modules/discord_integration/Release/discord_integration.dll s
|
|||
|
||||
cp $build_dir/misc_modules/frequency_manager/Release/frequency_manager.dll sdrpp_windows_x64/modules/
|
||||
|
||||
cp $build_dir/misc_modules/iq_exporter/Release/iq_exporter.dll sdrpp_windows_x64/modules/
|
||||
|
||||
cp $build_dir/misc_modules/recorder/Release/recorder.dll sdrpp_windows_x64/modules/
|
||||
|
||||
cp $build_dir/misc_modules/rigctl_client/Release/rigctl_client.dll sdrpp_windows_x64/modules/
|
||||
|
|
|
@ -570,7 +570,7 @@ private:
|
|||
MOD_EXPORT void _INIT_() {
|
||||
json def = json({});
|
||||
std::string root = (std::string)core::args["root"];
|
||||
config.setPath(root + "/iq_exporter_config_config.json");
|
||||
config.setPath(root + "/iq_exporter_config.json");
|
||||
config.load(def);
|
||||
config.enableAutoSave();
|
||||
}
|
||||
|
|
|
@ -362,7 +362,6 @@ Modules in beta are still included in releases for the most part but not enabled
|
|||
| Name | Stage | Dependencies | Option | Built by default| Built in Release | Enabled in SDR++ by default |
|
||||
|---------------------|------------|--------------|-------------------------------|:---------------:|:----------------:|:---------------------------:|
|
||||
| atv_decoder | Unfinished | - | OPT_BUILD_ATV_DECODER | ⛔ | ⛔ | ⛔ |
|
||||
| dmr_decoder | Unfinished | - | OPT_BUILD_DMR_DECODER | ⛔ | ⛔ | ⛔ |
|
||||
| falcon9_decoder | Unfinished | ffplay | OPT_BUILD_FALCON9_DECODER | ⛔ | ⛔ | ⛔ |
|
||||
| kgsstv_decoder | Unfinished | - | OPT_BUILD_KGSSTV_DECODER | ⛔ | ⛔ | ⛔ |
|
||||
| m17_decoder | Beta | - | OPT_BUILD_M17_DECODER | ⛔ | ✅ | ⛔ |
|
||||
|
@ -377,7 +376,7 @@ Modules in beta are still included in releases for the most part but not enabled
|
|||
|---------------------|------------|--------------|-----------------------------|:----------------:|:----------------:|:---------------------------:|
|
||||
| discord_integration | Working | - | OPT_BUILD_DISCORD_PRESENCE | ✅ | ✅ | ⛔ |
|
||||
| frequency_manager | Working | - | OPT_BUILD_FREQUENCY_MANAGER | ✅ | ✅ | ✅ |
|
||||
| iq_exporter | Unfinished | - | OPT_BUILD_IQ_EXPORTER | ⛔ | ⛔ | ⛔ |
|
||||
| iq_exporter | Beta | - | OPT_BUILD_IQ_EXPORTER | ✅ | ✅ | ⛔ |
|
||||
| recorder | Working | - | OPT_BUILD_RECORDER | ✅ | ✅ | ✅ |
|
||||
| rigctl_client | Unfinished | - | OPT_BUILD_RIGCTL_CLIENT | ✅ | ✅ | ⛔ |
|
||||
| rigctl_server | Working | - | OPT_BUILD_RIGCTL_SERVER | ✅ | ✅ | ✅ |
|
||||
|
|
Ładowanie…
Reference in New Issue