Priyasloka Arya Posted October 13, 2012 Report Posted October 13, 2012 <p>Hi I was trying to simulate TCAS traffic on FS2004 using FSUIPC V4.999W and later verifying the TCAS info via Pete's TrafficLook tool. I simulated a plane and could see the plane on Traffic look. ------------------------------------- AI.id=0xFFFFFFF5; AI.lat=47.431507; AI.lon=237.692002-360; AI.alt=432; AI.hdg=62697; AI.gs=95; AI.vs=817; strcpy(AI.idATC,"N72577"); AI.bState=0x8C; AI.com1=0x2010; FSobj.WriteAndProcess(0x1F80,sizeof(TCAS_DATA),&AI); ----------------------------------------------------------------------- AI is a TCAS_DATA data type. Offset is 0x1F80 I am unable to simulate more planes, i do not know what i am doing wrong. Next offset i am choosing 0x1F80+sizeof(TCAS_DATA),& Am i missing anything
Paul Henty Posted October 13, 2012 Report Posted October 13, 2012 I am unable to simulate more planes, i do not know what i am doing wrong. Next offset i am choosing 0x1F80+sizeof(TCAS_DATA),& Am i missing anything Hi, You need to write every plane to 0x1F80. You don't add sizeof(TCAS_DATA) every time. You can write multiple planes to 0x1F80 before calling Process(). Even though they all have the same offset they won't overwrite each other because offsets do not refer to real memory locations. They are just tokens that tell FSUIPC what to do with the data. Paul
Priyasloka Arya Posted October 14, 2012 Author Report Posted October 14, 2012 thanks. i tried accordingly , it is working. Here enclosed code snippet -------------------------------------------------------- AI.id=1; AI.lat=47.431507; AI.lon=237.692002-360; AI.alt=432; AI.hdg=62697; AI.gs=95; AI.vs=817; strcpy(AI.idATC,"MY PLANE1"); AI.bState=0x8C; AI.com1=0x2010; FSobj.Write(0x1F80,sizeof(TCAS_DATA),&AI); //setting autopilot master switch strcpy(AI.idATC,""); AI.id=5; AI.lat=48.431507; AI.lon=123.0; AI.alt=832; AI.hdg=62697; AI.gs=95; AI.vs=817; strcpy(AI.idATC,"MY PLANE2"); AI.bState=0x8C; AI.com1=0x2010; FSobj.Write(0x1F80,sizeof(TCAS_DATA),&AI); FSobj.Process(); ---------------------------------------------------
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now