W8WWV - N2PK VNA - VNA.CFG File Reader (VNACFG.h)

Greg Ordy


The N2PK software uses a configuration file named VNA.CFG. This file is a collection of name-value pairs that set parameter values used by VNA software. The parameters are important, such as the master oscillator frequency, but they do not tend to change often. Putting them into a file and referencing them from VNA software is a good idea.

I wanted to read and use this file as part of the extensions made to the cialog program.  In case this is useful to others developing software for the VNA, I'm placing a download link to the source file on this page. The source is written in C++, and the configuration parameters as well as the code to read the file are contained in a class. The code does have some Windows-specific calls and conventions, and was compiled with Microsoft Visual C++, version 6.

The reader code  will look in up to two folders for VNA.CFG files. The first  folder is the folder that holds the executable program. The second folder is specified as a parameter to the reader function. Within the context of cialog, this second folder is the data folder. When the object is constructed, all parameters are initialized with reasonable default values. Neither file need exist. The idea behind reading two files was to allow the parameters to be separated into ones that truly never changed, and others that might be dependent up the circumstances. For example, the master oscillator frequency will not change for a given VNA. That parameter could be specified in the VNA.CFG file located in the executable program folder. If the user had more than one set of calibration standards, with different  correction parameters, then they could be held in individual VNA.CFG files located in different folders. The folders would be specified in the application programs as a function of the calibration standards. As the user changes standards they would change folders, and access a different set of calibration standard parameters.

The source program considers the parameter names to be case insensitive. Unknown parameter names are ignored. If a parameter is specified more than once, the last setting is used. Comments are enclosed in parenthesis. Please consult the N2PK software for example files.


Not much to say here, just click to download. In some cases, depending upon browser settings, you might just view the page. In that case, you can use the File->Save As command to save the contents in a file on your computer.

Click to Download VNACFG.h


Back to my Software Contributions Page

Back to my Experimentation Page

Back to my Amateur Radio Page

Last update: Tuesday, October 12, 2004 01:24:15 PM
Back to my Home Page