Autor Beitrag
jostmario
Hält's aus hier
Beiträge: 1



BeitragVerfasst: Mi 17.02.10 00:52 
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
ausblenden 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
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mi 17.02.10 01:08 
Float wird i.allg. als Single definiert.
Float64 ist Double.

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."