aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-03-05 12:08:56 -0800
committerAaron Rossetto <aaron.rossetto@ni.com>2020-04-02 11:55:17 -0500
commita1f96194696494b756d691ff54e384a1ce478fc2 (patch)
tree1a1d480b5e35a239c5599ebcda1984e29bd0dd55 /host/lib/include
parent3fe5ccf700a0c6f27dca9511386460194dcc593c (diff)
downloaduhd-a1f96194696494b756d691ff54e384a1ce478fc2.tar.gz
uhd-a1f96194696494b756d691ff54e384a1ce478fc2.tar.bz2
uhd-a1f96194696494b756d691ff54e384a1ce478fc2.zip
uhd: cal: Use usrp::cal::database instead of CSV files
Now that we have cal::iq_cal and cal::database, there's no need to manually wrangle CSV files for calibration data. This commit replaces all CSV operations with cal::database calls and uses cal::iq_cal as a container. CSV files can still be read, but are considered deprecated.
Diffstat (limited to 'host/lib/include')
-rw-r--r--host/lib/include/uhdlib/usrp/common/apply_corrections.hpp47
-rw-r--r--host/lib/include/uhdlib/utils/paths.hpp2
2 files changed, 46 insertions, 3 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/apply_corrections.hpp b/host/lib/include/uhdlib/usrp/common/apply_corrections.hpp
index dffefffea..fb9aaa8f1 100644
--- a/host/lib/include/uhdlib/usrp/common/apply_corrections.hpp
+++ b/host/lib/include/uhdlib/usrp/common/apply_corrections.hpp
@@ -14,26 +14,67 @@
namespace uhd { namespace usrp {
+/*! Apply TX DC offset or IQ imbalance corrections (RFNoC version)
+ *
+ * \param sub_tree Property tree object
+ * \param db_serial Daughterboard serial
+ * \param tx_fe_corr_path This is the path relative to \p sub_tree where the
+ * coefficients are stored. The path should end in
+ * `iq_balance/value` or `dc_offset/value` and be a
+ * complex number.
+ * \param tx_lo_freq The current LO frequency. Used to look up coefficients in the cal
+ * data set.
+ */
void apply_tx_fe_corrections(property_tree::sptr sub_tree, // starts at mboards/x
const std::string& db_serial,
const fs_path tx_fe_corr_path,
const double tx_lo_freq // actual lo freq
);
+/*! Apply TX DC offset or IQ imbalance corrections (Gen-2 USRP version)
+ *
+ * \param sub_tree Property tree object. It's the motherboard subtree, i.e.,
+ * what comes after /mboards/X.
+ * \param slot Daughterboard slot ("A" or "B"), used to auto-detect the paths.
+ * \param tx_lo_freq The current LO frequency. Used to look up coefficients in the cal
+ * data set.
+ */
void apply_tx_fe_corrections(property_tree::sptr sub_tree, // starts at mboards/x
const std::string& slot, // name of dboard slot
const double tx_lo_freq // actual lo freq
);
+
+/*! Apply RX DC offset or IQ imbalance corrections (RFNoC version)
+ *
+ * \param sub_tree Property tree object
+ * \param db_serial Daughterboard serial
+ * \param tx_fe_corr_path This is the path relative to \p sub_tree where the
+ * coefficients are stored. The path should end in
+ * `iq_balance/value` or `dc_offset/value` and be a
+ * complex number.
+ * \param tx_lo_freq The current LO frequency. Used to look up coefficients in the cal
+ * data set.
+ */
void apply_rx_fe_corrections(property_tree::sptr sub_tree, // starts at mboards/x
- const std::string& slot, // name of dboard slot
+ const std::string& db_serial,
+ const fs_path rx_fe_corr_path,
const double rx_lo_freq // actual lo freq
);
+/*! Apply RX DC offset or IQ imbalance corrections (Gen-2 USRP version)
+ *
+ * \param sub_tree Property tree object. It's the motherboard subtree, i.e.,
+ * what comes after /mboards/X.
+ * \param slot Daughterboard slot ("A" or "B"), used to auto-detect the paths.
+ * \param rx_lo_freq The current LO frequency. Used to look up coefficients in the cal
+ * data set.
+ */
void apply_rx_fe_corrections(property_tree::sptr sub_tree, // starts at mboards/x
- const std::string& db_serial,
- const fs_path rx_fe_corr_path,
+ const std::string& slot, // name of dboard slot
const double rx_lo_freq // actual lo freq
);
+
+
}} // namespace uhd::usrp
#endif /* INCLUDED_LIBUHD_USRP_COMMON_APPLY_CORRECTIONS_HPP */
diff --git a/host/lib/include/uhdlib/utils/paths.hpp b/host/lib/include/uhdlib/utils/paths.hpp
index 7f0dc4046..7caac8a7d 100644
--- a/host/lib/include/uhdlib/utils/paths.hpp
+++ b/host/lib/include/uhdlib/utils/paths.hpp
@@ -18,6 +18,8 @@ namespace uhd {
*/
std::string path_expandvars(const std::string& path);
+std::string get_appdata_path(void);
+
} /* namespace uhd */
#endif /* INCLUDED_UHDLIB_UTILS_PATHS_HPP */