Jump to content
The simFlight Network Forums

Michael A

Members
  • Posts

    21
  • Joined

  • Last visited

About Michael A

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

Michael A's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi again, Never mind, I worked it out. Hdg.Caption := CurrtoStr(heading*360.0/(65536.0*65536.0))+'º'; Then I just did the TRUE to MAG conversion and all is now fine. Cheers, Mick
  2. Hi guys, Im still having a problem with the heading equation for offset 0580. Code snippet below... var heading : DWord; begin FSUIPC_Read($0580, 4, @heading, dwResult); Hdg.Caption := FloattoStr(heading*360/(65536*65536))+'º'; end; Its the only problem i seem to be having and it looks simple in the programmers guide. Any help? Cheers Mick.
  3. Thank you CATIII, Exactly what I was looking for. Well Done =) Regards, Michael. PS. I have all the stuff i need now, but the only part that has me a little baffled is the heading equation.
  4. Hello, Things are going wonderful now. I just have a question for a delphi programmer that has successfully got the latitude and longitude to display correctly. The offset table guide to this section is just a little hard to understand. Your help is appreciated. Thankyou, Michael.
  5. LOL pete, You can rest easy now, the entire thing works wonders ! Thx =) Kind Regards, Mick. PS: I never doubted you for a second :wink:
  6. Hi Pete, Hope you didnt take that last post the wrong way matey. But thanks for the info. No I am not going to ask for a freeware key if in fact you havent done it before. I just read in about 5 different places that access keys are free if I am not intending to make people pay for my software. I understand now that it is for the "users of my software" that get it free. So in that case, i'll bite the bullet and just purchase it. If a key wasnt needed to do this simple thing, I wouldnt of been here in the first place. So you wont be asked for too much support. I have been writing commercial software packages for 10 years, I just found it extremely hard (after reading SDK guides several times) to understand what exactly the key was for and if needed in my situation. FSUIPC is only a hobby for me and wasnt going to be released to anyone in any case. Anyway, I'll just go ahead and purchase it and see what eventuates. So I will not require a key from you personally, but thanks. Thank you for all your help and patients (if any left - lol) and to you too CAT, I'm sure it'll all work when I purchase it. Kind Regards, Michael.
  7. Where is the application? Dont say the link on that sticky note page, they all ask for payment. How does somebody know where they issue access keys that its freeware without having a finished product first? i mean, i need a key to even get a small program that only requires an altitude read out to work. And thats going to cost me? If i purchase it, and find out something is not going to work, therefore not suiting the purpose, i would have wasted money? Anyhow, my opinion. =) Mick. Also, Pete, can you remove that email address of mine you quoted from the forum thankyou. =)
  8. Yeah, after a FS restart I finally got the "not accredited" message. I just thought if i was learning how to use it first I wouldnt need to register it for such a simple test program. Thx for your help tho CATIII, much appreciated =) Thx, Michael.
  9. CAT, I used exactly the source you sent me. Didnt modify it in anyway what so ever. It is just about identicle to mine too. But I'll post the .pas code here... // Delphi <-> FSUIPC/WideFS Communication Version 1.004 // Copyright © 2000 by Pelle F. S. Liljendal pelle@liljendal.dk // All Rights Reserved // // MainForm.pas // // Example-program demostrating how to use FPCuser.pas (based on C-source // by Peter Dowson) // // (Modified by Chris Brett to add support for FS2002 UIPC compatibility.) // (chris@formulate.clara.net) // //----------------------------------------------------------------------------- unit MainForm; interface uses Windows, Messages, SysUtils, Classes, Controls, Forms, StdCtrls, ExtCtrls; Const ResultText : Array[0..15] of String = ('Okay', 'Attempt to Open when already Open', 'Cannot link to FSUIPC or WideClient', 'Failed to Register common message with Windows', 'Failed to create Atom for mapping filename', 'Failed to create a file mapping object', 'Failed to open a view to the file map', 'Incorrect version of FSUIPC, or not FSUIPC', 'Sim is not version requested', 'Call cannot execute, link not Open', 'Call cannot execute: no requests accumulated', 'IPC timed out all retries', 'IPC sendmessage failed all retries', 'IPC request contains bad data', 'Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC', 'Read or Write request cannot be added, memory for Process is full'); SimulationText : Array[0..6] of String = ('Any', 'FS98', 'FS2K', 'CFS2', 'CFS1', 'FLY', 'FS2002'); type TFormMain = class(TForm) ButtonOk : TButton; Timer1: TTimer; StaticText1: TStaticText; StaticText2: TStaticText; StaticText3: TStaticText; Label5: TLabel; Label1: TLabel; Label2: TLabel; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure ButtonOkClick(Sender: TObject); procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var FormMain: TFormMain; implementation {$R *.DFM} Uses FPCuser; procedure TFormMain.FormCreate(Sender: TObject); var dwResult : DWORD; begin // Try to connect to FSUIPC (or WideFS) if FSUIPC_Open(SIM_ANY, dwResult) then begin FormMain.Caption := FormMain.Caption + ResultText[dwResult]; Timer1.Enabled := True; end else begin // Unable to "Connect" FormMain.Caption := FormMain.Caption + ResultText[dwResult]; end; end; procedure TFormMain.FormClose(Sender: TObject; var Action: TCloseAction); begin FSUIPC_Close; end; procedure TFormMain.ButtonOkClick(Sender: TObject); begin Close; end; procedure TFormMain.Timer1Timer(Sender: TObject); var dwResult:DWORD; height:DWord; Altitude:Word; IAS: DWord; begin Timer1.Enabled := False; // avoids 'overlapping' of Timer events, suggest 50 to 100ms FSUIPC_Read($0020, 4, @height, dwResult); FSUIPC_Read($02BC, 4, @IAS, dwResult); FSUIPC_Read($0574, 2, @Altitude, dwResult); // Altitude in meter; * 3,28084 gives feet FSUIPC_Process(dwResult); Label5.Caption := IntToStr(round(height * 3.28084 / 256)) + ' ft'; Label2.Caption := IntToStr(round(IAS / 128)) + ' kt'; Label1.Caption := IntToStr(round(Altitude * 3.28084)) + ' ft'; Timer1.Enabled := True; end; end. Cheers, Michael.
  10. And another FSUIPC applications are working ok. Like for instance FSInterrogate Mick.
  11. Oh, and so you know, i am already flying at 14,000 ft and 300IAS when testing this. Mick. PS. You never know, all this small detail may help.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.