Jump to content
The simFlight Network Forums

bearcattom

Members
  • Posts

    6
  • Joined

  • Last visited

About bearcattom

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

bearcattom's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Pete, Thanks to your pointers, I have determined the problem. According to this MSDN Article... http://msdn.microsoft.com/library/defauations.asp “The Windows Service classes supported by the .NET Framework do not support interaction with interactive stations, that is, the logged-on user. The .NET Framework also does not include classes that represent stations and desktops. If your Windows Service must interact with other stations, you will need to access the unmanaged Windows API.” Thus, I'll have to figure out how to access the interactive station (same one FSUIPC is accessing). Tom
  2. Hello, I am trying to write a .NET Windows Service that consumes FSUIPC for messaging FS data. When I call FSUIPC_Open (included in SDK), I am unable to return the FSUIPC or FS versions. I turned on logging in FSUIPC and it yielded the following: 345827 IPC ERROR: Cannot OpenFileMapping 346027 IPC ERROR: Cannot OpenFileMapping 346228 IPC ERROR: Cannot OpenFileMapping 346428 IPC ERROR: Cannot OpenFileMapping 346628 IPC ERROR: Cannot OpenFileMapping I assume this is a security issue with the shared file mapping created by CreateFileMapping(). Any suggestions to fix this issue are much appreciated. Tom
  3. I'm not sure how to get at the aircraft's TCAS table. According to the SDK, "There are four tables, two main ones at E000 to EFFF for ground aircraft and F000 to FFFF for airborne aircraft, plus two smaller additional ones for FS2004 only at D000 and D800 respectively." If I have a FlightSim instance running with just 1 aircraft sitting on the ground, how do I access it's TCAS table. Do I first call FSUIPC_Read and pass in F000? Then, if that is successful, how do I access the bState value? Thanks so much for your help. Tom
  4. Even just pseudocode of what methods to call and what values to pass to FSUIPC. e.g. FSUIPC_Read(offset value?) FSUIPC_Process FSUIPC_Get
  5. Pete, Thanks much for your reply. :D I am referring to the TCAS_DATA structure mentioned in the "FS2002/4 A.I. Traffic Data (for TCAS applications and similar)" section of the SDK. I am trying to figure out how to read whether the aircraft is in flight plan, pushback, taxi, etc. from C#. VB code would do as well. Tom typedef struct _TCAS_DATA { DWORD id; // 0 = empty, otherwise this is an FS-generated ID. (Do not use this for anything other than checking if the slot is empty or used—it may be re-used for other things at a later date). float lat; // 32-bit float, in degrees, –ve = South float lon; // 32-bit float, in degrees, –ve = West float alt; // 32-bit float, in feet WORD hdg; // 16-bits. Heading. Usual 360 degrees == 65536 format. // Note that this is degrees TRUE, not MAG WORD gs; // 16-bits. Knots Ground Speed short vs; // 16-bits, signed feet per minute V/S char idATC[15]; // Zero terminated string identifying the aircraft. By default this is: // Airline & Flight Number, or Tail number // For Tail number, if more than 14 chars you get the *LAST* 14 // Airline name is truncated to allow whole flight number to be included BYTE bState; // Zero in FS2002, a status indication in FS2004—see list below. WORD com1; // the COM1 frequency set in the AI aircraft’s radio. (0Xaabb as in 1aa.bb) } TCAS_DATA; The “bState” value is new for FS2004. When non-zero it gives the current status of the AI aircraft, as follows: 0x80 128 Initialising 0x81 129 Sleeping 0x82 130 Filing flight plan ....
  6. Hello, How can I using FSUIPC from C# read the bState value for a particular aircraft. I know there is mention of the table structures in the SDK but how do I read this information. Thanks much for any help. P.S. I'm looking for code samples not just RTFM. Tom
×
×
  • 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.