PDA

View Full Version : HELP about Limiting Bank angle of plane



sinan
03-22-2013, 04:01 PM
Hi First of all so sory for my bad english.
I need some help. I am using VB6 and I couldnt stop planes when it reach 40 degree bank angle.


the code below I use(thanks jims). It works but it zeroise some other values for instance XYZ pos, pedal pos etc. I need just stopt angle of pitch and roll degre when it reach certain degree as a constantly, without changing any other value. Please help me. Thank you
Sub fsx()

SimConnect.AddDataDefinition 1001, "PLANE PITCH DEGREES", "degree", SIMCONNECT_DATATYPE_FLOAT64
SimConnect.AddDataDefinition 1001, "PLANE BANK DEGREES", "degree",

SimConnect.RequestDataOnSimObject 9999, 1001, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SIM_FRAME, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED, 0, 0, 0
End Sub


The code below for setting degree of pitch and roll; I mean If I use code below vibration happend on screen and changes some value between 0 and initial value.

SimConnect.PrepareData 1001, 1
SimConnect.SetDataDouble 0, 0, "pitch angle here what I need"
SimConnect.SetDataDouble 0, 1, "pitch roll angle here what I need"
SimConnect.SetDataOnSimObject SIMCONNECT_OBJECT_ID_USER


and may be there are some different method of limiting bank angle which you help me.

Jim NZ
03-29-2013, 04:52 AM
Sinan ,, you cant do that with simconnect (set conditions) ,, all you can do is extract data or input data unless you want to go into XML coding within FSX or the plane itself.

Re. the PM's ,,, I have just updated my webpage for the source codes for interfacing and added another "Jims8buttons" for VB6 working with FSX.
It shows extractions and 2 ways of inputting data using VB6. (FSFDT method)

It's here ,,,
http://www.jimspage.co.nz/fsxfs9inouts.htm
You will probably have to hit "refresh" to see the new entry.


You should really read the documentation in the simconnect SDK to get a grip on what happens where as it will make programming for your mission a lot easier once you understand it.

Good luck ,,, Jim

sinan
03-30-2013, 07:19 PM
thank you jim