summaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/uhd_cal_rx_iq_balance.cpp4
-rw-r--r--host/utils/uhd_cal_tx_iq_balance.cpp4
-rw-r--r--host/utils/usrp_cal_utils.hpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/host/utils/uhd_cal_rx_iq_balance.cpp b/host/utils/uhd_cal_rx_iq_balance.cpp
index 34a0a63fe..7b6f10f3b 100644
--- a/host/utils/uhd_cal_rx_iq_balance.cpp
+++ b/host/utils/uhd_cal_rx_iq_balance.cpp
@@ -166,7 +166,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
const double bb_imag_freq = -bb_tone_freq;
//capture initial uncorrected value
- usrp->set_rx_iq_balance(std::polar<double>(1.0, 0.0));
+ usrp->set_rx_iq_balance(0.0);
capture_samples(usrp, rx_stream, buff, nsamps);
const double initial_suppression = compute_tone_dbrms(buff, bb_tone_freq/actual_rx_rate) - compute_tone_dbrms(buff, bb_imag_freq/actual_rx_rate);
@@ -184,7 +184,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
for (double phase_corr = phase_corr_start; phase_corr <= phase_corr_stop + phase_corr_step/2; phase_corr += phase_corr_step){
for (double ampl_corr = ampl_corr_start; ampl_corr <= ampl_corr_stop + ampl_corr_step/2; ampl_corr += ampl_corr_step){
- const std::complex<double> correction = std::polar(ampl_corr+1, phase_corr*tau);
+ const std::complex<double> correction(ampl_corr, phase_corr);
usrp->set_rx_iq_balance(correction);
//receive some samples
diff --git a/host/utils/uhd_cal_tx_iq_balance.cpp b/host/utils/uhd_cal_tx_iq_balance.cpp
index c2222e777..cff3d1646 100644
--- a/host/utils/uhd_cal_tx_iq_balance.cpp
+++ b/host/utils/uhd_cal_tx_iq_balance.cpp
@@ -169,7 +169,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
const double bb_imag_freq = actual_tx_freq - tx_wave_freq - actual_rx_freq;
//capture initial uncorrected value
- usrp->set_tx_iq_balance(std::polar<double>(1.0, 0.0));
+ usrp->set_tx_iq_balance(0.0);
capture_samples(usrp, rx_stream, buff, nsamps);
const double initial_suppression = compute_tone_dbrms(buff, bb_tone_freq/actual_rx_rate) - compute_tone_dbrms(buff, bb_imag_freq/actual_rx_rate);
@@ -187,7 +187,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
for (double phase_corr = phase_corr_start; phase_corr <= phase_corr_stop + phase_corr_step/2; phase_corr += phase_corr_step){
for (double ampl_corr = ampl_corr_start; ampl_corr <= ampl_corr_stop + ampl_corr_step/2; ampl_corr += ampl_corr_step){
- const std::complex<double> correction = std::polar(ampl_corr+1, phase_corr*tau);
+ const std::complex<double> correction(ampl_corr, phase_corr);
usrp->set_tx_iq_balance(correction);
//receive some samples
diff --git a/host/utils/usrp_cal_utils.hpp b/host/utils/usrp_cal_utils.hpp
index 6d0c500e3..825d94d64 100644
--- a/host/utils/usrp_cal_utils.hpp
+++ b/host/utils/usrp_cal_utils.hpp
@@ -155,7 +155,7 @@ static void store_results(
fs::create_directory(cal_data_path);
cal_data_path = cal_data_path / "cal";
fs::create_directory(cal_data_path);
- cal_data_path = cal_data_path / str(boost::format("%s_%s_cal_v0.1_%s.csv") % xx % what % db_eeprom.serial);
+ cal_data_path = cal_data_path / str(boost::format("%s_%s_cal_v0.2_%s.csv") % xx % what % db_eeprom.serial);
if (fs::exists(cal_data_path)){
fs::rename(cal_data_path, cal_data_path.string() + str(boost::format(".%d") % time(NULL)));
}