Reference points

It is also possible to do the chart calibration directly with a text editor. The reference point data is stored in ascii text files. The format shall be like in these example charts.cfg files:

First a top file preferably called charts.cfg that tells ChartPlotter which files it shall read.

------------cut here------------
// charts.cfg
include chart1.cfg
include chart2.cfg
------------cut here------------

Then one data file for each image (usually .gif or .jpg) file. These files can be created with the CalibrateChart program or written manually.

------------cut here------------
// chart1.cfg
begin ChartData
name chart1.jpg
ref 342 71 59N20.0 018E04.0
ref 1239 948 59N18.0 018E08.0
ref 350 950 59N18.0 018E04.0
ref 1240 70 59N20.0 018E08.0
lim 59N18 59N20 18E04 18E08
datum WGS-84
rem "Stockholm chart from 1998"
end
------------cut here------------

------------cut here------------
// chart2.cfg
//
begin ChartData
name chart2.jpg
ref 312 61 59N20.0 018E08.0
ref 1219 958 59N18.0 018E12.0
datum RT
comp 0.02 0.21
end
------------cut here------------

See also this example chart and charts.cfg file:
charts.zip

Commands in the charts.cfg file

Lines beginning with "//" are ignored.

name <n>

The name of the image file is <n> for the data that follows. It must be followed by at least two reference points.

ref <x> <y> <lat> <lng>

Reference points. First in a reference point is the XY co-ordinates <x> and <y> in the image file. Then the corresponding latitude <lat> and longitude <lng> on the map.

Three reference points give get better precision than two. The first three reference points must not be placed near each other. Place them so they form a triangle. The forth point is used to verify the other three. Later when the program is running you will see a number after the map name. This number tells how far away the forth reference point is from a position calculated using the first three.

We recommend that you put your GPS in simulator mode and test the calibration on each map by going to some random positions.

lim <south-lat> <north-lat> <west-lng> <east-lng>

The coverage of the chart.

The area covered by the chart is given with south, north, west and east borders. Set the chart coverage a little smaller than the actual size so that the program will try to find another chart before reaching the edge.

The program will show the first chart in the list that fits. We recommend some overview maps last in the chart data file.

<south-lat> is the south border of the map and so on.

datum <n>

The chart datum of the image file is <n>. New charts are usually in WGS-84 which is the same as a GPS usually uses.

comp <lat_offset> <lng_offset>

If the charts are old they are probably not WGS-84. some GPS receivers can send positions translated to these old datums. Or you can use a "comp" line to tell the ChartPlotter to add an offset to the position data received from the GPS.

include <n>

Include charts data file <n>. This is useful if you have many charts. Then you can put then in different folders and include one charts.cfg file in each of those folders. It is recomended to have one charts.cfg file with only includes and then have one data file for each image file. You can have recursive includes. The program supports up to 1000 maps and if you have all in one folder it will be hard keep them in good order.

rem <t>

A free text message <t> to be shown in the title when this chart is used.

up