Jump to content
The simFlight Network Forums

Jasper Bussemaker

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Jasper Bussemaker

  1. Private Type TCAS_DATA id As DWORD 'This one (DWORD), as I saw, is declared within the FSUIPC.bas (module).., so it not even standard in VB...... lat As Single lon As Single alt As Single hdg As Integer gs As Integer vs As Integer idATC As String * 15 bState As Byte com1 As Integer End Type Dim AI() As String, AI2() As TCAS_DATA 'Define AI as a string array and AI2 as a TCAS_DATA array ReDim AI2(0 To 96) 'Define the length of the AI2 array (96) If FSUIPC_Read(&HF080, 3840, VarPtr(AI2), dwResult) Then 'Read data from offset F080 with length 3840 (96x40) into array AI2... (but doesn't work) If FSUIPC_Process(dwResult) Then 'If the processing returned no error ReDim AI(0 To 96, 0 To 6) 'Define the length (2D) of the AI array, this is the array in which the usable data (for my application) will be stored. a = 0 For i = 0 To 96 'Cycle all the 96 entries of AI2. If AI2(i).id <> 0 Then AI(a, 0) = AI2(i).id 'Assign the needed values to the AI array AI(a, 1) = AI2(i).lat AI(a, 2) = AI2(i).lon AI(a, 3) = AI2(i).alt AI(a, 4) = AI2(i).hdg AI(a, 5) = AI2(i).gs AI(a, 6) = AI2(i).idATC a = a + 1 End If Next End If End If This doesn't work.... :( :cry: This is what goes wrong: When running this code, VB returnes a 'Type mismatch' and selects the AI2 in between the VarPtr VarPtr appears to be a function (standard in VB) to convert the supplied variable into a Long type (because this is needed by the FSUIPC_Read function). The variable needed to be supplied for the VarPtr function, can be anything, so in my opinion it is weird to have a type mismatch....
  2. Yeah sorry, but I was editing my last post continuously, sorry for that... So some things of your last post, are not content of MY as post :) Private Type TCAS_DATA id As DWORD lat As Single lon As Single alt As Single hdg As Integer gs As Integer vs As Integer idATC As String * 15 bState As Byte com1 As Integer End Type I used the Integer instead of the WORD (Because VS has no WORD), because in the MSDN library it states that it is a 16-bit variable... I made this, does it seem OK?
  3. Well, I program in VB, and I learned it myself, with a bit of help from my father... I just look a look at declaring Types (is this what you mean?) and I will try this in my application. Private Type TCAS_DATA id As DWORD lat As Single lon As Single alt As Single hdg As Integer gs As Integer vs As Integer idATC As String * 15 bState As Byte com1 As Integer End Type Goog type declaring. I used the Integer instead of the WORD (Because VS has no WORD), because in the MSDN library it states that it is a 16-but variable... If you look at FSInterrogate, it states the Var. Type, which is sometimes 8, 16 or 32 bits. So I guess we are confusing bits and bytes now... :( Greeting jasper
  4. I got it I think :o I set fsInterrogate to 'inverstigate' the variables and suddently if gives all these different things (lat,lon,hdg,alt) but then 96 versions (slots) of it!!!!!! Thats not fair, because you do not mention anywhere in your documentation which offsets I must read to get the next airplane!!!!! This is not funny: http://msdn.microsoft.com/en-us/library/aa263420(VS.60).aspx Because there is no data type which stores 32 bytes! :( But I got it now, the only thing is, there is no data returned while requesting it from FSUIPC, but thats about the data types (and their storage size; 8,16,32 byte)... So I need to fix that... Greetings, Jasper
  5. :shock: I thought I needed the 'Read full AI identity string' part... But I apparently need the F2004/2 AIR traffic data (sorry!)... And yes, I did pretty much programming before, if you look at http://www.utr-online.com, there are several applications, which are in my opinion very sophisticated.... Like the WCG, which generates clearances and the UTR which reads a timetable file and display it... Well, I have to admit the FSUIPC module must be more sophisticated... I think the problem is that, I don't really understand your programming architecture and the way you explain it in your documentation, so that's a pity... Furthermore, I am not stupid, I am 15 years old and just about to go to the 4th grade of the VWO (I even did the TTO (see wikipedia article) for 2 years, but the school was no fun and the english part of the school didn't make the school much more challenging for me) :wink: , maybe the problem is that sometimes I just ask help a bit too fast (cause I am lazy :))... I am going to experiment more today... Greetings, Jasper
  6. :lol:, but I mean things like the tailnr... Well, actually, I do have the FSUIPC SDK, and I used the VB example and the fsInterrogate.exe application for the most programming work. But that were things like heading, gndspeed and so on (so only reading). I have no experience whatsoever with writing data to FSUIPC. And in your guide for the TCAS (the front section of the Programmers Guide as you said), you also not tell what length and what type the written and read variable must be. Because I different bit lengths (8, 16, 32 bit) return different outputs... Or do I need to use fsInterrogate for that? Let's mention something positive now :D : I really like your response time on the forum!:D:D :wink: BTW: I almost finished programming on the structure needed for the application to work, the only thing I need is the actual data itself! Greeting, Jasper
  7. lol, this was about the data I needed :) Sorry for the vague questions :( But can you tell me then, what offsets I must read to get the data of the airborne traffic (because only airborne traffic is shown on a TCAS) and what type of variable they return? I suppose a string (ASCII)? Thank you
  8. If you look at this application (one of the two most known FS-Google Earth links), it is able to put the AI or Multiplayer traffics into Google Earth, in 3D. That's the only thing I need to do. So the data I need is: Tail nr (or log in name on the networks), Position (Lat/Lon), altitude, heading and gs. I just put the AI trfc @ EHAM on 100% and started TrafficLook.exe and saw it took such a long time to load, I suppose I will have to make the update time of the GPS (at least for the traffic data) longer than 1 second :P So if I am right, the online client (SB or IvAp) must inject the online traffics into the TCAS table, otherwise FSUIPC doesn't know they exist? And this means I have to read the TCAS to know where the online traffics are? So if I want to read data from the TCAS table, I first have to supply a number of the slot I want to read to an offset? It all doesn't seem that clear to me...:( Greeting, Jasper
  9. Yeah 8) , The version now online are already working PERFECT with use of your FSUIPC :). It can log your flight and display it afterwards in Google Earth, or immediately display your flight in Google Earth (while flying). So I want to add a new function (well, actually two): 1. When running in realtime mode, display the AI/Multiplayer traffics (In my case multiplayer, as I fly mostly online @ IVAO). This will be in 3D... 2. A TCAS on the main screen!! :) I will try to understand and read the documentation (and try TrafficLook), thank you. Greeting, Jasper
  10. Hello Peter, I am developing an application which links FS to Google Earth (http://www.utr-online.com/GPS60.htm). But I now want to add the function to display AI/Multiplayer traffic. Screenie: The problem is, I don't have a clue how the data transferring works, because how I want the data, is actually in a kind of array with all the information related to all the active AI/Multiplayer traffics. While testing some offsets, they returned """ (empty string). How do I use the FSUIPC offsets related to AI/Multiplayer traffic? Greeting, Jasper
×
×
  • 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.