I made a thing: Maidenhead grid system library

So I’ve been working on a project for some time to model from the WSPR dataset. And that’s a long time in the making, and probably still will be. But I realised given all of the Maidenhead processing involved in it, I had a bit of an opportunity: Instead of just embedding a ton of Maidenhead processing in the overall program, I could refactor it into a library/utility.

So I went on my side-quest and finally reached the point of having what I think is a viable release candidate.

It has both Python API and CLI support - so theoretically it can interface with any program of any language that can invoke command line interface commands and receive the output, not just Python.

It supports both scalar (single data) and bulk/vector (many data) input paths, including through numpy to accelerate the vector paths.

Overall it’s oriented towards geodesy and data analytics but I hope there’s some use people out there can also get from it. As it’s currently a release candidate I’d appreciate any independent testing and feedback on the project. It’s licensed under the LGPL so please feel free to use it in whatever you might have use for it, or modify it.

If you do find some usefulness in it, please let me know! And please pass it along if you know someone who might have some use for it.

If there’s demand for a utility like this I might re-implement it in C/C++ down the line.

6 Likes

What does it do ?
K6YK

I’d like to say pretty much anything you might want to do in software using the Maidenhead system.

Examples of some basic features:

  • Return the Maidenhead grid of a given lat/long pair, of given precision (2, 4, 6, 8, 10 digits)
  • Return the lat/long pair of the centre of a Maidenhead grid square
  • Return the lat/long pairs of the corners of a given Maidenhead grid square
  • Return the distance between the centres of 2 Maidenhead grid squares (including using a geodesic method)
  • Return the azimuth or bearing between the centres of 2 Maidenhead grid squares (including using a geodesic method)
2 Likes

OK, now we’re getting somewhere. Thanks!
K6YK

Speaking of distances between MH locators, there is an app for IOS that does that nicely, giving you beam headings between the two stations too. It’s called DBHAMplus and allows you to enter your gridsquare reference (6 char, so technically it’s your grid sub-square) and the same for the other station. It then displays the distance and bearing from your locator to the other and the reverse bearing if the other station wants it. Very easy to use and quite handy for VHF/UHF/microwave activations. Once it has the two locations a map showing the path between them can also be displayed.

The app was written by Thomas Sullivan.

73 Andrew VK1DA

3 Likes