Ahoj, tu unitu jsem doposlal, to jsem si neuvědomil, pardon.
Test:
program Test102;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
GpsWgs84 in 'GpsWgs84.pas',
GpsCoord in 'GpsCoord.pas';
procedure Test;
var Sirka, Delka: double;
JtskX, JtskY: double;
Jtsk: tMapCoord;
begin
Sirka:=50.09201666532517;
Delka:=14.403979936322918;
WGS84toJTSK(Sirka, Delka, Jtsk);
writeln('Sirka = ', Sirka:14:11, ', delka = ', Delka:14:11, ', JTSK Y = ', Jtsk.Y:14:6, ', JTSK X = ', Jtsk.X:14:6);
JTSKtoWGS84(Jtsk, Sirka, Delka);
writeln('Sirka = ', Sirka:14:11, ', delka = ', Delka:14:11, ', JTSK Y = ', Jtsk.Y:14:6, ', JTSK X = ', Jtsk.X:14:6);
WGS84toJTSK(Sirka, Delka, Jtsk);
writeln('Sirka = ', Sirka:14:11, ', delka = ', Delka:14:11, ', JTSK Y = ', Jtsk.Y:14:6, ', JTSK X = ', Jtsk.X:14:6);
end;
begin
Test;
readln;
end.
Na výstupu:
Sirka = 50.09201666533, delka = 14.40397993632, JTSK Y = 743965.133957, JTSK X = 1042342.849943
Sirka = 50.09201660261, delka = 14.40397991119, JTSK Y = 743965.133957, JTSK X = 1042342.849943
Sirka = 50.09201660261, delka = 14.40397991119, JTSK Y = 743965.136691, JTSK X = 1042342.856607