Hello,
I tryed to read out the aircraft position Longitude and Latitude
here is my code:
procedure TForm1.Button5Click(Sender: TObject);
var dwresult : dword;
Longitude : int64;
Latitude : int64;
lat , lon : extended;
begin
FSUIPC_read($0568,8,@Longitude,dwresult);
FSUIPC_read($0560,8,@Latitude,dwresult);
if FSUIPC_Process(dwResult)then
begin
lat := latitude * 90 / (10001750.0 * 65536.0 * 65536.0);
lon := Longitude * 360 / (65536.0 * 65536.0 * 65536.0 * 65536.0);
showmessage(inttostr(Latitude) + ' / ' + floattostr(lat)); //shows correct value
showmessage(inttostr(Longitude) + ' / ' + floattostr(lon)); // shows invalid value
end;
end;
the problem is that I do not get a correct value for the Longitude.
example EDDF N50* 1.66' / E8* 32.09'
results are 50,0277.... (correct) and -0.465... (incorrect)
What is not correct on my code?