Changed M17 modulation parameters

This commit is contained in:
AlexandreRouma 2023-02-19 18:54:33 +01:00
parent 13e81c9f6b
commit ea882cb285
2 changed files with 7 additions and 6 deletions

View File

@ -16,7 +16,7 @@ extern "C" {
#define M17_DEVIATION 2400.0f
#define M17_BAUDRATE 4800.0f
#define M17_RRC_ALPHA 0.5f
#define M17_4FSK_HIGH_CUT 0.5f
#define M17_4FSK_HIGH_CUT ((1.0f + (1.0f/3.0f)) / 2.0f)
#define M17_SYNC_SIZE 16
#define M17_LICH_SIZE 96
@ -123,6 +123,7 @@ namespace dsp {
float val;
for (int i = 0; i < count; i++) {
val = _in->readBuf[i];
printf("%f\n", val);
out.writeBuf[i * 2] = (val < 0.0f);
out.writeBuf[(i * 2) + 1] = (fabsf(val) > M17_4FSK_HIGH_CUT);
}

View File

@ -32,7 +32,7 @@ ConfigManager config;
class M17DecoderModule : public ModuleManager::Instance {
public:
M17DecoderModule(std::string name) : diag(0.8, 480) {
M17DecoderModule(std::string name) : diag(0.6, 480) {
this->name = name;
lsf.valid = false;
@ -43,10 +43,10 @@ public:
}
showLines = config.conf[name]["showLines"];
if (showLines) {
diag.lines.push_back(-0.75f);
diag.lines.push_back(-0.25f);
diag.lines.push_back(0.25f);
diag.lines.push_back(0.75f);
diag.lines.push_back(-1.0);
diag.lines.push_back(-1.0/3.0);
diag.lines.push_back(1.0/3.0);
diag.lines.push_back(1.0);
}
config.release(true);