PowerPole adaptor

I always thought there should be something you could buy which was a car cigarette lighter plug with a pair of PowerPoles moulded into the end. You can buy such things where the PowerPoles are on a flying lead, but I think my idea is neater (after all, anything I want to plug into a PowerPole outlet already has a flying lead). Anyway, since you can't buy one, I made my own.


Using UIView maps with XASTIR

Today I received a CD with some UIView maps on it. The UIView maps comprise a graphic image (jpg, gif, etc) with a .inf file of the same name, e.g. foo.jpg and foo.inf. The .inf file contains the real-world coordinates of the corners of the image file. To use these maps with XASTIR we need to convert them to a format the XASTIR can recognise. Fortunately there is a script provided with XASTIR to do this.
  • Copy your maps to the place they will be used, e.g. /usr/local/share/xastir/maps/NZ/UIView
    To do this you will need to be root, so login as root first, or use 'su' or 'sudo'.
    • Create the destination directory:
      mkdir -p /usr/local/share/xastir/maps/NZ/UIView
    • Change to that directory (makes the next steps easy)
      cd /usr/local/share/xastir/maps/NZ/UIView
    • Copy the files from wherever they are to here:
      cp [source directory] .
    • Rename any files with spaces in them. You don't have to do this (Linux will handle spaces in filenames) but really it's better if there are no spaces in the filenames.
    • Convert all the filenames to lower case. If there are only a few then you can do it by hand, but you might prefer to use a small shell script. Again, you don't have to do this, but life is so much easier if you do.
  • Run the XASTIR conversion script:
    • /usr/lib/xastir/inf2geo.pl *.inf
    It'll take a while, but you should end up with a .geo file for every .inf file.
Pay attention to any reported errors, for example, I saw some errors about coordinates being out of bounds. You need to fix the error before you can use those files.

Here is one error I saw:

*** usermap.inf ***
Longitude degrees out-of-bounds: 359. Must be <= 180

And indeed, the file looks like this:
000.00.01W, 90.00.00N
359.00.00E, 90.00.00S
World usermap

I also saw errors where a graphic image which matched the .inf file could not be found. You'll need to fix these too.

After that you should 'tidy up' the map file permissions by using the commands mentioned in README.MAPS

Do this as the root user:
cd /usr/local/share/xastir/maps
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
Now your UIView maps should be visible in XASTIR's map chooser!