GPSMap-OS map calibration file (.mcd) format
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:
NB. Image x,y coordinates have their origin at the bottom-left (ie. the Standard Cartesian system).
dr. matt.
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.