Jump to content
The simFlight Network Forums

Even92LN

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Norway

Recent Profile Visitors

967 profile views

Even92LN's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I managed to read and write values 'directly' from FSUIPC using Node.js today. I used the C-language SDK and edited FSUIPC_User.h to export its functions (FSUIPC_Open, FSUIPC_Read, etc) before I compiled the code (FSUIPC_User.h, IPCuser.h, IPCuser.c) as a DLL in Visual Studio. I then used the package node-ffi to load the DLL into node and call the DLL's functions. Seems to work well - reads at 10 ms intervals without problems :) Edit: You might have some luck using a module like node-ipc too.
  2. @Paul: You are totally right, I will try that! @Pete: I have asked the tester with the problem to try the FSUIPC logger, but I haven't got any feedback yet. However, he found that it only happens when he's flying the iFly 737. I will wait and see if Paul's suggestion did the trick, otherwise I will ask him once again to try the FSUIPC logger. EDIT: looks like problem is solved! :) Thanks to both of you for your time!
  3. Thanks for reply, Pete! "Nor738" is the actual aircraft name, but for some reason it's mixed with VOR names (?) and other aircrafts.. The problem is that my application is supposed to log and notify the virtual airline each time the pilot change aircraft (in other words: each time the aircraft string change). I'm writing in C#. This is the complete code: int typeToken = 0; fsuipc.FSUIPC_Read(0x3D00, 256, ref typeToken, ref dwResult); fsuipc.FSUIPC_Process(ref dwResult); byte[] type = new byte[256]; if (fsuipc.FSUIPC_Get(ref typeToken, 256, ref type)) { string tmp = System.Text.Encoding.ASCII.GetString(type).TrimEnd('\0'); if(tmp.Length > 1) current_aircraft = tmp; } I'm using String.TrimEnd('\0'); to remove all characters after the first terminating zero.
  4. One of my beta testers that are using FS9 get some very trange begaviour from the aircraft type offset 3D00. Using this code: int typeToken = 0; byte[] type = new byte[256]; fsuipc.FSUIPC_Read(0x3D00, 256, ref typeToken, ref dwResult); fsuipc.FSUIPC_Process(ref dwResult); fsuipc.FSUIPC_Get(ref typeToken, 256, ref type); "New aircraft" is written each time the aircraft type changes, and the tester has been using the same aircraft during the entire flight. This is the log: [18:39] Aircraft: Nor738anawk 172SP [18:39] New aircraft: Nor738D (BERGEN)SP [18:39] New aircraft: Nor738BERGEN)N)SP [18:43] New aircraft: Nor738 AEN)N)SP [18:43] New aircraft: Nor738D (BERGEN)SP [18:47] New aircraft: Nor738BERGEN)N)SP [18:51] New aircraft: Nor738anEN)N)SP [18:51] New aircraft: Nor738BERGEN)N)SP [18:51] New aircraft: Nor738 AEN)N)SP [18:51] New aircraft: Nor738D (BERGEN)SP [18:51] New aircraft: Nor738BERGEN)N)SP [18:55] New aircraft: Nor738 AEN)N)SP [18:55] New aircraft: Nor738D (BERGEN)SP [18:56] New aircraft: Nor738anERGEN)SP [18:56] New aircraft: Nor738D (BERGEN)SP [18:59] New aircraft: Nor738BERGEN)N)SP [19:02] New aircraft: Nor738anEN)N)SP [19:02] New aircraft: Nor738BERGEN)N)SP [19:03] New aircraft: Nor738 AEN)N)SP [19:03] New aircraft: Nor738D (BERGEN)SP [19:03] New aircraft: Nor738BERGEN)N)SP [19:05] New aircraft: Nor738anEN)N)SP [19:05] New aircraft: Nor738BERGEN)N)SP [19:07] New aircraft: Nor738 AEN)N)SP [19:07] New aircraft: Nor738D (BERGEN)SP [19:08] New aircraft: Nor738anERGEN)SP [19:08] New aircraft: Nor738D (BERGEN)SP [19:11] New aircraft: Nor738BERGEN)N)SP [19:11] New aircraft: Nor738ERGEN)N)SP [19:15] New aircraft: Nor738AEN)N)SP [19:15] New aircraft: Nor738 AEN)N)SP [19:15] New aircraft: Nor738BERGEN)N)SP [19:15] New aircraft: Nor738anEN)N)SP [19:15] New aircraft: Nor738BERGEN)N)SP [19:19] New aircraft: Nor738AEN)N)SP [19:21] New aircraft: Nor738anEN)N)SP [19:21] New aircraft: Nor738AEN)N)SP [19:21] New aircraft: Nor738 AEN)N)SP [19:23] New aircraft: Nor738anEN)N)SP [19:23] New aircraft: Nor738 AEN)N)SP [19:23] New aircraft: Nor738anEN)N)SP [19:23] New aircraft: Nor738 AEN)N)SP [19:24] New aircraft: Nor738anEN)N)SP [19:41] New aircraft: Nor738 09EN)N)SP [19:42] New aircraft: Nor738anEN)N)SP [19:42] New aircraft: Nor738 09EN)N)SP [19:42] New aircraft: Nor738anEN)N)SP [19:42] New aircraft: Nor738 09EN)N)SP [19:45] New aircraft: Nor738anEN)N)SP [19:45] New aircraft: Nor738 09EN)N)SP [19:55] New aircraft: Nor738anEN)N)SP [19:55] New aircraft: Nor738 09EN)N)SP [19:58] New aircraft: Nor738anEN)N)SP [19:58] New aircraft: Nor738 09EN)N)SP I have not experienced this in my FS9. He has no problem with FSX. Any idea what might cause this?
  5. You need one variable to hold current flag and one to hold the previous flag. if (previous_onGndFlag != current_onGndFlag) { if (current_onGndFlag == 1) { // - save the data you need - } previous_onGndFlag = current_onGndFlag; // update previous_onGndFlag } For example...
  6. When the "on ground" flag (0366) goes from 0 to 1, save the vertical speed and all the other data you need. I suggest you create a set of variables (speed, v/s, altitude, lights etc) and an infinite loop that reads from FSUIPC and updates these variables.
  7. Thanks Paul, I'll have al look at your example code.. Yes, I'm using your DLL ;)
  8. Hi! I'm working on an external application for FS9, FSX and P3D. What is generally the best way to detect when FS is closed or crashes? Even
  9. Thanks alot, Paul! I will give it a try! EDIT: Looks like that did the trick. Thanks for your help!
  10. Using this code in C# (.NET v4) i get very strange outputs from the "on ground flag". public int getIsOnGround() { bool result = false; int dwResult = -1; int token = -1; result = fsuipc.FSUIPC_Read(0x0366, 2, ref token, ref dwResult); result = fsuipc.FSUIPC_Process(ref dwResult); result = fsuipc.FSUIPC_Get(ref token, ref dwResult); return dwResult; } This is from a test I did with FSX: Before first takeoff: 1 After takeoff: 262145 After landing: 262144 After new takeoff: 262145 After landing: 262144 What am I doing wrong? Best regards, Even
×
×
  • 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.