Page 1 of 1

GPSMap-OS map calibration file (.mcd) format

PostPosted: Sat May 02, 2009 2:24 pm
by shanks
Interested in writing code to automatically generate the map calibration file for use with GPSMap-OS so you don't have to enter calibration points manually? The following info should help...

When loading a map image (eg. MyMap.jpg) GPSMap automatically looks for a file in the same location as the image and having the extension .mcd (eg. MyMap.mcd) which contains the saved calibration data for that map.

The .mcd map calibration data file used by GPSMap-OS is a 72 byte binary file, which is simply a series of nine double precision floating point values (in 8-byte, IEEE 754 encoding, little-endian byte order), defining two map calibration point coordinates and the map magnetic variation value in the following sequence:

    point 1 image x coordinate (pixels)
    point 1 image y coordinate (pixels)
    point 1 full OS map Eastings (metres)
    point 1 full OS map Northings (metres)
    point 2 image x coordinate (pixels)
    point 2 image y coordinate (pixels)
    point 2 full OS map Eastings (metres)
    point 2 full OS map Northings (metres)
    magnetic variation (degrees)


NB. Image x,y coordinates have their origin at the bottom-left (ie. the Standard Cartesian system).

dr. matt.

PostPosted: Tue May 05, 2009 3:24 pm
by jolly47roger
.... or if you already have a calibration file (map, jpr, cal, tfw, gmi, gux) then mapc2mapc available at http://www.the-thorns.org.uk/mapping will create a .mcd for you (or the non-OS version if the map is not for the UK)