Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with C# for motion platform

Featured Replies

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

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

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

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

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.

>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.

Fortran! That's crazy!Very cool though. I think Microsoft has done a stellar job with SimConnect.

It's actually Delphi, I was going for exaggeration.I'm still surprised at what people have been able to do.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.