I’ve been working on a golang wrapper library for libnecpp from nec++, a C library interface for a C++ rewrite of nec2c, which is a C rewrite of the original FORTRAN NEC2.
That wrapper is in a pretty good state (although like so many projects not “done”, as such), and you can find it on github at https://github.com/ctdk/go-libnecpp. There are godocs for the library as well.
Areas for future work include:
- Improve the documentation and variable names by reference to the NEC2 user manual.
- Add more utility functions for tasks like reading NEC card decks, getting the gain at different θ and φ angles, that sort of thing.
- Being able to either spit out data for other plotting programs to use, or make its own plots of antenna radiation patterns, would be neat too.
NB: To successfully build
go-libnecpp, you need to have nec++ installed on your system. Most Linuxes should have it available (probably under the name
necpp) in the distro packages, but if not you’ll need to build it yourself. On some platforms, like Mac OS X, this can be a bit of an ordeal.