USRP Hardware Driver and USRP Manual: iq_cal.hpp Source File

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
iq_cal.hpp
Go to the documentation of this file.
1//
2// Copyright 2020 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/utils/interpolation.hpp>
12#include <complex>
13#include <cstdint>
14#include <memory>
15#include <string>
16
17namespace uhd { namespace usrp { namespace cal {
18
25 class UHD_API iq_cal : public container
26{
27public:
28 using sptr = std::shared_ptr<iq_cal>;
29
31 //
32 // This class supports two kinds of interpolation: Nearest-neighbour, and
33 // linear.
34 //
35 // \param interp The new interpolation mode
36 // \throws uhd::value_error if the given interpolation mode is not
37 // supported.
38 virtual void set_interp_mode(const uhd::math::interp_mode interp) = 0;
39
41 //
42 // This function will interpolate to return a valid coefficient for any
43 // given frequency.
44 virtual std::complex<double> get_cal_coeff(const double freq) const = 0;
45
47 //
48 // This usually only needs to called by calibration utilities.
49 //
50 // \param freq The frequency at which this coefficient is measured
51 // \param coeff The value that is stored
52 // \param suppression_abs The amount of impairment suppression this
53 // coefficient provides, in dB.
54 // \param suppression_delta The difference of impairment power between
55 // applying this coefficient and applying none, in
56 // dB.
57 virtual void set_cal_coeff(const double freq,
58 const std::complex<double> coeff,
59 const double suppression_abs = 0,
60 const double suppression_delta = 0) = 0;
61
63 //
64 // This can be useful in order to drop existing cal data, and load an
65 // entirely new set with deserialize().
66 virtual void clear() = 0;
67
69 static sptr make(
70 const std::string& name, const std::string& serial, const uint64_t timestamp);
71
73 static sptr make();
74};
75
76}}} // namespace uhd::usrp::cal
uhd::usrp::cal::container
Definition container.hpp:23
uhd::usrp::cal::iq_cal
Definition iq_cal.hpp:26
uhd::usrp::cal::iq_cal::set_interp_mode
virtual void set_interp_mode(const uhd::math::interp_mode interp)=0
Choose interpolation mode.
uhd::usrp::cal::iq_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_cal::make
static sptr make()
Default factory.
uhd::usrp::cal::iq_cal::set_cal_coeff
virtual void set_cal_coeff(const double freq, const std::complex< double > coeff, const double suppression_abs=0, const double suppression_delta=0)=0
Update / set a calbration coefficient.
uhd::usrp::cal::iq_cal::sptr
std::shared_ptr< iq_cal > sptr
Definition iq_cal.hpp:28
uhd::usrp::cal::iq_cal::get_cal_coeff
virtual std::complex< double > get_cal_coeff(const double freq) const =0
Return a calibration coefficient for a given frequency.
uhd::usrp::cal::iq_cal::clear
virtual void clear()=0
Clear the list of coefficients.
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
container.hpp
interpolation.hpp
uhd::math::interp_mode
interp_mode
Definition interpolation.hpp:11
uhd::usrp::cal
Definition container.hpp:15
uhd::usrp
Definition container.hpp:15
uhd
Definition build_info.hpp:12