mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 14:30:34 +00:00
simplified precision estimation
This commit is contained in:
parent
c1253cd299
commit
44fae606fd
1 changed files with 2 additions and 5 deletions
|
|
@ -512,12 +512,9 @@ struct Decoder
|
|||
sp += norm(hard);
|
||||
np += norm(error);
|
||||
}
|
||||
value snr = DSP::decibel(sp / np);
|
||||
precision = sp / np;
|
||||
value snr = DSP::decibel(precision);
|
||||
std::cerr << "init Es/N0: " << snr << " dB" << std::endl;
|
||||
// $LLR=log(\frac{p(x=+1|y)}{p(x=-1|y)})$
|
||||
// $p(x|\mu,\sigma)=\frac{1}{\sqrt{2\pi}\sigma}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$
|
||||
value sigma = std::sqrt(np / (2 * sp));
|
||||
precision = 1 / (sigma * sigma);
|
||||
}
|
||||
for (int i = 0; i < cons_cnt; ++i)
|
||||
mod_soft(code+mod_bits*i, cons[i], precision);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue