function out = nacti_souradnice(den,slozka)


den_str = num2str(den);

cil =  slozka + '\' + den + '\' + 'Vyrovnane_sour_' + den + '.txt';

fid = fopen(cil,'r');

radek1 = fgets(fid); % načte hlavičku
radek2 = fgets(fid);

data = fscanf(fid,'%s %s %s %*s', [38 inf])';
n1 = length(radek1);
n2 = length(radek2);
fseek(fid,n1+n2,'bof'); 

vyska = fscanf(fid,'%*s %*s %*s %f,%f', [2 inf])';

fclose(fid);

%% ID
id = data(:,2:5);
%% ŠÍŘKA
sirka_d = str2num(data(:,8:9)); 
sirka_m = str2num(data(:,11:12)); 
sirka_s = str2num(data(:,14:15)); 
sirka_dec = str2num(data(:,16:21));

sirka = dms2degrees([sirka_d sirka_m sirka_s+sirka_dec/100000]);

%% DÉLKA
delka_d = str2num(data(:,24:25)); 
delka_m = str2num(data(:,27:28)); 
delka_s = str2num(data(:,30:31)); 
delka_dec = str2num(data(:,33:37));

delka = dms2degrees([delka_d delka_m delka_s+delka_dec/100000]);

%% VÝŠKA
vyska = vyska(:,1) + vyska(:,2)/1000;

%% VÝSTUP
[s ~] = size(vyska);
den_vystup(1:s,1) = den;
out = table(id, sirka, delka, vyska, den_vystup,'VariableNames',{'STANICE','ŠÍŘKA','DÉLKA','VÝŠKA','DEN'});
