| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
iq_dc_cal.hpp
Go to the documentation of this file.
1//
2// Copyright 2026 Ettus Research, a National Instruments Brand
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <uhd/cal/container.hpp>
10#include <uhd/config.hpp>
11#include <uhd/types/iq_dc_cal_coeffs.hpp>
12#include <uhd/utils/interpolation.hpp>
13#include <complex>
14#include <cstdint>
15#include <memory>
16#include <string>
17#include <vector>
18
19 namespace uhd { namespace usrp { namespace cal {
20
32 class UHD_API iq_dc_cal : public container
33{
34 public:
35 using sptr = std::shared_ptr<iq_dc_cal>;
36
38 //
39 // This class supports two kinds of interpolation: nearest-neighbor, and
40 // linear.
41 //
42 // \param interp The new interpolation mode
43 // \throws uhd::value_error if the given interpolation mode is not
44 // supported.
45 virtual void set_interp_mode(const uhd::math::interp_mode interp) = 0;
46
48 //
49 // This function will interpolate to return a valid coefficient for any
50 // given frequency.
51 virtual iq_dc_cal_coeffs_t get_cal_coeff(const double freq) const = 0;
52
54 //
55 // This function will interpolate to return a valid group delay for any
56 // given frequency.
57 virtual double get_group_delay(const double freq) = 0;
58
60 //
61 // This usually only needs to be called by calibration utilities.
62 //
63 // \param freq The frequency at which this coefficient is measured
64 // \param scaling_factor The amount by which the raw data should be scaled.
65 // \param icross The i cross coefficients
66 // \param qinline The q inline coefficients
67 // \param delay The group delay of this coefficient, in samples
68 // \param dc_offset_real The real part of the DC offset
69 // \param dc_offset_imag The imaginary part of the DC offset
70 virtual void set_cal_coeff(const double freq,
71 const double scaling_factor,
72 const std::vector<double> icross,
73 const std::vector<double> qinline,
74 const double delay = 0,
75 const double dc_offset_real = 0,
76 const double dc_offset_imag = 0) = 0;
77
79 //
80 // This can be useful in order to drop existing cal data, and load an
81 // entirely new set with deserialize().
82 virtual void clear() = 0;
83
85 static sptr make(
86 const std::string& name, const std::string& serial, const uint64_t timestamp);
87
89 static sptr make();
90};
91
92}}} // namespace uhd::usrp::cal
uhd::usrp::cal::container
Definition container.hpp:23
uhd::usrp::cal::iq_dc_cal
Definition iq_dc_cal.hpp:33
uhd::usrp::cal::iq_dc_cal::set_cal_coeff
virtual void set_cal_coeff(const double freq, const double scaling_factor, const std::vector< double > icross, const std::vector< double > qinline, const double delay=0, const double dc_offset_real=0, const double dc_offset_imag=0)=0
Update / set a calibration coefficient.
uhd::usrp::cal::iq_dc_cal::make
static sptr make(const std::string &name, const std::string &serial, const uint64_t timestamp)
Factory for new cal data sets.
uhd::usrp::cal::iq_dc_cal::make
static sptr make()
Default factory.
uhd::usrp::cal::iq_dc_cal::clear
virtual void clear()=0
Clear the list of coefficients.
uhd::usrp::cal::iq_dc_cal::sptr
std::shared_ptr< iq_dc_cal > sptr
Definition iq_dc_cal.hpp:35
uhd::usrp::cal::iq_dc_cal::get_group_delay
virtual double get_group_delay(const double freq)=0
Return the group delay at a given frequency.
uhd::usrp::cal::iq_dc_cal::get_cal_coeff
virtual iq_dc_cal_coeffs_t get_cal_coeff(const double freq) const =0
Return a calibration coefficient for a given frequency.
uhd::usrp::cal::iq_dc_cal::set_interp_mode
virtual void set_interp_mode(const uhd::math::interp_mode interp)=0
Choose interpolation mode.
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
container.hpp
interpolation.hpp
iq_dc_cal_coeffs.hpp
uhd::math::interp_mode
interp_mode
Definition interpolation.hpp:11
uhd::usrp::cal
Definition cal_utils.hpp:11
uhd::usrp
Definition cal_utils.hpp:11
uhd
Definition build_info.hpp:12
uhd::iq_dc_cal_coeffs_t
Definition iq_dc_cal_coeffs.hpp:16