08:06 Wed 25 Sep 19 , Steve London wrote:
I will apologize if this has already been covered. I didn't find it in a search.
I see that, by default, NanoVNA reports R + L/C . Is there a way to change that to R +- X ?
Yes, I know the PC software can display it both ways, but my primary use for the NanoVNA is up on the tower, to make measurements at the feedpoint. The NanoVNA is a lot more convenient than carrying up a bulky and expensive antenna analyzer.
I faced the same problem and I've modified a bit smith chart presentation
to show R+jX. I think my patch will not apply to current fw but if you want to
try to adapt it to newr fw I'll attach below.
When I'll find a bit of time I'll try to integrate in actual fw.
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