% how much of the test data to keep
% mod=16,cap=4 means take 64 samples (16 sensors, 4 offsets) from each
% location. That way the samples we save are evenly spaced around the
% robot, rather than a lot of useless repeated samples.
thin_mod = 16;
thin_cap = 4;
blur_var = 1.0;	% how much the votes are blurred to smooth out noise

% compute the sonar calibration function (linear)
coeff=fittyline;

% load the map data and thin it down to reduce computation time
load map.ext;
thin;

% parse the map data into columns
mappy

test_ind = 1;	% gets incremented in iter_one

% keep typing this to proceed:
tc_ary = [4 4 4 4 4 3 3 3 3 3 2 2 2 1 1 1];
for counter = 1:16,
	thin_cap = tc_ary(counter);
	iter_one;
	set(gca,'xlim',[-3000,7000]);
	set(gca,'ylim',[-4500,5000]);
	%set(get(ih,'parent'),'color',[0 0 0]); % doesn't work for print. :v(
	%print('-dtiff','-f1','-r72',sprintf('itermv%02d.tiff',counter));
	if (sum([1 6 11 16]==counter)),
		print('-deps','-f1',sprintf('itermv%02d.eps',counter));
	end
end
