use at least 16 symbols with normal frames

This commit is contained in:
Ahmet Inan 2025-07-18 17:48:20 +02:00
commit c1ecc959d1
2 changed files with 13 additions and 8 deletions

12
README.md vendored
View file

@ -48,14 +48,14 @@ These are the durations for each differential modulation scheme:
| Modulation | Short | Normal |
| ---------- | ----- | ------ |
| DBPSK | 1.5s | 2.6s |
| DQPSK | 1.0s | 1.5s |
| DQPSK | 1.0s | 2.6s |
| D8PSK | 1.9s | 3.4s |
And these are the durations for each coherent modulation scheme:
| Modulation | Short | Normal |
| ---------- | ----- | ------ |
| QAM16 | 1.0s | 1.5s |
| QAM16 | 1.0s | 2.6s |
| QAM64 | 1.9s | 3.4s |
| QAM256 | 1.5s | 2.6s |
| QAM1024 | 2.2s | 4.0s |
@ -68,9 +68,9 @@ Therefore we have the following byte payloads for each modulation:
| Modulation | Short | Normal |
| ---------- | ----- | ------ |
| DBPSK | 128B | 256B |
| DQPSK | 128B | 256B |
| DQPSK | 128B | 512B |
| D8PSK | 512B | 1024B |
| QAM16 | 256B | 512B |
| QAM16 | 256B | 1024B |
| QAM64 | 1024B | 2048B |
| QAM256 | 1024B | 2048B |
| QAM1024 | 2048B | 4096B |
@ -81,9 +81,9 @@ Which give us the following bitrates for each modulation:
| Modulation | Short | Normal |
| ---------- | ------- | ------- |
| DBPSK | 681b/s | 789b/s |
| DQPSK | 1070b/s | 1362b/s |
| DQPSK | 1070b/s | 1577b/s |
| D8PSK | 2141b/s | 2398b/s |
| QAM16 | 2141b/s | 2725b/s |
| QAM16 | 2141b/s | 3155b/s |
| QAM64 | 4282b/s | 4795b/s |
| QAM256 | 5449b/s | 6310b/s |
| QAM1024 | 7493b/s | 8268b/s |

View file

@ -114,8 +114,13 @@ struct Common
}
bool frame_length = mode & 1;
if (frame_length) {
symbol_count *= 2;
++code_order;
if (symbol_count == 4) {
symbol_count *= 4;
code_order += 2;
} else {
symbol_count *= 2;
++code_order;
}
}
int code_rate = (mode >> 1) & 7;
if (code_rate == 0) {