drop differential modes

This commit is contained in:
Ahmet Inan 2025-07-27 16:55:37 +02:00
commit fde3bed386
4 changed files with 38 additions and 62 deletions

61
README.md vendored
View file

@ -59,18 +59,13 @@ Stream audio out of the encoder:
All modes need a bandwidth of 2400 Hz and there are two frame sizes.
These are the durations for each differential modulation scheme:
| Modulation | Short | Normal |
| ---------- | ----- | ------ |
| DBPSK | 1.5s | 2.6s |
| DQPSK | 1.0s | 2.6s |
| D8PSK | 1.9s | 3.4s |
And these are the durations for each coherent modulation scheme:
These are the durations for each modulation scheme:
| Modulation | Short | Normal |
| ---------- | ----- | ------ |
| BPSK | 1.5s | 2.6s |
| QPSK | 1.0s | 2.6s |
| 8PSK | 1.9s | 3.4s |
| QAM16 | 1.0s | 2.6s |
| QAM64 | 1.9s | 3.4s |
| QAM256 | 1.5s | 2.6s |
@ -81,9 +76,9 @@ These are the numbers for the short modes with a 1/2 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 128B | 0.7kb/s |
| DQPSK | 128B | 1.1kb/s |
| D8PSK | 512B | 2.1kb/s |
| BPSK | 128B | 0.7kb/s |
| QPSK | 128B | 1.1kb/s |
| 8PSK | 512B | 2.1kb/s |
| QAM16 | 256B | 2.1kb/s |
| QAM64 | 1024B | 4.3kb/s |
| QAM256 | 1024B | 5.4kb/s |
@ -94,9 +89,9 @@ These are the numbers for the normal modes with a 1/2 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 256B | 0.8kb/s |
| DQPSK | 512B | 1.6kb/s |
| D8PSK | 1024B | 2.4kb/s |
| BPSK | 256B | 0.8kb/s |
| QPSK | 512B | 1.6kb/s |
| 8PSK | 1024B | 2.4kb/s |
| QAM16 | 1024B | 3.2kb/s |
| QAM64 | 2048B | 4.8kb/s |
| QAM256 | 2048B | 6.3kb/s |
@ -107,9 +102,9 @@ These are the numbers for the short modes with a 2/3 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 171B | 0.9kb/s |
| DQPSK | 171B | 1.4kb/s |
| D8PSK | 684B | 2.9kb/s |
| BPSK | 171B | 0.9kb/s |
| QPSK | 171B | 1.4kb/s |
| 8PSK | 684B | 2.9kb/s |
| QAM16 | 342B | 2.9kb/s |
| QAM64 | 1368B | 5.7kb/s |
| QAM256 | 1368B | 7.3kb/s |
@ -120,9 +115,9 @@ These are the numbers for the normal modes with a 2/3 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 342B | 1.1kb/s |
| DQPSK | 684B | 2.1kb/s |
| D8PSK | 1368B | 3.2kb/s |
| BPSK | 342B | 1.1kb/s |
| QPSK | 684B | 2.1kb/s |
| 8PSK | 1368B | 3.2kb/s |
| QAM16 | 1368B | 4.2kb/s |
| QAM64 | 2736B | 6.4kb/s |
| QAM256 | 2736B | 8.4kb/s |
@ -133,9 +128,9 @@ These are the numbers for the short modes with a 3/4 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 192B | 1.0kb/s |
| DQPSK | 192B | 1.6kb/s |
| D8PSK | 768B | 3.2kb/s |
| BPSK | 192B | 1.0kb/s |
| QPSK | 192B | 1.6kb/s |
| 8PSK | 768B | 3.2kb/s |
| QAM16 | 384B | 3.2kb/s |
| QAM64 | 1536B | 6.4kb/s |
| QAM256 | 1536B | 8.2kb/s |
@ -146,9 +141,9 @@ These are the numbers for the normal modes with a 3/4 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 384B | 1.2kb/s |
| DQPSK | 768B | 2.4kb/s |
| D8PSK | 1536B | 3.6kb/s |
| BPSK | 384B | 1.2kb/s |
| QPSK | 768B | 2.4kb/s |
| 8PSK | 1536B | 3.6kb/s |
| QAM16 | 1536B | 4.7kb/s |
| QAM64 | 3072B | 7.2kb/s |
| QAM256 | 3072B | 9.5kb/s |
@ -159,9 +154,9 @@ These are the numbers for the short modes with a 5/6 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 213B | 1.1kb/s |
| DQPSK | 213B | 1.8kb/s |
| D8PSK | 852B | 3.6kb/s |
| BPSK | 213B | 1.1kb/s |
| QPSK | 213B | 1.8kb/s |
| 8PSK | 852B | 3.6kb/s |
| QAM16 | 426B | 3.6kb/s |
| QAM64 | 1704B | 7.1kb/s |
| QAM256 | 1704B | 9.1kb/s |
@ -172,9 +167,9 @@ These are the numbers for the normal modes with a 5/6 code rate:
| Modulation | Payload | Bitrate |
| ---------- | ------- | ------- |
| DBPSK | 426B | 1.3kb/s |
| DQPSK | 852B | 2.6kb/s |
| D8PSK | 1704B | 4.0kb/s |
| BPSK | 426B | 1.3kb/s |
| QPSK | 852B | 2.6kb/s |
| 8PSK | 1704B | 4.0kb/s |
| QAM16 | 1704B | 5.2kb/s |
| QAM64 | 3408B | 8.0kb/s |
| QAM256 | 3408B |10.5kb/s |

View file

@ -48,7 +48,6 @@ struct Common
int head_off;
int tail_off;
int symbol_count;
bool differential;
Common() : crc0(0xA8F4), crc1(0x8F6E37A0) {}
@ -65,56 +64,48 @@ struct Common
case 0:
mod_bits = 1;
symbol_count = 8;
differential = true;
code_order = 11;
std::cerr << "DBPSK";
std::cerr << "BPSK";
break;
case 1:
mod_bits = 2;
symbol_count = 4;
differential = true;
code_order = 11;
std::cerr << "DQPSK";
std::cerr << "QPSK";
break;
case 2:
mod_bits = 3;
symbol_count = 11;
differential = true;
code_order = 13;
std::cerr << "D8PSK";
std::cerr << "8PSK";
break;
case 3:
mod_bits = 4;
symbol_count = 4;
differential = false;
code_order = 12;
std::cerr << "QAM16";
break;
case 4:
mod_bits = 6;
symbol_count = 11;
differential = false;
code_order = 14;
std::cerr << "QAM64";
break;
case 5:
mod_bits = 8;
symbol_count = 8;
differential = false;
code_order = 14;
std::cerr << "QAM256";
break;
case 6:
mod_bits = 10;
symbol_count = 13;
differential = false;
code_order = 15;
std::cerr << "QAM1024";
break;
case 7:
mod_bits = 12;
symbol_count = 11;
differential = false;
code_order = 15;
std::cerr << "QAM4096";
break;

View file

@ -415,15 +415,10 @@ struct Decoder : Common
correlator(buf = next_sample());
std::cerr << "oper mode: " << oper_mode << std::endl;
}
if (differential) {
for (int i = 0; i < tone_count; ++i)
chan[i] = fdom[bin(i+tone_off)];
} else {
for (int i = head_off; i < tone_count; i += block_length)
chan[i] = DSP::lerp(chan[i], tone[i], value(0.5));
for (int i = tail_off; i < tone_count; i += block_length)
chan[i] = DSP::lerp(chan[i], tone[i], value(0.5));
}
for (int i = head_off; i < tone_count; i += block_length)
chan[i] = DSP::lerp(chan[i], tone[i], value(0.5));
for (int i = tail_off; i < tone_count; i += block_length)
chan[i] = DSP::lerp(chan[i], tone[i], value(0.5));
}
if (oper_mode < 0)
continue;

View file

@ -41,7 +41,6 @@ struct Encoder : public Common
cmplx kern[symbol_len];
cmplx guard[guard_len];
cmplx tone[tone_count];
cmplx prev[tone_count];
cmplx temp[tone_count];
value weight[guard_len];
value papr[symbols_max];
@ -79,8 +78,6 @@ struct Encoder : public Common
void symbol(int symbol_number)
{
value scale = value(0.5) / std::sqrt(value(tone_count));
for (int i = 0; differential && symbol_number > 0 && i < tone_count; ++i)
tone[i] *= prev[i];
value best_papr = 1000;
CODE::XorShiftMask<int, 14, 1, 5, 10, 1> combination;
for (int trial = 0; trial < 4096; ++trial) {
@ -124,8 +121,6 @@ struct Encoder : public Common
value cand_papr(peak / mean);
if (cand_papr < best_papr) {
best_papr = cand_papr;
for (int i = 0; differential && symbol_number >= 0 && i < tone_count; ++i)
prev[i] = temp[i];
for (int i = 0; i < symbol_len; ++i)
best[i] = tdom[i];
if (cand_papr < 5)
@ -385,11 +380,11 @@ int main(int argc, char **argv)
}
int oper_mode = 0;
char *modulation = argv[7];
if (!strcmp(modulation, "DBPSK")) {
if (!strcmp(modulation, "BPSK")) {
oper_mode |= 0 << 4;
} else if (!strcmp(modulation, "DQPSK")) {
} else if (!strcmp(modulation, "QPSK")) {
oper_mode |= 1 << 4;
} else if (!strcmp(modulation, "D8PSK")) {
} else if (!strcmp(modulation, "8PSK")) {
oper_mode |= 2 << 4;
} else if (!strcmp(modulation, "QAM16")) {
oper_mode |= 3 << 4;