From cd367617ecb63d5d603f47801846206d19b0b728 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 10 May 2018 15:09:42 -0500 Subject: [PATCH] Do not correct freq_offset when cfo is doppler --- srsue/src/phy/phch_recv.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srsue/src/phy/phch_recv.cc b/srsue/src/phy/phch_recv.cc index b74139bf7..ca00a07ff 100644 --- a/srsue/src/phy/phch_recv.cc +++ b/srsue/src/phy/phch_recv.cc @@ -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;