File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1357,7 +1357,7 @@ function update_smith_chart() {
13571357 } else {
13581358 traceS11 . y . push ( 20 * Math . log10 ( reflection_mag ) ) ;
13591359 traceS11Ph . y . push ( reflection_phase ) ;
1360- traceS21 . y . push ( 20 * Math . log10 ( 1 - reflection_mag ) ) ;
1360+ traceS21 . y . push ( 20 * Math . log10 ( ( Math . sqrt ( 1 - reflection_mag ** 2 ) ) ) ) ;
13611361 // traceS21Ph.y.push(-reflection_phase);
13621362 }
13631363 // traceS22.x = [scaledFreq];
@@ -1380,7 +1380,7 @@ function update_smith_chart() {
13801380 } else {
13811381 traceS11 . y . push ( 20 * Math . log10 ( reflection_mag ) ) ;
13821382 traceS11Ph . y . push ( reflection_phase ) ;
1383- traceS21 . y . push ( 20 * Math . log10 ( 1 - Math . sqrt ( reflection_mag ) ) ) ;
1383+ traceS21 . y . push ( 20 * Math . log10 ( ( Math . sqrt ( 1 - reflection_mag ** 2 ) ) ) ) ;
13841384 // traceS21Ph.y.push(-reflection_phase);
13851385 }
13861386 traceS11 . x . push ( ( freq + ( span_freq * ( i - span_res ) ) / span_res ) / schematic [ 0 ] . freq_unit . multiplier ) ;
You can’t perform that action at this time.
0 commit comments