mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-09 00:13:41 +00:00
Selectable reference impedance
This commit is contained in:
parent
d526270fd2
commit
cece0080ed
12 changed files with 46 additions and 16 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "util.h"
|
||||
|
||||
#include "preferences.h"
|
||||
|
||||
#include <QVector2D>
|
||||
|
||||
void Util::unwrapPhase(std::vector<double> &phase, unsigned int start_index)
|
||||
|
|
@ -59,3 +61,7 @@ double Util::distanceToLine(QPointF point, QPointF l1, QPointF l2, QPointF *clos
|
|||
}
|
||||
return orthVect.length();
|
||||
}
|
||||
|
||||
std::complex<double> Util::SparamToImpedance(std::complex<double> d) {
|
||||
return Preferences::getInstance().Acquisition.refImp * (1.0 + d) / (1.0 - d);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue