Jump to content
The simFlight Network Forums
Bryn

_TCAS_DATA id = 0???

Recommended Posts

Hi Peter,

I'm grabbing the TCAS data tables and am stumbling across a bunch of AI that have id set to zero (even though idATC is valid and the plane exists in the sim). I should add that I'm setting range to unlimited at E068 and F068 prior to grabbing the table.

Have you seen this before - that is, aircraft in the table with ids set to zero? It's a pain, because I can't do anything with them (for instance, the program I have deletes AI with the same callsign and flight number as me).

eg,

_ALL_AI thisScan (_ALL_AI is a collection of the 4 tcas tables)

FSUIPC_Read(0xF080, 3840, &thisScan.tcas1Air, &dwResult)

process

loop through 96 slots,

cout << thisScan.tcas1Air.id;

For me, some of these have idATCs for planes that are active and ids set to 0.

Cheers,

Bryn.

Share this post


Link to post
Share on other sites

I'm grabbing the TCAS data tables and am stumbling across a bunch of AI that have id set to zero (even though idATC is valid and the plane exists in the sim). I should add that I'm setting range to unlimited at E068 and F068 prior to grabbing the table.

As it clearly states in the documentation, entries with zero ID are empty slots. the data in the other fields would have been relevant to the previous occupant. FSUIPC only sets the ID to zero when an aircraft disappears, it is inefficient for it to clear al the rest of the stuff, not just for it but for any WideFS clients it is being sent to.

For me, some of these have idATCs for planes that are active and ids set to 0.

If they are active still they will be present in another slot. They may have temporarily disappeared, and got another slot when they reappeared. Please simply ignore all slots with a zero ID. That's the only indicator of an empty slot.

Pete

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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.