June 3, 200719 yr I posted this on the fsdeveloper forums yesterday, but haven't really seen a response. Let me first give you a bit of background. I'm new to the development world of FSX and flight sims in general. I'm actually a web developer who is quite proficient at javascript, actionscript, etc. So object oriented programming is something I do everyday. I have been going down the road of creating a motion platform (3dof)and would like to create the control system in managed code (C#). I have already created some small applications based on the SDK examples that will grab the landing gear status and some location info (long, lat, altitude, pitch, bank) of the aircraft. Where I'm having the problem, is having simconnect stream the data to my application on a constant basis. Do I setup a "simconnect_OnRecvEvent" that will continually send the data? None of the C# examples seems to show how to do this. You will find my code here: http://forums.avsim.net/user_files/173186.zipI'm not asking anyone to do the programming for me, but would perhaps like some pointers as to what direction to take. I have also setup a full time website for my project that will outline my progress. So far I don't have much up there, but will soon. The site URL is http://www.simulatormotion.com/Thanks,Torin
June 3, 200719 yr Ok, so I have been playing around, and I understand that I need to use a RequestDataOnSimObject. However, when I try this I get the following error:No overload for method 'RequestDataOnSimObject' takes '5' argumentsHere is my call to RequestDataOnSimObject:simconnect.RequestDataOnSimObject(DATA_REQUESTS.REQUEST_1, DEFINITIONS.Struct1, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD.ONCE, SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT,);Here is a link to the full code:http://forums.avsim.net/user_files/173196.zipAny pointers would be appreciated.Thanks,Torinhttp://forums.avsim.net/user_files/173196.zip
June 3, 200719 yr Not a word from anyone here. Must be a weekend. I figured it out. I'm a moron. This is the fix:simconnect.RequestDataOnSimObject(DATA_REQUESTS.REQUEST_1, DEFINITIONS.Struct1, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD.VISUAL_FRAME, 0, 0, 0, 0);Torin
June 10, 200718 yr I have Microsoft Visual C# and C++ Express Editions on my computer. I think C++ is what you need to use with FSX vice C#. Reading the intro to C# led me to believe this.W. Sieffert Bill Sieffert
June 11, 200718 yr Actually I have C# working great for my motion platform prototype. Just tweaking the settings at this point. Then on to the final version of the larger platform.
June 11, 200718 yr >I have Microsoft Visual C# and C++ Express Editions on my>computer. I think C++ is what you need to use with FSX vice>C#. Reading the intro to C# led me to believe this.>>W. SieffertSimConnect works great with C# and Visual Basic.NET as well as C++. Some crafty guys in our community have ported it to Fortran as well, I believe.
June 11, 200718 yr Fortran! That's crazy!Very cool though. I think Microsoft has done a stellar job with SimConnect.
June 11, 200718 yr It's actually Delphi, I was going for exaggeration.I'm still surprised at what people have been able to do.
June 11, 200718 yr TEE-HEE!! Its all 1's and 0's deep down!!Ah yes, Fortran IV!! Brings back memories at the keypunch card machine and turning in the work to the batch operators.Waiting till the next day to see if one of the cards was turned up to indicate where you went wrong!!W. Sieffert Bill Sieffert
Create an account or sign in to comment