¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: NanoVNA-App in app calibration problem (bug?) #calibration #nanovna-app


 

On 3/1/23 6:33 AM, Brian Beezley wrote:
On Wed, Mar 1, 2023 at 05:54 AM, <btomek@...> wrote:


I think both separators should be supported when reading the file.
The compiler may not support comma separators. For example, my compiler yields 1 when evaluating this string: 1,234. You can get around this by evaluating the number character by character, which is complicated if you allow scientific notation in all its variations, or you can replace commas with periods. The latter is easy, but it fails when the code processes a CSV file, which some VNAs generate and which most of my programs are designed to handle. It was easy to accommodate commas in the program that checks S-parameter magnitudes since it does not have to deal with CSV files. Incidentally, the updated program is here:
Getting down in the weeds here, but it's not so much the compiler as the parsing library it uses (which might be different at run time and compile time).

You don't have to do it character by character, you can look for either period or comma, split it there, then convert the two pieces separately. You also have to deal with the (optional) E.

But it's a pain, no matter how you do it. On the other hand, you only have to write the generalized routine once.
And for something like Python, I'll bet someone's already written it, but it might take longer to find it than to just write it.

Join [email protected] to automatically receive all group messages.