Jump to content
The simFlight Network Forums

SeattleSleeper

new Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Pennsylvania

SeattleSleeper's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Pete, Thank you for your prompt and helpfull reply! Lack of practice in C/C++. It's been 15-20 years since I've had the need to code any C. I'm not planning on using the Gauge SDK. This is the ground work for a rather unusual application. It will be used in Multiplayer in conjunction with B17 bomber missions with a few "aggressor" aircraft thrown into the mix. Right now I'm calling it the "Boge Module." The application will be timer event driven to; 1. Collect the TCAS data of all multi-player aircraft 2. Search the idATC for a string subset, (FW, Bf, ME, Do, etc…) 3. Compute convergence/divergence with the bomber stream 4. Trigger B17 crew voice over for converging "Bogies" 5. Detect close proximity of the "Bogies" to your aircraft (gun run) 6. Trigger audio of B17 guns defending against the "Boge", more crew voice over and shell strikes on the B17 airframe. 7. Compute a random chance of damage to the B17 and inflict damage using a write to local panel variables. I've been able to do a similar module for FLAK for the B17 using Lua, Lvars and a table of lat,lon where our FLAK controllers are placed. It works quiet well. We call it the "Pucker Module." It randomly inflicts anything from a few cylinder failures to engine fires and total system failures. The guys never look at FLAK the same way after one flight with the "Pucker." QUESTION: What method can I use to read/write local panel variables from this WIN32 application? Thanks, Terry Terry
  2. Hi Pete, After a little more research, I've determined this is something much more suited to C/C++. Also, it seems the information I want from TCAS is better collected from offet 0xF080. Something like this (without the open, close and error checking); struct TCAS { // TCAS_Table Structure DWORD ID; float lat; float lon; float alt; WORD hdg; WORD gs; short vs; char idATC[15]; BYTE bState; WORD com1; } MyTable[96]; unsigned int tcas_len = 96; unsigned int tcas_base = 0xF080; unsigned int tcas_offset = 0x0028; unsigned int tcas_ID = 0x0000; unsigned int tcas_lat = 0x0004; unsigned int tcas_lon = 0x0008; unsigned int tcas_alt = 0x000C; unsigned int tcas_hdg = 0x0010; unsigned int tcas_gs = 0x0012; unsigned int tcas_vs = 0x0014; unsigned int tcas_idATC = 0x0016; unsigned int tcas_bState = 0x0025; unsigned int tcas_com1 = 0x0026; unsigned int i; for(i = 0; i <= tcas_len; i++) { FSUIPC_Read(tcas_base+(i * tcas_offset), sizeof(DWORD), (void*)&MyTable.ID, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_lat, sizeof(float), (void*)&MyTable.lat, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_lon, sizeof(float), (void*)&MyTable.lon, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_alt, sizeof(float), (void*)&MyTable.alt, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_hdg, sizeof(WORD), (void*)&MyTable.hdg, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_gs, sizeof(WORD), (void*)&MyTable.gs, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_vs, sizeof(short), (void*)&MyTable.vs, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_idATC, 15, MyTable.idATC, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_bState, sizeof(byte), (void*)&MyTable.bState, &dwResult); FSUIPC_Read(tcas_base+(i * tcas_offset)+ tcas_com1, sizeof(WORD), (void*)&MyTable.com1, &dwResult); } FSUIPC_Process(&dwResult); QUESTION#1 Should I put the "FSUIPC_Process" inside the loop? (too many reads to do at once with it outside the loop?) QUESTION#2 If i use an external Win32 exe, will this also have less impact on the FSX VAS? Thanks, Terry
  3. Apologies for the double post, can't figure how to delete this one. Hi All, I’m looking for a Lua example of how to read the TCAS table at 0xD000 into a Lua table. I’ve written quite a bit of Lua so I’m confident I can cobble it together. However, I’m a big fan of reuse, and why reinvent the wing. Can anyone direct me to such an example? Thanks in advance. SeattleSleeper
  4. Hi All, I’m looking for an example Lua script that will read the TCAS table at offset 0xD000. I’ve written a fair amount of Lua in the past, so I’m sure I can cobble it together. However, I’m a big fan of module reuse and why reinvent the wing? Can anyone direct me to such an example? Thanks in anvance. SeattleSleeper
×
×
  • 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.