gmr1_rx: FCCH SNR computation improvement
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
8d51afb939
commit
90526bca2e
|
@ -678,22 +678,16 @@ fcch_multi_process(struct chan_desc *cd, fcch_multi_cb_t cb)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compute SNR (comparing energy with neighboring CICH) */
|
/* Compute SNR */
|
||||||
win_map(win, cd->bcch,
|
win_map(win, cd->bcch,
|
||||||
base_align + mtoa[i] + toa + 5 * cd->sps,
|
base_align + mtoa[i] + toa,
|
||||||
(117 - 10) * cd->sps
|
fcch_type->len * cd->sps
|
||||||
);
|
);
|
||||||
|
|
||||||
e_fcch = burst_energy(win);
|
rv = gmr1_fcch_snr(fcch_type, win, cd->sps, -(cd->freq_err + freq_err), &snr);
|
||||||
|
if (rv) {
|
||||||
win_map(win, cd->bcch,
|
fprintf(stderr, "[!] Error during FCCH SNR estimation (%d)\n", rv);
|
||||||
base_align + mtoa[i] + toa + (5 + 117) * cd->sps,
|
}
|
||||||
(117 - 10) * cd->sps
|
|
||||||
);
|
|
||||||
|
|
||||||
e_cich = burst_energy(win);
|
|
||||||
|
|
||||||
snr = e_fcch / e_cich;
|
|
||||||
|
|
||||||
/* Check against strongest */
|
/* Check against strongest */
|
||||||
if (i==0) {
|
if (i==0) {
|
||||||
|
|
Loading…
Reference in New Issue