2008-12-13
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.
2008-11-24
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.
Here is one error I saw:
And indeed, the file looks like this:
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:
- 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.
- Create the destination directory:
- Run the XASTIR conversion script:
/usr/lib/xastir/inf2geo.pl *.inf
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/mapsNow your UIView maps should be visible in XASTIR's map chooser!
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
Subscribe to:
Posts (Atom)