Entwickler-Ecke

Windows API - FSUIPC OFFSET aus Flight Simulator auslesen


jostmario - Mi 17.02.10 00:52
Titel: FSUIPC OFFSET aus Flight Simulator auslesen
Hallo

Möchte ein Wert aus dem Microsoft Flight simulator auslesen

$3070 Lenght 8 Byte
Z (longitudinal, or forward/backward) acceleration in ft/sec/sec relative to the body axes (see Note at end of table). This is in double floating point format (FLOAT64). [FS2000 and later]

das mache ich so

Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Var GForce:float;
begin
     if FSUIPC_Read($30708, @GForce, dwResult) then
           begin
               IF FSUIPC_Process(dwResult) then
                   begin

                   gForcex:=gforce/625;
                    label34.caption:=floattostr(GForcex);
                   end;
           end;
end;

aber der bringt falsche werte da es anscheinden ein Float64 ist
wie kann ich das umsetzen

evtl aufteilen einmal $3070 ,4
und einmal $3074,4
oder so



Gruß Josty

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Moderiert von user profile iconNarses: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mi 17.02.2010 um 00:25


Martok - Mi 17.02.10 01:08

Float wird i.allg. als Single definiert.
Float64 ist Double.