olzslick.blogg.se

Color smith chart
Color smith chart











color smith chart color smith chart

Mid(mant, 2) = "." + temp ' repair the mantissaĭim As Integer k = (-expo) Mod 3 ' WARNING: this is a critical

color smith chart

Line -(1 + radius * Cos(alpha), centre_v + radius * Sin(alpha)), colour Pset (1, 0), colour ' all start at same pointįor alpha = -HalfPi To -HalfPi - Theta - tad Step -Theta / 60 Sub Reactance(Byval x As Double, Byval colour As Integer) ' draw reactance arcĭim As Double centre_v = 1 / x ' centre of arc, cu = 1ĭim As Double theta = 2 * Atn(x) ' end point of arc Line -(centre_u + radius * Cos(theta), radius * Sin(theta)), colour Sub Resistance(Byval res As Double, Byval colour As Integer) ' draw resistance circle Line -(radius * Cos(theta), radius * Sin(theta)), colour Sub VSWRcircle(Byval s As Double, Byval colour As Integer) ' draw VSWR circle Print Using " +#.# wl to gen" LineLength Print " Inductive " EngSi((Zo * x)/(TwoPi * Freq), 3) "H " Print " jX = " EngSi(Zo * x, 3) Chr(234) Uv2rx ' convert cursor position u,v to R + jX Gamma = Sqr(u*u + v*v) ' Reflection Coefficient VSWRcircle(d, chartS) ' vswr in background so draw first Resistance(0, chartP) ' outer circle = zero ohms ' colours are selected to aid "red:green colour blind" viewersĬonst As Integer chartp = 7 ' colour for outlineĬonst As Integer chartr = 7 ' colour for R circlesĬonst As Integer chartx = 6 ' colour for X arcsĬonst As Integer charts = 9 ' colour for VSWR circles ' 0 black, 1 blue, 2 green, 3 cyan, 4 red, 5 magenta, 6 brown, 7 white Width screen_width\8, screen_height\16 ' select 8 x 16 charĬonst As Double tad = 1E-10 ' a "tad" is small enough to be zeroĭim Shared As Double Zo = 50 ' reference impedanceĭim Shared As Double Freq = 300e6 ' reference frequencyĭeclare Sub Resistance(Byval As Double, Byval As Integer) ' resistance circleĭeclare Sub Reactance (Byval As Double, Byval As Integer) ' reactance arcĭeclare Sub VSWRcircle(Byval As Double, Byval As Integer) ' VSWR circleĭeclare Function EngSI(Byval As Double, Byval As Integer) As Stringĭeclare Sub uv2rx ' convert SmithChart to Impedanceĭeclare Sub rx2uv ' convert Impedance to SmithChart Screenres screen_width, screen_height ' set screen size on desktop Screen_width = desktop_width - 8 ' less width of sides Screen_height = desktop_height - 48 ' less height of title bars Screeninfo desktop_width, desktop_height ' get desktop dimensions ' find size of desktop, then use smaller screen to avoid Pmap bug.ĭim As Integer desktop_width, desktop_height, screen_width, screen_height













Color smith chart