mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 22:17:31 +00:00
Allow changing Z0 in through standard
This commit is contained in:
parent
ee16dbc070
commit
ec4828d4c4
6 changed files with 92 additions and 2 deletions
|
|
@ -72,7 +72,7 @@
|
|||
<item row="0" column="1">
|
||||
<widget class="SIUnitEdit" name="Z0">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -579,7 +579,13 @@ Sparam Through::toSparam(double freq)
|
|||
double through_att = pow(10.0, -through_att_db / 10.0);
|
||||
auto through = polar<double>(through_att, through_phaseshift);
|
||||
// Assume symmetric and perfectly matched through for other parameters
|
||||
return Sparam(0.0, through, through, 0.0);
|
||||
auto S = Sparam(0.0, through, through, 0.0);
|
||||
// update S parameters if Z0 does not match system impedance exactly
|
||||
if(Z0 != 50.0) {
|
||||
auto abcd = ABCDparam(S, Z0);
|
||||
S = Sparam(abcd, 50.0);
|
||||
}
|
||||
return S;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue