NEC2++ is a C++ rewrite of the Numerical Electromagnetics Code (NEC-2) with many new features like automatic error detection when you specify the structure incorrectly and much faster execution. Nec2++ can analyse radiating as well as scattering properties of structures. The simulation engine in Nec2++ is compiled into a library for easy integration into automatic antenna design systems or GUI tools. Examples are included for using Nec2++ from C/C++, Ruby and Python.
The program's help message previously was like this:
usage: nec2++ [-i<input-file-name>] [-o<output-file-name>]
-g: print maximum gain to stdout.
-b: Perform NEC++ Benchmark.
-s: print results to standard output.
-c: print results in comma-separated-value (CSV) format,
this options is used in conjunction with (-s) above.
-h: print this usage information and exit.
-v: print nec2++ version number and exit.
This fooled me into thinking I could get the simulation results via the -s command line switch. But what I actually got was a excerpt, one might call it a summary.
This actually threw me off. For some time, it was my impression that the program does considerably less calculation than what one has come to expect from a NEC2 implementation. Only after generating and reading a regular output file (accidentally), I realized that the output generated by -s is sorely incomplete.
And there was no defined way to have that output piped to stdout. To have this is very convenient in a scripting environment.
This pull request addresses that problem, in two ways:
The usage message is corrected to more clearly indicate that -s produces reduced output.
When providing -o - as the output file, the full output is produced on stdout instead of a file.
The program's help message previously was like this:
This fooled me into thinking I could get the simulation results via the
-s
command line switch. But what I actually got was a excerpt, one might call it a summary.This actually threw me off. For some time, it was my impression that the program does considerably less calculation than what one has come to expect from a NEC2 implementation. Only after generating and reading a regular output file (accidentally), I realized that the output generated by
-s
is sorely incomplete.And there was no defined way to have that output piped to
stdout
. To have this is very convenient in a scripting environment.This pull request addresses that problem, in two ways:
-s
produces reduced output.-o -
as the output file, the full output is produced onstdout
instead of a file.