Do not correct freq_offset when cfo is doppler

This commit is contained in:
Ismael Gomez 2018-05-10 15:09:42 -05:00
parent 4515dd94ea
commit cd367617ec
1 changed files with 6 additions and 6 deletions

View File

@ -642,12 +642,12 @@ float phch_recv::get_tx_cfo()
if (worker_com->args->cfo_is_doppler) {
ret *= -1;
}
if (radio_h->get_freq_offset() != 0.0f) {
/* Compensates the radio frequency offset applied equally to DL and UL */
const float offset_hz = (float) radio_h->get_freq_offset() * (1.0f - ul_dl_factor);
ret = cfo - offset_hz;
} else {
/* Compensates the radio frequency offset applied equally to DL and UL. Does not work in doppler mode */
if (radio_h->get_freq_offset() != 0.0f) {
const float offset_hz = (float) radio_h->get_freq_offset() * (1.0f - ul_dl_factor);
ret = cfo - offset_hz;
}
}
return ret/15000;