mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 14:30:34 +00:00
shuffle bits to improve decoding with burst errors
This commit is contained in:
parent
9c2cebe202
commit
5afd9fa8d6
2 changed files with 6 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ namespace DSP { using std::abs; using std::min; using std::cos; using std::sin;
|
|||
#include "xorshift.hh"
|
||||
#include "trigger.hh"
|
||||
#include "complex.hh"
|
||||
#include "permute.hh"
|
||||
#include "decibel.hh"
|
||||
#include "blockdc.hh"
|
||||
#include "hilbert.hh"
|
||||
|
|
@ -192,6 +193,7 @@ struct Decoder
|
|||
CODE::HadamardDecoder<8> hadamard;
|
||||
CODE::PolarEncoder<mesg_type> polarenc;
|
||||
CODE::PolarListDecoder<mesg_type, code_order> polardec;
|
||||
CODE::ReverseFisherYatesShuffle<code_len> shuffle;
|
||||
mesg_type mesg[mesg_bits], mess[code_len];
|
||||
code_type code[code_len];
|
||||
cmplx cons[cons_total], prev[subcarrier_count];
|
||||
|
|
@ -352,6 +354,7 @@ struct Decoder
|
|||
mod_soft(code+mod_bits*i, cons[i], precision);
|
||||
}
|
||||
CODE::PolarHelper<mesg_type>::PATH metric[mesg_type::SIZE];
|
||||
shuffle(code);
|
||||
polardec(metric, mesg, code, frozen_bits, code_order);
|
||||
systematic();
|
||||
int order[mesg_type::SIZE];
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Copyright 2023 Ahmet Inan <inan@aicodix.de>
|
|||
#include <cmath>
|
||||
#include "xorshift.hh"
|
||||
#include "complex.hh"
|
||||
#include "permute.hh"
|
||||
#include "phasor.hh"
|
||||
#include "bitman.hh"
|
||||
#include "utils.hh"
|
||||
|
|
@ -44,6 +45,7 @@ struct Encoder
|
|||
CODE::CRC<uint32_t> crc;
|
||||
CODE::HadamardEncoder<8> hadamard;
|
||||
CODE::PolarSysEnc<code_type> polarenc;
|
||||
CODE::FisherYatesShuffle<code_len> shuffle;
|
||||
code_type code[code_len], mesg[mesg_bits];
|
||||
cmplx fdom[symbol_len], tdom[symbol_len], guard[guard_len];
|
||||
|
||||
|
|
@ -118,6 +120,7 @@ struct Encoder
|
|||
for (int i = 0; i < 32; ++i)
|
||||
mesg[i+data_bits] = nrz((crc()>>i)&1);
|
||||
polarenc(code, mesg, frozen_4096_2080, code_order);
|
||||
shuffle(code);
|
||||
for (int j = 0; j < payload_symbols; ++j) {
|
||||
for (int i = 0; i < subcarrier_count; ++i)
|
||||
fdom[first_subcarrier+i] *=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue