mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-09 00:13:41 +00:00
wrapper work
This commit is contained in:
parent
f0a40417e4
commit
a530cea085
30 changed files with 385 additions and 588 deletions
|
|
@ -26,10 +26,10 @@ MatchingNetwork::MatchingNetwork()
|
|||
addNetwork = true;
|
||||
}
|
||||
|
||||
void MatchingNetwork::transformDatapoint(VNAData &p)
|
||||
void MatchingNetwork::transformDatapoint(VirtualDevice::VNAMeasurement &p)
|
||||
{
|
||||
auto S = p.S;
|
||||
auto measurement = ABCDparam(S, p.reference_impedance);
|
||||
auto S = p.toSparam(1, 2);
|
||||
auto measurement = ABCDparam(S, p.Z0);
|
||||
if(matching.count(p.frequency) == 0) {
|
||||
// this point is not calculated yet
|
||||
MatchingPoint m;
|
||||
|
|
@ -53,7 +53,7 @@ void MatchingNetwork::transformDatapoint(VNAData &p)
|
|||
// at this point the map contains the matching network effect
|
||||
auto m = matching[p.frequency];
|
||||
auto corrected = m.p1 * measurement * m.p2;
|
||||
p.S = Sparam(corrected, p.reference_impedance);
|
||||
p.fromSparam(Sparam(corrected, p.Z0), 1, 2);
|
||||
}
|
||||
|
||||
void MatchingNetwork::edit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue