Jump to content
The simFlight Network Forums

Telly

Members
  • Posts

    5
  • Joined

  • Last visited

Telly's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Dear Pete, Thank you for your reply. I will learn about the "Ultimste Traffic 2". This information might be very useful for me. I wish to express my gratitude deeply for having offered me the valuable information. Regards.
  2. Dear Peter, Thank you for your answer about my previous question. That results made me satisfy. By the way, I have another question and I want to ask for your wisdom. I want to create new AI traffic depend on "MY AI traffic database". I know the FS read AI traffic files (*.bgl) when the FS is starting. But, I want to create while FS is running. In addition, I also know FSUIPC can not create the AI aircraft, (but it can "control" the already existed AI aircraft). However, the "Traffic Explorer in FS SDK" can create AI aircraft. (Please see the attached JPEG file) Then, I realized that FS may have a way to accept the NEW AI Traffic. Because this tool send the new AI traffic to the FS. If I have a new "interface programs" like your FSUIPC, I can achieve the target. Do you have any idea to solve this problems? I am recognizing that this agenda deviates from this topics, but if you advise, I am very glad. Thank you!
  3. Dear Peter, Thank you for adequate advice. I BELIEVED the ID should be Positive number. Indeed, Microsoft Traffic Tool in SDK showed the ID (key) as the positive number. I was able to obtain registration number information safely by reversing the sign after ID had been converted into the decimal number. Regards Telly
  4. Dear Peter, Thank you for your reply. I tried to change my VB program and logged the FSUIPC result. But, the strings of detail information about AI did not obtained. My changed program and log are below: If you can find the reasons, please tell me. Thank you. ===== Public AI_airborne_AC_Detail_AI(48) As Byte STEP (1) - (5) abbreviation '////////////////////////////////////////////////////////////////////////////// ' (6) Read string result (up to 48 bytes including terminating zero) from D010 '////////////////////////////////////////////////////////////////////////////// booResult = FSUIPC_Read(&HD010&, 48, VarPtr(AI_ground_AC_Detail(1)), dwResult) booResult = FSUIPC_Process(dwResult) rem ==> Strings had been read by "Byte" type Variable LOG: 19373719 WRITE0 D004, 4 bytes: 01 00 00 00 19373719 READ0 D008, 4 bytes: BA FB 8D 01 19373719 WRITE0 D00C, 4 bytes: 25 00 00 00 19373719 WRITE0 D000, 4 bytes: 00 00 00 00 19373719 READ0 D008, 4 bytes: 07 CC 92 01 19373781 READ0 D010, 48 bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19373781 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19373781 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5. Dear colleagues and Peter, I want to obtain the full AI Traffic identity strings under the VB (Access-VBA). I described below function in VB, but I could not obtain the "Final Result String". I've checked some results in each steps. (1) No error at Step 1. (2) I could get the "Time_stamp". (Step2) (3) No error at Step3. (4) No error at Step4. (5) I could escape this loop because time stamp value had been changed in this STEP. (6) No error at Step5. Then the result is blank. In addition, ID_Long was quoted from the "TCAS table ID". The ID was confirmed by the compareing the ID in the "Traffic Toolbox (FS2004 SDK)". As the "Command_Type_Long", I substituted a value 1 (=Tail Number). Thanks, Regards, Telly ========= Function AI_Detail_Read(Command_Type_Long As Long, ID_Long As Long) Dim Result_Str As String Dim signature As Long Dim Time_Stamp As Long Dim Time_Stamp2 As Long signature = 0 '////////////////////////////////////////////////////////////////////////// ' (1) Write the selected command, from list below, to D004 (32-bit DWORD) '////////////////////////////////////////////////////////////////////////// booResult = FSUIPC_Write(&HD004&, 4, VarPtr(Command_Type_Long), dwResult) booResult = FSUIPC_Process(dwResult) '/////////////////////////////////////////////////// ' (2) Read the timestamp at D008 (32-bit DWORD) '/////////////////////////////////////////////////// booResult = FSUIPC_Read(&HD008&, 4, VarPtr(Time_Stamp), dwResult) booResult = FSUIPC_Process(dwResult) '///////////////////////////////////////////////////////////////////////////////// ' (3) Write the AI id (from the TCAS table, see earlier) to D00C (32-bit DWORD) '///////////////////////////////////////////////////////////////////////////////// booResult = FSUIPC_Write(&HD00C&, 4, VarPtr(ID_Long), dwResult) booResult = FSUIPC_Process(dwResult) '//////////////////////////////////////////////// ' (4) Write a signature to D000 (32-bit DWORD) '///////////////////////////////////////////////// booResult = FSUIPC_Write(&HD000&, 4, VarPtr(signature), dwResult) booResult = FSUIPC_Process(dwResult) '/////////////////////////////////////////////////// ' (5) Wait till the timestamp in D008 changes. '/////////////////////////////////////////////////// Time_Stamp2 = Time_Stamp Do Until Time_Stamp <> Time_Stamp2 booResult = FSUIPC_Read(&HD008&, 4, VarPtr(Time_Stamp2), dwResult) booResult = FSUIPC_Process(dwResult) Debug.Print "Timestamp2=" & Time_Stamp2 & " " & Now() Loop '////////////////////////////////////////////////////////////////////////////// ' (6) Read string result (up to 48 bytes including terminating zero) from D010 '////////////////////////////////////////////////////////////////////////////// booResult = FSUIPC_Read(&HD010&, 48, VarPtr(Result_Str), dwResult) booResult = FSUIPC_Process(dwResult) '///////////////////////// ' Final Result Display '///////////////////////// MsgBox "Final Result= " & Result_Str AI_Detail_Read = Result_Str End Function ====
×
×
  • 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.