mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
dBuV axis option for spectrum analyzer
This commit is contained in:
parent
cece0080ed
commit
754ded1d08
5 changed files with 17 additions and 1 deletions
|
|
@ -65,3 +65,10 @@ double Util::distanceToLine(QPointF point, QPointF l1, QPointF l2, QPointF *clos
|
|||
std::complex<double> Util::SparamToImpedance(std::complex<double> d) {
|
||||
return Preferences::getInstance().Acquisition.refImp * (1.0 + d) / (1.0 - d);
|
||||
}
|
||||
|
||||
double Util::dBmTodBuV(double dBm)
|
||||
{
|
||||
double uVpower = 0.000001*0.000001/Preferences::getInstance().Acquisition.refImp;
|
||||
double dBdiff = 10*log10(uVpower*1000);
|
||||
return dBm - dBdiff;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ namespace Util {
|
|||
static inline double SparamTodB(std::complex<double> d) {
|
||||
return SparamTodB(abs(d));
|
||||
}
|
||||
double dBmTodBuV(double dBm);
|
||||
static inline double SparamToDegree(std::complex<double> d) {
|
||||
return (arg(d) * 180.0 / M_PI);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue