Sure Lapo. That is great. However they are all practical representations. In fact why stop there. You could convert the result to its parallel equivalent admittance and provide that as well.
I suspect that if you are doing antenna work and wish to design an impedance matching network, YES. The usual process is to specify the LOAD, the antenna as a complex Z or Y and not as a R and C/L unit. However, a little calculator can handle the conversion. But you are right, it would just be more convenient to have the vna spit it out. I think best to provide this as a user selection menu item. What do you think? 73' Alan ________________________________ From: [email protected] <[email protected]> on behalf of Lapo Pieri <ik5nax@...> Sent: Monday, July 29, 2019 5:51 PM To: nanovna-users <[email protected]> Subject: [nanovna-users] Smith chart impedance printout Hi, I think that Smith chart presentation of impedance as <real_part>[ohm] <series cap or ind>[F|H] is not practical in many case of use. So I decide to modify the code to show impedance in <real_part>+/-j<imag_part> format, you can find the patch to plot.c to obtain this. If I found a bit of time I could split Smith chart in two, one as original and one as just proposed. Do you think it worth? Lapo, IK5NAX -------- diff --git a/plot.c b/plot.c index 10074c3..c5c92e5 100644 --- a/plot.c +++ b/plot.c @@ -576,16 +576,22 @@ gamma2imp(char *buf, int len, const float coeff[2], uint32_t frequency) // float z = sqrtf(zr*zr + zi*zi); int n; - n = string_value_with_prefix(buf, len, zr, S_OHM[0]); - buf[n++] = ' '; + n = string_value_with_prefix(buf, len, zr, '\0'); + if(zi<0) + buf[n++]='-'; + else + buf[n++]='+'; + buf[n++]='j'; + string_value_with_prefix(buf+n, len-n, fabs(zi), S_OHM[0]); - if (zi < 0) { - float c = -1 / (PI2 * frequency * zi); - string_value_with_prefix(buf+n, len-n, c, 'F'); - } else { - float l = zi / (PI2 * frequency); - string_value_with_prefix(buf+n, len-n, l, 'H'); - } + + /* if (zi < 0) { */ + /* float c = -1 / (PI2 * frequency * zi); */ + /* string_value_with_prefix(buf+n, len-n, c, 'F'); */ + /* } else { */ + /* float l = zi / (PI2 * frequency); */ + /* string_value_with_prefix(buf+n, len-n, l, 'H'); */ + /* } */ } void |